Closed Bug 1977790 Opened 4 months ago Closed 4 months ago

Initial compose homepage and menu redesign have wrong purple colors on cold startup when last active tab was private

Categories

(Firefox for Android :: Homepage, defect)

Firefox 142
All
Android
defect

Tracking

()

VERIFIED FIXED
142 Branch
Tracking Status
firefox140 --- unaffected
firefox141 --- unaffected
firefox142 --- fixed
firefox143 --- verified

People

(Reporter: ke5trel, Assigned: gl)

References

(Blocks 4 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

STR:

  1. Enable "Compose Homepage" and "Menu Redesign" in secret settings on latest Android Nightly 142.0a1.
  2. Enable the Light theme.
  3. Set "Opening screen" to "Homepage".
  4. Open a private tab.
  5. Quit the app and swipe it away on recents list.
  6. Open app from app drawer, noting homepage colors.
  7. Open three-dot menu.

Expected:
Homepage and menu use Light theme colors (dark text with white background) in non-private mode.

Actual:
Homepage has low contrast white text against white background with some elements using purple background like private mode (only with "Compose Homepage" enabled). Three-dot menu appears purple like in private mode (only with "Menu Redesign" enabled).

Colors correct themselves after creating a new tab.

Unrelated to "Homepage as New Tab" setting.

Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=bd960f56caef55577124a0a19e2bb2d1c3cc04dc&tochange=65eb2fa40ed8d8981413940c991194cb2dc84030

Possibly regressed by Bug 1973324.

:gl, since you are the author of the regressor, bug 1973324, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(gl)
Flags: needinfo?(gl)
Assignee: nobody → gl
Status: NEW → ASSIGNED

This is a regression from https://phabricator.services.mozilla.com/D255455. We missed a call to settings().lastKnownMode = mode in removing setupBrowsingMode. This is affecting the Compose Theme in particular because it relies on settings().lastKnownMode = mode in FirefoxTheme to determine the browsing mode and theme to use.

The fix here is to set settings().lastKnownMode = it.mode around HomeActivity.kt#1286. This would emulate the previous setupBrowsingMode as seen in https://phabricator.services.mozilla.com/D255455.

Flags: qe-verify+
  • See https://bugzilla.mozilla.org/show_bug.cgi?id=1977790#c2 for context.
  • Unify the modeDidChange and updateAppStateMode callbacks into a single onModeChange callback.
  • Invoke onModeChange in the mode setter on init of DefaultBrowsingModeManager. This will set the secure window flags and also update the AppState.mode.
  • Fixes a bug where AppState.mode would not be synchronized with the current browsing mode on app startup.
Pushed by gluong@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/7fd106d4ce95 https://hg.mozilla.org/integration/autoland/rev/e75148bd46ca Invoke onModeChange callback on initialization of the browsing mode r=android-reviewers,devota
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch

Verified as fixed on the latest Firefox for Android Nightly 143.0a1 from 7/27 with a Pixel Tablet (Android 15), and an Oppo Find X3 Lite (Android 11).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Blocks: 1979928
Duplicate of this bug: 1978712
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: