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

Plugin Management: update style for plugin action confirmation modal popups #67799

Merged
merged 2 commits into from
Sep 15, 2022

Conversation

yashwin
Copy link
Contributor

@yashwin yashwin commented Sep 14, 2022

Proposed Changes

This PR makes UI enhancements to the plugin actions confirmation modal popups.

Testing Instructions

Prerequisites

Since this change is made specifically for agencies, you must set yourself(partner) as an agency - 2c49b-pb. Make sure to switch it back to the previous type.

Instructions

  1. Run git checkout update/plugin-action-popup-style-enhancement and yarn start-jetpack-cloud.
  2. Open http://jetpack.cloud.localhost:3000/, and you'll be redirected to the /dashboard.
  3. Click on Plugins in the sidebar -> Click on Edit all and test all the possible scenarios as mentioned below
1 plugin, 1 site n plugins, 1 site 1 plugin, n sites n plugins, n sites
Activate Plugin
Screenshot 2022-09-15 at 10 25 44 AM Screenshot 2022-09-14 at 2 10 06 PM Screenshot 2022-09-15 at 10 28 30 AM Screenshot 2022-09-14 at 2 10 24 PM
Deactivate Plugin
Screenshot 2022-09-15 at 10 25 57 AM Screenshot 2022-09-14 at 3 19 37 PM Screenshot 2022-09-15 at 10 28 37 AM Screenshot 2022-09-14 at 3 19 55 PM
Enable Autoupdate
Screenshot 2022-09-15 at 10 26 35 AM Screenshot 2022-09-14 at 2 11 40 PM Screenshot 2022-09-15 at 10 28 45 AM Screenshot 2022-09-14 at 2 12 04 PM
Disable Autoupdate
Screenshot 2022-09-15 at 10 26 50 AM Screenshot 2022-09-14 at 2 12 29 PM Screenshot 2022-09-15 at 10 28 54 AM Screenshot 2022-09-14 at 2 12 56 PM
Update Plugins
Screenshot 2022-09-15 at 10 27 50 AM Screenshot 2022-09-14 at 2 13 22 PM Screenshot 2022-09-15 at 10 29 03 AM Screenshot 2022-09-14 at 2 13 37 PM
Remove Plugin
Screenshot 2022-09-15 at 10 28 05 AM Screenshot 2022-09-14 at 2 42 40 PM Screenshot 2022-09-15 at 10 29 13 AM Screenshot 2022-09-14 at 2 43 06 PM
  1. Go to plugin details and click on Remove on any site and verify the confirmation popup is as below.

Screenshot 2022-09-14 at 2 42 20 PM

  1. Test the same in Calypso blue and verify that everything looks good.

Screenshot 2022-09-14 at 3 04 07 PM

Pre-merge Checklist

Complete applicable items on this checklist before merging into the trunk. Inapplicable items can be left unchecked.

The PR author and reviewer are responsible for completing the checklist.

Related to 1202518759611394-as-1202967461339771

@yashwin yashwin added Jetpack Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) labels Sep 14, 2022
@yashwin yashwin requested review from grbicsanja and a team September 14, 2022 10:02
@yashwin yashwin self-assigned this Sep 14, 2022
@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 Sep 14, 2022
@github-actions
Copy link

github-actions bot commented Sep 14, 2022

@matticbot
Copy link
Contributor

matticbot commented Sep 14, 2022

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

App Entrypoints (~2 bytes removed 📉 [gzipped])

name           parsed_size           gzip_size
entry-stepper        +63 B  (+0.0%)       -2 B  (-0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~394 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
marketplace                          +1368 B  (+0.2%)     +345 B  (+0.2%)
plugins                               -301 B  (-0.0%)      -31 B  (-0.0%)
jetpack-cloud-plugin-management       -301 B  (-0.0%)      -31 B  (-0.0%)
themes                                 +63 B  (+0.0%)      +12 B  (+0.0%)
theme                                  +63 B  (+0.0%)      +17 B  (+0.0%)
settings                               +63 B  (+0.0%)      +11 B  (+0.0%)
security                               +63 B  (+0.0%)      +12 B  (+0.0%)
people                                 +63 B  (+0.0%)      +11 B  (+0.0%)
migrate                                +63 B  (+0.0%)      +13 B  (+0.0%)
media                                  +63 B  (+0.0%)      +15 B  (+0.0%)

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

Async-loaded Components (~350 bytes added 📈 [gzipped])

name                                               parsed_size           gzip_size
async-load-design-playground                           +1431 B  (+0.1%)     +335 B  (+0.1%)
async-load-design                                      +1431 B  (+0.1%)     +335 B  (+0.1%)
async-load-calypso-post-editor-media-modal               +63 B  (+0.0%)      +15 B  (+0.0%)
async-load-calypso-post-editor-editor-media-modal        +63 B  (+0.0%)      +15 B  (+0.0%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

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.

Copy link
Contributor

@vitozev vitozev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious if we need such a level of abstraction here:

getPluginActionDailogMessage( allSites, selectedPlugins, heading, 'update' ),

It looks like the fourth parameter is also included in the translations, but I can think of some limitations that this approach brings:

  • What if we need to display a custom message in the dialog?
  • Without having the full context, it's quite difficult to translate the string. If we add another action this could be easily missed for translation because it doesn't have an explicit translate() call in the code.

I'd say we should stick to the previous approach here, but I'd love to hear your thoughts on this one.

@yashwin
Copy link
Contributor Author

yashwin commented Sep 14, 2022

I'd say we should stick to the previous approach here, but I'd love to hear your thoughts on this one.

I didn't change the approach here, it is similar to what we had earlier. I just got rid of actionPreposition: actionPreposition which was also being sent as a parameter. I agree with what you are saying. I have created a ticket to address this later - 1202619025189113-as-1202978931490015

@yashwin yashwin force-pushed the update/plugin-action-popup-style-enhancement branch from dfc14f0 to ebad668 Compare September 14, 2022 11:41
Copy link
Contributor

@vitozev vitozev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes works as described in both Jetpack Cloud and Calypso Blue.

LGTM!

@grbicsanja
Copy link

LGTM!
The styling looks great, I wonder if it would be an easy switch to have the plugin name in all the titles that say "[Remove, deactivate, etc] 1 plugin"?

@yashwin yashwin force-pushed the update/plugin-action-popup-style-enhancement branch from ebad668 to 7db3169 Compare September 15, 2022 05:42
@vitozev
Copy link
Contributor

vitozev commented Sep 15, 2022

LGTM! I tested the flows one more time after the latest commit, and everything is working as expected.

@yashwin
Copy link
Contributor Author

yashwin commented Sep 15, 2022

LGTM! The styling looks great, I wonder if it would be an easy switch to have the plugin name in all the titles that say "[Remove, deactivate, etc] 1 plugin"?

@grbicsanja, the changes are done 👍

@yashwin yashwin merged commit a36f471 into trunk Sep 15, 2022
@yashwin yashwin deleted the update/plugin-action-popup-style-enhancement branch September 15, 2022 06:28
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 15, 2022
@a8ci18n
Copy link

a8ci18n commented Sep 15, 2022

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7528497

Thank you @yashwin for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Sep 21, 2022

Translation for this Pull Request has now been finished.

villanovachile pushed a commit that referenced this pull request Sep 27, 2022
…popups (#67799)

* Update style for plugin action confirmation modal popups

* Show plugin name when only one plugin is selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) Jetpack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants