Open malinajirka opened 3 years ago
We currently have two copies of the Jetpack Security Settings. One is within SiteSettingsFragment and the other one is in JetpackSecuritySettingsFragment. This inconsistency was introduced in this PR. Having two copies makes the code hard to maintain and very error prone since we always need to make sure to update both places.
I tried to solve this issue by redirecting the user to the JetpackSecuritySettingsFragment even from Site Settings and removing all the related code from the SiteSettingsFragment (PR). This approach worked well, unfortunately while testing the PR I realized "Whitelisted IP Addresses" row doesn't do anything on click so I created this issue.
Unfortunately, it seems this feature was never implemented in the JetpackSecuritySettingsFragment and the implementation isn't trivial.
I also tried to remove JetpackSecuritySettingsFragment and pass a flag in Intent's extras to the SiteSettings fragment. This flag would indicate that we want to open the "jetpack security" sub-screen. However, android.Preferences don't allow simulating user clicks ("performClick" method is private) and I haven't found a way how to show the sub-preference programatically.
I decided to remove the "Whitelisted IP Addresses" row from the JetpackSecuritySettingsFragment (PR) until this issue is fixed.
Another possible approach which would allow us to have only a single copy of the Jetpack settings:
Downside of this approach is that the user would still need to click on the "Security" row to see the actual Jetpack Security settings screen or we'd need to re-structure the settings (or perhaps start adding the jetpack settings programatically).
This issue has been marked as stale because:
[Pri] Blocker
, [Pri] High
, or good first issue
.Please comment with an update if you believe this issue is still valid or if it can be closed. This issue will also be reviewed for validity and priority during regularly scheduled triage sessions.
Thanks for reporting! 👍
Expected behavior
When I click on "Whitelisted IP addresses" in Jetpack Security settings I expect "Whitelisted IP Addresses" screen to show up.
Actual behavior
When I click on "Whitelisted IP addresses" in Jetpack Security settings nothing happens.
~Note 1: The theme issue is fixed in this PR.~ ~Note 2: This issue is blocking https://github.com/wordpress-mobile/WordPress-Android/pull/13402 and https://github.com/wordpress-mobile/WordPress-Android/pull/13408~ Note 3: It seems the logic was actually never even implemented. It works fine when the Jetpack Security settings are accessed from My Site -> Settings -> Security -> Whitelisted IP Addresses.
Steps to reproduce the behavior
Prerequisites - jetpack site
Notice nothing happens
Update 11/24 When https://github.com/wordpress-mobile/WordPress-Android/pull/13402 is merged this issue won't be reproducible anymore. The row was removed in this PR. Goal of this task is to re-add that option. (it's still available when the settings are accessed from My Site-> Site Settings -> Security)
Prerequisites - jetpack site