[lib-state] Remove `BrowsingModeManager` and track Private Browsing Mode in the `AppStore` exclusively
Categories
(Firefox for Android :: Homepage, enhancement, P3)
Tracking
()
People
(Reporter: matt-tighe, Assigned: matt-tighe)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [fxdroid][group1])
Attachments
(4 files, 7 obsolete files)
The BrowsingModeManager is a utility class that tracks changes to the Private Browsing Mode.
Utility classes like this do not follow architecture best practices. Instead of tracking this state in a one-off class, it should be tracked in the Store.
Remove BrowsingModeManager and replace its usages with State reads from the AppStore as well as Actions that update the AppStore.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
•
|
||
For QA:
This is a fairly large refactor of most things related to private browsing mode. I thought it might make it easier on your end to be able to do a large smoke test of these changes, rather than address them individually. Hope that was an okay assumption. There should be no change in functionality from what previously existed.
I tried to make a list of the areas this patch touches. It may not be completely exhaustive, so it would be great to add anything from existing test suites that relate to private browsing mode.
Mode retained across app sessions
Mode inherited from a deep link
Window is in secure mode while in private mode if setting is enabled
PBM button
New tabs from long-press on tab counter
New tabs from tabs tray
Tabs tray opens in correct mode from Home Screen and browser screen
Long-press top site to open in PBM
Opening tabs from bookmarks
Opening tabs from history
Opening tabs from history groups
Opening recently closed private tab
Addons report button and settings open tabs in private mode if app is in private mode
Reader mode gets themed differently
Recent tabs section visibility and recent bookmarks count metrics not reported in private mode
Standard homepage view metric not incremented when in private mode
Wallpapers onboarding not shown in private mode
Search suggestions not shown in private mode if settings is enabled
Comment 2•1 year ago
|
||
Authored by https://github.com/MatthewTighe
https://github.com/mozilla-mobile/firefox-android/commit/32c3e5aae7acc037949c38027ae23d76bc80da1a
[main] Bug 1861459 - Add a binding from BrowserStore to AppStore for selected tab changes
Authored by https://github.com/MatthewTighe
https://github.com/mozilla-mobile/firefox-android/commit/d5856268ec720ad0e41585a3f75201ae8d5e6755
[main] Bug 1861459 - Remove BrowsingModeManager usages outside of the Home Screen
Authored by https://github.com/MatthewTighe
https://github.com/mozilla-mobile/firefox-android/commit/86e0f3c0ef1dd3a16194eeaff330c8517d18b49f
[main] Bug 1861459 - Remove Home Screen usages of BrowsingModeManager
Authored by https://github.com/MatthewTighe
https://github.com/mozilla-mobile/firefox-android/commit/38af1c1363aa34b564305a1b2c809249e1be5b1b
[main] Bug 1861459 - Remove BrowsingModeManager
Comment 3•1 year ago
•
|
||
Hi,
I've tried covering all the points mentioned in comment 1 to be tested by going through the steps on some of the test cases we have that cover the mentioned scenarios.
No issues were found.
Build tested Nightly 123.0a1 (from 2024-01-10).
Device used for testing: Samsung Galaxy S23 Ultra (Android 14).
Marking the ticket as verified for 123.
Updated•1 year ago
|
Comment 4•1 year ago
|
||
Comment 5•1 year ago
|
||
Authored by https://github.com/MatthewTighe
https://github.com/mozilla-mobile/firefox-android/commit/f69aa6e9408f0022bb7f4da9d91eaa622a330fbe
[main] Revert "Bug 1861459 - Remove BrowsingModeManager"
Authored by https://github.com/MatthewTighe
https://github.com/mozilla-mobile/firefox-android/commit/c0c89dc85e1a6b5033bec9a10fea70ce584ea67a
[main] Revert "Bug 1861459 - Remove Home Screen usages of BrowsingModeManager"
Authored by https://github.com/MatthewTighe
https://github.com/mozilla-mobile/firefox-android/commit/768b8368f9d945567af139ab4db823adcdc32e89
[main] Revert "Bug 1861459 - Remove BrowsingModeManager usages outside of the Home Screen"
Authored by https://github.com/MatthewTighe
https://github.com/mozilla-mobile/firefox-android/commit/b21496d484f738938c6f95fe64af3f1aecfb5b4c
[main] Revert "Bug 1861459 - Add a binding from BrowserStore to AppStore for selected tab changes"
| Assignee | ||
Updated•1 year ago
|
Comment 6•1 year ago
|
||
I've encountered this issue:
- Open the private browsing homescreen on Fenix nightly 123.0a1.
- Send the app in the background and kill it (remove also from recently used apps).
- Re-open Fenix. Observe the homescreen.
Actual result: Firefox for Android opens in normal browsing mode.
Not reproducible on Beta 122.0b9, nor on RC 122.0 with the same Google Pixel 6 (Android 14) device.
Comment 7•1 year ago
|
||
Updated•1 year ago
|
Comment 8•1 year ago
|
||
Authored by https://github.com/MatthewTighe
https://github.com/mozilla-mobile/firefox-android/commit/db3bbc8ef52479ed6c813458c13487f749165101
[main] Bug 1861459 - Update AppState.mode based on selected tab changes
Comment 9•1 year ago
|
||
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 10•1 year ago
|
||
| Assignee | ||
Comment 11•1 year ago
|
||
| Assignee | ||
Comment 12•1 year ago
|
||
| Assignee | ||
Comment 13•1 year ago
|
||
| Assignee | ||
Comment 14•1 year ago
|
||
| Assignee | ||
Comment 15•1 year ago
|
||
| Assignee | ||
Comment 16•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Description
•