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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugins: Improve messaging for Jetpack Scan detected errors #61068
Conversation
When uploading a plugin, it is scanned using Jetpack. The previous message was unclear so it has been improved to a clearer message.
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~160 bytes added 馃搱 [gzipped])
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 (~24 bytes added 馃搱 [gzipped])
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. Generated by performance advisor bot at iscalypsofastyet.com. |
Changes required after https://code.a8c.com/differential/diff/304117/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this and works as advertised.
Can we also do the extra mile here by changing the error message in the main content and providing the user an alternative for uploading the plugin through WP Admin?
Prior art here
wp-calypso/client/my-sites/marketplace/pages/marketplace-plugin-install/index.tsx
Lines 336 to 350 in 08c583c
if ( pluginExists ) { | |
return ( | |
<EmptyContent | |
illustration="/calypso/images/illustrations/error.svg" | |
title={ null } | |
line={ translate( | |
'This plugin already exists on your site. If you want to upgrade or downgrade the plugin, please continue by uploading the plugin again from WP Admin.' | |
) } | |
secondaryAction={ translate( 'Back' ) } | |
secondaryActionURL={ `/plugins/upload/${ selectedSiteSlug }` } | |
action={ translate( 'Continue' ) } | |
actionURL={ `https://${ selectedSiteSlug }/wp-admin/plugin-install.php?tab=upload` } | |
/> | |
); | |
} |
Describes a workaround to upload malicious plugins using wp-admin
client/my-sites/marketplace/pages/marketplace-plugin-install/index.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the feedback! That's a great improvement in UX!
Just left a minor comment regarding copy.
Co-authored-by: Harris Papazoglou <hrrsppzgl@gmail.com>
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7141787 Thank you @epeicher for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
When uploading a plugin, it is scanned using Jetpack. The previous message
was unclear, so it has been improved to a more explicit message.
Depends on D74922-code
Changes proposed in this Pull Request
Change the error message when Jetpack Scan reports a failure from
to
Additionally, the displayed page offers a workaround that reads:
Pinging to @emmnyc85 and @cavalierlife to check if the suggested message is fine 馃檪
Testing instructions
The uploaded file is identified as malicious.
and the displayed page should contain the messageThis plugin is identified as malicious. If you want to install the plugin, please continue by uploading the plugin again from WP Admin.
. That page will contain two action buttons:Back
that will navigate to previous pageContinue
that will re-direct to the upload plugin from thewp-admin
page.Fixes #58942