-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Jetpack Cloud: Scanner display threats #41216
Conversation
} ); | ||
|
||
case 'database': | ||
return translate( 'Database %(threatCount)d threat', 'Database %(threatCount)d threats', { |
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.
鈩癸笍 String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 17 times:
translate( 'Jetpack identified %(threatCount)d threat in your database.', 'Jetpack identified %(threatCount)d threats in your database.' )
ES Score: 7
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Webpack Runtime (~20 bytes added 馃搱 [gzipped])
Webpack runtime for loading modules. It is included in the HTML page as an inline script. Is downloaded and parsed every time the app is loaded. App Entrypoints (~17 bytes added 馃搱 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~7485 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. 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. |
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.
Taking this over. Going to get typing updated and test with a bunch of threats. |
This is working really great! Thanks for all the fixed @ChaosExAnima ! |
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.
Works great!
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/3324647 Thank you @enejb for including a screenshot in the description! This is really helpful for our translators. |
Changes proposed in this Pull Request
This PR attempts to render the treats as best as it can.
We should move most of the treats details to the api vs figuring here.
I reused quite a bit of code from treats-alert.jsx component to figure out nicer nameing etc.
After:
Bonus part here is that treat ignoring works as expected 馃コ for the treat that I ignored.
Testing instructions
http://jetpack.cloud.localhost:3000/scan/{example.com}
Notice the sections renders real threats.