Closed Bug 2084201 Opened 26 days ago Closed 2 days ago

Open link behavior should be consistent in sidebar panels

Categories

(Firefox :: Sidebar, defect, P2)

defect
Points:
2

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: sclements, Assigned: kcochrane)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fidefe-sidebar])

Attachments

(1 external file)

Bookmarks, Tabs from Other Devices and History sidebar panels should have consistent left and right-click context menu behavior for opening items in tabs. The desired changes are:

Left-mouse click/touchpad click on any list item:
Opens link in a new foreground (active tab)

In the right-click context menu for each panel, Open in New Tab should open the link according to the value of the browser.tabs.loadInBackground (if set to true, it should open in a background tab, if it is set to false the link opens in a foreground new tab).

Points: --- → 2

sidebar-bookmarks.mjs, sidebar-history.mjs and sidebar-syncedtabs.mjs all call navigateToLink with forceNewTab: false, so helpers.mjs leaves a plain click as "current" and replaces the selected tab. For "Open in New Tab", only the History case in sidebar-page.mjs passes inBackground from browser.tabs.loadInBackground, while the synced-tabs case beside it and the bookmarks case at sidebar-bookmarks.mjs#657 call openTrustedLinkIn(url, "tab"), which defaults forceForeground to true and so always switches.

Fix: Drop forceNewTab: false from the three callers so they use the default Firefox View already relies on, and give the synced-tabs and bookmarks "Open in New Tab" cases the same inBackground: Services.prefs.getBoolPref("browser.tabs.loadInBackground") the History case uses. This also turns a plain Enter on a row into a new tab, so the current-tab assertions in browser_syncedtabs_sidebar.js, browser_history_sidebar.js, browser_history_keyboard_navigation.js and browser_glean_sidebar.js need updating, plus a new pref-on/off foreground/background check for the context menu, which no test covers today.

Suggested severity: S3. Each panel opens links differently and there is no obvious way to open a bookmark or synced tab in a background tab from the context menu, but middle-click and the History context menu still work, so a workaround exists.


If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.
If you want to categorize your feedback you can add one of the following tags: ai-triage-{wrong-file, wrong-cause, hallucination, out-of-scope, not-a-bug, wrong-fix, shallow-fix, wrong-severity}.

Needinfo hackbot@mozilla.tld to have a patch generated for this bug, include any questions or directions as needed in your comment.

Assignee: nobody → kcochrane
Status: NEW → ASSIGNED
Keywords: blocked-ux

Just spoke to Ania and Eric on this and we're going to leave the left-click behavior as is to remain consistent with the app menu and library. So the only change we'll be making for this is:
In the right-click context menu for each panel, Open in New Tab should open the link according to the value of the browser.tabs.loadInBackground (if set to true, it should open in a background tab, if it is set to false the link opens in a foreground new tab).

Keywords: blocked-ux
Blocks: 2092644
Pushed by kcochrane@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/fac5a4479e9e https://hg.mozilla.org/integration/autoland/rev/5ed25fa7dc04 'Open in New Tab' should open the link according to the value of 'browser.tabs.loadInBackground' r=sidebar-reviewers,jsudiaman
Status: ASSIGNED → RESOLVED
Closed: 2 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: