Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sites Dashboard: Update action's isEligible checks to exclude Jetpack/P2 sites from the action options #96803

Open
wants to merge 7 commits into
base: trunk
Choose a base branch
from

Conversation

lsl
Copy link
Contributor

@lsl lsl commented Nov 27, 2024

Fixes https://github.com/Automattic/dotcom-forge/issues/9971

Proposed Changes

The Jetpack action items were lost when merging https://github.com/Automattic/wp-calypso/pull/94238/files?w=1#diff-173bec7d847197dc6a90c47661016102ba95728dab618e17b774c11c7ed1994cL550-L565, this PR adds these actions and the migration related ones back into the list. It also hides the wpcom site actions that aren't relevant to Jetpack/p2 sites.

Testing Instructions

  • non-Atomic Jetpack sites
    • Create a site with jurassic
    • Connect your WP.com account through Jetpack
    • Observe your site is listed on /sites
    • Observe 'Jetpack Cloud', 'Billing', 'Support', 'Migrate to WordPress.com' actions are shown.
    • Screenshot 2024-11-28 at 9 46 21
  • non-Atomic sites added via A4A plugin
  • P2 sites
    • Observe some actions are hidden (See sites-dataviews-actions.test.ts).
  • Observe no regressions for Simple sites and Atomic sites

@lsl lsl assigned lsl and okmttdhr Nov 27, 2024
@matticbot
Copy link
Contributor

matticbot commented Nov 27, 2024

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~427 bytes added 📈 [gzipped])

name                parsed_size           gzip_size
staging-site            +2101 B  (+0.1%)     +427 B  (+0.1%)
sites-dashboard         +2101 B  (+0.2%)     +427 B  (+0.1%)
site-tools              +2101 B  (+0.1%)     +427 B  (+0.1%)
site-settings           +2101 B  (+0.1%)     +427 B  (+0.1%)
site-performance        +2101 B  (+0.1%)     +427 B  (+0.1%)
site-overview           +2101 B  (+0.1%)     +427 B  (+0.1%)
site-monitoring         +2101 B  (+0.2%)     +427 B  (+0.1%)
site-marketing          +2101 B  (+0.1%)     +427 B  (+0.1%)
site-logs               +2101 B  (+0.2%)     +427 B  (+0.1%)
hosting-features        +2101 B  (+0.2%)     +427 B  (+0.1%)
hosting                 +2101 B  (+0.1%)     +427 B  (+0.1%)
github-deployments      +2101 B  (+0.1%)     +427 B  (+0.1%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug update/jetpack-actions on your sandbox.

@okmttdhr okmttdhr changed the title Update /sites action's isEligible checks to exclude Jetpack/p2 sites from the action options Sites Dashboard: Update action's isEligible checks to exclude Jetpack/P2 sites from the action options Nov 27, 2024
@okmttdhr okmttdhr marked this pull request as ready for review November 28, 2024 01:07
@okmttdhr okmttdhr requested a review from a team November 28, 2024 01:07
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 28, 2024
@lsl
Copy link
Contributor Author

lsl commented Nov 28, 2024

I was unsure how to create a Jetpack disconnected non-Atomic site. The original code and the comment suggests Sites connected through A4A plugin are listed on wordpress.com/sites even when Jetpack is deactivated, but when you connect a site through A4A plugin, Jetpack gets connected automatically. If you disconnect Jetapck afterward, the site no longer appear on wp.com/sites anymore.

This required creating the site via pressable and deactivating Jetpack + Jetpack protect while still having the A4A client plugin installed (the a4a client plugin maintains a Jetpack connection irrc).

All the hosting options are hidden, only open/wpadmin/move links are present:

Screenshot(138)
Screenshot 2024-11-28 at 15-31-41 Plugins ‹ My WordPress Site — WordPress

Screenshot_2024-11-28_15-22-49

@lsl
Copy link
Contributor Author

lsl commented Nov 28, 2024

P2:
Screenshot(140)

Self hosted JP:
Screenshot(139)

Simple sites:
Screenshot(142)

Atomic:
Screenshot(143)

Staging:
Screenshot(144)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants