Closed Bug 1837446 Opened 1 years ago Closed 8 months ago

[Tabs tray to Compose] Elements from the previous/next tab view will be displayed after repeatedly changing the orientation

Categories

(Fenix :: Tabs, defect, P2)

Firefox 116
All
Android
defect

Tracking

(firefox116 affected, firefox124 verified, firefox125 verified, firefox126 verified)

RESOLVED WORKSFORME
Tracking Status
firefox116 --- affected
firefox124 --- verified
firefox125 --- verified
firefox126 --- verified

People

(Reporter: dpop, Assigned: 007)

References

Details

(Whiteboard: [fxdroid])

Attachments

(3 files)

Prerequisites

  1. Install and launch the latest Nightly 116.0a1 from 06/08.
  2. Enable the “Enable Tabs Tray to Compose rewrite” toggle from Secret Settings.

Steps to reproduce

  1. Tap on the tabs tray, then tap on the private tabs view or synced tabs view.
  2. Change the orientation to Landscape mode.
  3. Change the orientation again, to Portrait mode.
  4. While in Portrait mode, observe the tabs tray.
  5. If needed, repeat Steps 1-4 multiple times if needed.

Expected behavior

When changing the orientation multiple times while having the tabs tray opened in the private tabs view or synced tabs view, the tabs tray elements remain correctly displayed.

Actual behavior

When changing the orientation multiple times while having the tabs tray opened in the private tabs view or synced tabs view, the tabs tray will display elements from the previous/next tab view:
e.g.

  • the "Your private tabs will be shown here" string from Private tabs view will be displayed off-center;
  • the "Your private tabs will be shown here" string from Private tabs view will be displayed in the synced tabs view;
  • the synced tabs list will be displayed in the private tabs view;
  • on tablets, half of the private tabs view will be displayed in the synced tabs;

Device information

  • Firefox version: Nightly 116.0a1 from 6/8
  • Android devices: Lenovo tab M10 (Android 10), Xiaomi Redmi Note 8T (Android 11), Samsung Galaxy A53 5G (Android 13).

Any additional information?

  • NOT reproducible if the "Tabs Tray to Compose rewrite" option from Secret Settings is disabled.
  • Not reproducible on latest Beta 115.0b2 and RC 114.0 build 3 where the "SYNC" button is displayed.
Severity: -- → S3
Assignee: nobody → nbond
Status: NEW → ASSIGNED
Whiteboard: [fxdroid]
Whiteboard: [fxdroid]
Whiteboard: [fxdroid]
Severity: S3 → S2

After 10+ hours of researching this bug, it seems to be a result of disabling the configuration changes in our manifest for HomeActivity. Removing these flags seems to resolve this issue. I've tried several hacks to try to force the HorizontalPager Composable to be on the correct page (which I'll list below) to no avail. To truly fix this bug and prevent others like it in the future, we should instead investigate removing the manifest flags for handling configuration changes.

Hacks attempted

  • Using a LaunchedEffect to detect orientation changes and firing a pager scroll
  • Reassigning the pager state every time (this "worked" but the page scroll animation no longer worked)
  • Reassigning the pager state upon every orientation change
  • Forcing a recomposition upon every orientation change
Depends on: 1841909
Priority: -- → P1

The Android team has not been keeping our P1 bug list up to date, so we're resetting all our P1 bugs to P2 to avoid signalling that we're actively working on bugs that we're not. The BMO documentation https://wiki.mozilla.org/BMO/UserGuide/BugFields#priority says P1 means "fix in the current release cycle" and P2 means "fix in the next release cycle or the following (nightly + 1 or nightly + 2)".

If you are actively working on this bug and expect to ship it in Fx 122 or 123, then please restore the priority back to P1.

Priority: P1 → P2

Hey Delia, there have been some changes pushed recently which should fix how device configuration changes, like rotation, are handled. Whenever you have a chance, could you please verify if this bug is still present?

Flags: needinfo?(dpop)

Verified on the latest Nightly 126.0a1 from 4/4, on the 124.2.0 release, and on Beta 125.0b8, with Samsung Galaxy S22 Ultra (Android 14) and Lenovo Yoga Tab 11 (Android 12), and the issue is no longer reproducible.

Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Flags: needinfo?(dpop)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: