Closed Bug 2049187 Opened 13 days ago Closed 12 days ago

Updated bookmarks sidebar panel: long titles overflow the panel and folders never show a tooltip

Categories

(Firefox :: Sidebar, defect, P3)

Firefox 152
defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox-esr153 --- disabled
firefox152 --- disabled
firefox153 --- disabled
firefox154 --- fixed

People

(Reporter: Gabri, Assigned: Gabri)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [fidefe-sidebar])

Attachments

(2 files, 1 obsolete file)

This bug tracks two related regressions in the updated bookmarks
sidebar panel introduced by bug 2019583. They share the same root
files and the same release-channel exposure, so they're filed
together.

Steps to reproduce

  1. Set sidebar.revamp and sidebar.updatedBookmarks.enabled to
    true (the latter is the default on Nightly).
  2. Open the bookmarks sidebar.
  3. Make the sidebar narrow enough that long titles wouldn't fit on
    one line, or bookmark a page with a deliberately long title.

Actual behaviour
A. Bookmark and folder titles render in full and overflow the panel;
the row width exceeds the sidebar width and the text is painted
over the browser area. No ellipsis appears.
B. Hovering a folder (expanded <details><summary> or empty
<div class="bookmark-folder-label">) never shows a tooltip, even
when the title is cropped.
C. The OS default text I-beam cursor appears over the folder text
even though the element is clickable.

Expected behaviour
A. Titles should be truncated to the panel width using the standard
.text-truncated-ellipsis treatment (text-overflow: ellipsis).
B. Cropped folder titles should show a native tooltip with the full
title, matching the legacy XUL sidebar (tree.isCellCropped +
bhTooltip) and the URL rows in the new sidebar.
C. The cursor over folder rows should be a pointer.

Root cause

  • sidebar-bookmark-list.css overrides the base fxview grid with
    grid-template-columns: unset on .fxview-tab-list and virtual-list,
    while every row/folder element still has grid-column: span 9.
    With no explicit columns those spans materialise as implicit
    auto-sized tracks that grow to max-content, so the rows expand to
    fit the text and text-overflow can never trigger.
  • The compact rule in fxview-tab-row.css uses
    grid-template-columns: min-content auto. auto is essentially
    minmax(min-content, max-content), so the title column cannot
    shrink below its longest word, leaving long single words to
    overflow.
  • SidebarBookmarkRow.tooltipText in sidebar-bookmark-list.mjs returns
    null when url is empty, so the title attribute is never set on
    folder-style rows. <summary> and .bookmark-folder-label have no
    tooltip wiring at all.
  • details summary, .bookmark-folder-label have no cursor rule.
    While text was overflowing this was masked; once cropping is
    re-enabled the default text I-beam becomes visible.

Fix

  • sidebar-bookmark-list.css: give both grid containers explicit
    shrinkable tracks (grid-template-columns: minmax(0, 1fr); grid-auto-columns: minmax(0, 1fr);). Add
    cursor: pointer; user-select: none; to
    details summary, .bookmark-folder-label.
  • fxview-tab-row.css: in the compact row template, change the title
    column from auto to minmax(0, 1fr) so single long words can be
    truncated.
  • sidebar-bookmark-list.mjs: add #updateFolderTooltip(e, title)
    that, on mouseenter, sets el.title = title when
    el.scrollWidth > el.clientWidth and removes the attribute
    otherwise. Wire @mouseenter on both the <summary> and the
    .bookmark-folder-label templates.

Notes

  • Not visible on 151+ release/devedition/beta because
    sidebar.updatedBookmarks.enabled defaults to false there; in
    those channels the bookmarks sidebar still falls back to the
    legacy bookmarksSidebar.xhtml.
  • Regression introduced when the file was first added (commit
    c207ea89352e — bug 2019583, Phabricator D288557, landed in
    151.0b1, March 2026).
Assignee: nobody → gabri.best
Status: NEW → ASSIGNED
Keywords: regression
Regressed by: 2019583

Set release status flags based on info from the regressing bug 2019583

Regressed by: 2031312
No longer regressed by: 2019583
Whiteboard: [fidefe-sidebar]

Ah I was testing with bookmark items, but I do see the issue with bookmark folders

Attached image mac.png (obsolete) —
Attachment #9599744 - Attachment is obsolete: true
Attached image sidebar.jpg

Before and after patch on Firefox 154 nightly build

Severity: -- → S3
Priority: -- → P3
Attachment #9599610 - Attachment description: Bug 2049187 - Sidebar bookmarks: truncate long titles and tooltip cropped folders r?#sidebar-reviewers,#fxview-reviewers → Bug 2049187 - Sidebar bookmarks: truncate long titles and tooltip cropped folders r=#sidebar-reviewers,#fxview-reviewers
Pushed by kcochrane@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/05b27d47563b https://hg.mozilla.org/integration/autoland/rev/1ae89413a03b Sidebar bookmarks: truncate long titles and tooltip cropped folders r=fxview-reviewers,desktop-theme-reviewers,kcochrane
Status: ASSIGNED → RESOLVED
Closed: 12 days ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: