-
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Site Settings: Add Jetpack Firewall Toggle to Security Settings Screen #91966
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~1738 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 (~133 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. |
c8e64a8
to
432b9dd
Compare
432b9dd
to
6023197
Compare
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.
Looks and works great, with the exception the Akismet UI glitch hijacking the save, returning an error notice and not immediately reflecting the new toggle state as we discussed.
Settings updates are working and are reflected in both the Jetpack and/or Protect UIs appropriately and vice-versa. Upgrading and downgrading performs as expected and the UIs are updated accordingly.
One thing I did notice as a potential discussion point, when viewing these settings for an unsupported site, the toggles are just disabled rather than hidden as they are in the other UIs. I realize this is a difficult scenario because the BFP and Allow list settings are baked into the WAF card, but I think it may raise the question "why can I not enable these?". If hiding them is not a valid solution, perhaps we should add a notice of some sort for clarification? Thoughts?
I'm not sure exactly where this is happening yet, each toggle should be conditionally rendered based on the value of
When a toggle is rendered but disabled, the logic is more complex:
Do you know what your state would have looked like roughly, when the toggles are disabled but still being rendered on the page? Toggles should be disabled briefly while loading, and the automatic rules toggle should be disabled when the user has no active plan but older automatic rules available. Otherwise if something isn't available, it should be hidden - but that may not be the case if this can be reproduced. |
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 if Akismet is activated, but that is a separate/existing issue that will hopefully be resolved external to this.
Every scenario I could think of testing is now accounted for with one minor exception to provide for perfect parity. When in an unsupported environment we now only display the BFP and Allow list toggles, in Jetpack/Protect we disable the Allow list if BFP is disabled as it has no usage outside of that scenario.
In Calypso we still allow it to be toggled and entries added.
If we pursue this change, I think we may need to also ensure this is the case in the backward compatible version if that is at all handled uniquely.
@dkmyta What do you think about leaving the IP allow list available when the firewall/login protection features are turned off? My thinking being that you may want to allow list your own address prior to turning back on one of the features. Perhaps we can sync up on how to present different WAF settings (i.e. show lists vs disable them when toggled off, disable or hide allow list when other features off, etc) with design during our meetup? My proposal then being, let's merge this and follow up more broadly 😅 |
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/16462881 Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday. Thank you @nateweller for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
Related to https://github.com/Automattic/jetpack-scan-team/issues/1228
Depends on https://github.com/Automattic/jetpack-scan-team/issues/1321
Proposed Changes
/settings/security/[site]
.Why are these changes being made?
Testing Instructions
jetpack docker up -d
andjetpack docker jt-up
wp-admin
and ensure Jetpack is connectedPre-merge Checklist
Screenshots