Closed Bug 1904921 Opened 8 months ago Closed 8 months ago

When there are inactive tabs in the tab tray, the tab grid moves to the top, for example 50 tabs and being on the last open tab

Categories

(Fenix :: Tabs, defect, P1)

Firefox 127
All
Android
defect

Tracking

(firefox127 unaffected, firefox128 unaffected, firefox129 verified, firefox130 verified)

VERIFIED FIXED
130 Branch
Tracking Status
firefox127 --- unaffected
firefox128 --- unaffected
firefox129 --- verified
firefox130 --- verified

People

(Reporter: emanuellclaudiu, Assigned: 007)

References

Details

(Whiteboard: [fxdroid][group4])

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Android 11; Mobile; rv:129.0) Gecko/129.0 Firefox/129.0

Steps to reproduce:

When the Inactive tabs setting is enabled and we have inactive tabs in the tab tray and we have open for example more than 50 tabs and we are on the last open tab, every time the tab tray is opened it also opens at the top, where the tabs are inactive, even if we are on the last open tab.

Actual results:

The tab tray opens and shows the first tabs and inactive tabs, we're actually on the last tabs open, with about 50 tabs open.

Expected results:

You should always have the tab tray open at the last open tab, even if there are inactive tabs displayed in the tab tray.

This may be the behavior, but it's a little confusing. Can you look ?

Flags: needinfo?(cpeterson)

Hey, this looks like the bug I fixed as part of Bug 1904156. When you have a chance, could you please re-check with the latest Nightly?

Flags: needinfo?(cpeterson)
See Also: → 1904156

It's resolved, but... By enabling the setting: Enable tabs tray to componse rewrite from Hidden Settings, this error is still present.

Flags: needinfo?(nbond)
Flags: needinfo?(cpeterson)
Flags: needinfo?(cpeterson)

I also specify that if a user has, for example, more than 100 tabs and is on the last tab, it is difficult for him to scroll up to reach the inactive tabs. There should be an easier way around this problem.

Hey, thanks for re-checking it. I've also confirmed that the change from Bug 1904156 does not fix this bug. I'll be looking more into this.

Assignee: nobody → nbond
Severity: -- → S3
Status: NEW → ASSIGNED
Flags: needinfo?(nbond)
Priority: -- → P1
Whiteboard: [fxdroid][group4]
Pushed by nbond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/524df973bb62 Fix Tabs Tray not scrolling to the active tab on first open r=android-reviewers,calu

Backed out for causing linting issues related to TabsTrayFragment.kt.

[task 2024-07-03T23:34:48.220Z] > Task :detekt FAILED
[task 2024-07-03T23:34:48.220Z] /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt:141:18: The function onCreateDialog is too long (75). The maximum length is 75. [LongMethod]
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt - 20min debt
[task 2024-07-03T23:34:48.220Z] 	LongMethod - 75/75 - [The function onCreateDialog is too long (75). The maximum length is 75.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt:141:18
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] Overall debt: 20min
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] complexity - 20min debt
[task 2024-07-03T23:34:48.220Z] 	LongMethod - 75/75 - [The function onCreateDialog is too long (75). The maximum length is 75.] at /builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt:141:18
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] Overall debt: 20min
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] Complexity Report:
[task 2024-07-03T23:34:48.220Z] 	- 123,709 lines of code (loc)
[task 2024-07-03T23:34:48.220Z] 	- 91,611 source lines of code (sloc)
[task 2024-07-03T23:34:48.220Z] 	- 62,078 logical lines of code (lloc)
[task 2024-07-03T23:34:48.220Z] 	- 18,196 comment lines of code (cloc)
[task 2024-07-03T23:34:48.220Z] 	- 10,789 cyclomatic complexity (mcc)
[task 2024-07-03T23:34:48.220Z] 	- 5,867 cognitive complexity
[task 2024-07-03T23:34:48.220Z] 	- 1 number of total code smells
[task 2024-07-03T23:34:48.220Z] 	- 19% comment source ratio
[task 2024-07-03T23:34:48.220Z] 	- 173 mcc per 1,000 lloc
[task 2024-07-03T23:34:48.220Z] 	- 0 code smells per 1,000 lloc
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] Project Statistics:
[task 2024-07-03T23:34:48.220Z] 	- number of properties: 5487
[task 2024-07-03T23:34:48.220Z] 	- number of functions: 4613
[task 2024-07-03T23:34:48.220Z] 	- number of classes: 1640
[task 2024-07-03T23:34:48.220Z] 	- number of packages: 191
[task 2024-07-03T23:34:48.220Z] 	- number of kt files: 937
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] Successfully generated SARIF: a standard format for the output of static analysis tools at file:///builds/worker/checkouts/gecko/mobile/android/fenix/build/reports/detekt/detekt.sarif
[task 2024-07-03T23:34:48.220Z] Successfully generated Checkstyle XML report at file:///builds/worker/checkouts/gecko/mobile/android/fenix/build/reports/detekt/detekt.xml
[task 2024-07-03T23:34:48.220Z] Successfully generated plain text report at file:///builds/worker/checkouts/gecko/mobile/android/fenix/build/reports/detekt/detekt.txt
[task 2024-07-03T23:34:48.220Z] Successfully generated HTML report at file:///builds/worker/checkouts/gecko/mobile/android/fenix/build/reports/detekt/detekt.html
[task 2024-07-03T23:34:48.220Z] Successfully generated Markdown report at file:///builds/worker/checkouts/gecko/mobile/android/fenix/build/reports/detekt/detekt.md
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] FAILURE: Build failed with an exception.
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] * What went wrong:
[task 2024-07-03T23:34:48.220Z] Execution failed for task ':detekt'.
[task 2024-07-03T23:34:48.220Z] > Analysis failed with 1 weighted issues.
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] * Try:
[task 2024-07-03T23:34:48.220Z] > Run with --stacktrace option to get the stack trace.
[task 2024-07-03T23:34:48.220Z] > Run with --info or --debug option to get more log output.
[task 2024-07-03T23:34:48.220Z] > Run with --scan to get full insights.
[task 2024-07-03T23:34:48.220Z] > Get more help at https://help.gradle.org.
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
[task 2024-07-03T23:34:48.220Z] 
[task 2024-07-03T23:34:48.220Z] BUILD FAILED in 1m 59s
[task 2024-07-03T23:34:48.220Z] 31 actionable tasks: 31 executed
[taskcluster 2024-07-03 23:34:49.178Z] === Task Finished ===
[taskcluster 2024-07-03 23:34:50.200Z] Unsuccessful task run with exit code: 1 completed in 279.711 seconds

Flags: needinfo?(nbond)
Pushed by nbond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/96e9ac686340 Fix Tabs Tray not scrolling to the active tab on first open r=android-reviewers,calu
Flags: needinfo?(nbond)
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch

The patch landed in nightly and beta is affected.
:007, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox129 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(nbond)

Hey eclaudiu, when you have a chance, could you please check if this is fixed for you on the latest Nightly? If so, I'll get this into the uplift queue!

Flags: needinfo?(nbond)
Flags: needinfo?(emanuellclaudiu)

Unfortunately, at the moment I don't have any inactive tabs showing in the tab tray and you have to wait a while to reappear... can you check otherwise?

Flags: needinfo?(emanuellclaudiu) → needinfo?(nbond)

Yeah, there's two ways to add some inactive tabs to your Tabs Tray!

  1. Enable the Fenix developer mode (tapping on the Firefox logo in "About this app") -> Select multiple tabs -> Tap on the three-dot button and select "Make inactive"
  2. Go to secret settings -> Enable the debug drawer -> Open up the Debug Drawer by tapping on the new button with a bug icon -> Go to "Tab Tools" -> Add however many inactive tabs as you like with the tool

Here's a video I made of how to access the Debug Drawer in case a visual would help

Flags: needinfo?(nbond)

I had forgotten about this way of putting tabs. I tested and I see that by enabling the hidden setting: Enable tabs tray to compose rewrite, it stays stable on the last tab and stops scrolling to the top, but when the hidden setting is disabled, it appears briefly every time the tab tray is opened, inactive tabs. I think you will have to update to be the official version as well. And there is another problem, when a user has a lot of tabs open, it will be a bit difficult for him to scroll from the last tab to the first tab in order to see the inactive tabs, can't something be done about this too?

Flags: needinfo?(nbond)

I think you will have to update to be the official version as well.

The Tabs Tray rewrite has been enabled by default for Firefox Release since 127 (June's major release), and we will be removing the original implementation later this year, so users should no longer be experiencing bugs like the one you described with the legacy Tabs Tray UI.

And there is another problem, when a user has a lot of tabs open, it will be a bit difficult for him to scroll from the last tab to the first tab in order to see the inactive tabs, can't something be done about this too?

I agree this can be a pain point, and one I have personally felt.

I have a couple tickets for tracking future Tabs Tray enhancements/features that our Product team has been looking at:

  • Bug 1812851 is for generally improving the UI of inactive tabs (this is an area that needs some TLC, since expanding the Inactive Tabs section with 100+ tabs can occasionally slow down the app)
  • Bug 1881848 is the meta for collecting all ideas for enhancements & features

Would you be willing to leave a comment with this sentiment in Bug 1812851 or open a ticket for this and then link it to the meta? That will help us prioritize changes to Inactive Tabs sooner.

Flags: needinfo?(nbond)

Also, thank you for verifying the issue originally reported here is fixed! I'll nominate this for an uplift after it has baked in Nightly for a few more days.

:007 adding a NI as a reminder about Comment 17. Depending on risk, I would like to get this into the next beta.

Flags: needinfo?(nbond)
Attached file Beta Uplift Request (obsolete) —

Approval Request Comment
[Feature/Bug causing the regression]: The Tabs Tray was not scrolling to the currently selected tab.
[User impact if declined]: The Tabs Tray will sporadically open at the top instead of at the selected tab.
[Is this code covered by automated tests?]: No
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]: Yes.
STR:

  1. Have inactive tabs and enough active tabs to have the selected tab offscreen.
  2. Open the Tabs Tray multiple times. It should sporadically open, incorrectly, to the inactive tabs section instead of the selected tab.

[Why is the change risky/not risky?]: This is a minimal code change to ensure the initial state of the Tabs Tray is properly set.
[String changes made/needed]: N/A

Flags: needinfo?(nbond)
Attachment #9412821 - Flags: approval-mozilla-beta?

Comment on attachment 9410928 [details]
Bug 1904921 - Fix Tabs Tray not scrolling to the active tab on first open

Beta/Release Uplift Approval Request

  • User impact if declined: The Tabs Tray will sporadically open at the top instead of at the selected tab.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1. Have inactive tabs and enough active tabs to have the selected tab offscreen.
  1. Open the Tabs Tray multiple times. It should sporadically open, incorrectly, to the inactive tabs section instead of the selected tab.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a minimal code change to ensure the initial state of the Tabs Tray is properly set.
  • String changes made/needed: N/A
  • Is Android affected?: Yes
Attachment #9410928 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9412821 [details]
Beta Uplift Request

Moved beta uplift request to the correct attachment

Attachment #9412821 - Flags: approval-mozilla-beta?
Attachment #9412821 - Attachment is obsolete: true

Comment on attachment 9410928 [details]
Bug 1904921 - Fix Tabs Tray not scrolling to the active tab on first open

Approved for 129.0b5

Attachment #9410928 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified as fixed on the latest fenix Nightly 130.0a1 build from 7/17 with a Lenovo TB-X606X (Android 10), and a Google Pixel 6 (Android 15).
I had +100 inactive tabs, normal tabs, and every time I've opened the tabs tray, it opened at the last accessed tab.

We will verify on Beta 129.0b5 as well.

Flags: qe-verify+

Verified as fixed on the latest Beta 129.0b5 with:

  • Samsung Galaxy S24 (Android 14),
  • Poco M4 Pro (Android 12), and
  • Huawei MediaPad T5 (Android 8).
Status: RESOLVED → VERIFIED
Duplicate of this bug: 1815484
Duplicate of this bug: 1908104
Duplicate of this bug: 1910086
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: