Closed Bug 1836986 Opened 1 years ago Closed 1 year ago

Hide tags field in the Star ("Bookmark this page") panel when the user has no tags

Categories

(Firefox :: Bookmarks & History, enhancement, P3)

enhancement

Tracking

()

VERIFIED FIXED
116 Branch
Tracking Status
firefox116 --- verified
firefox117 --- verified

People

(Reporter: dao, Assigned: klubana)

References

Details

(Whiteboard: [snt])

Attachments

(1 file)

Tags are a nice power user feature, but most people won't need or want them, so let's hide the tags field from the Star panel when the user hasn't tagged any bookmarks. For existing users of tags this means no change. Users who don't have any tags but want to opt into the feature can do so in the full Edit Bookmark dialog or the Library window.

See Also: → 1464580

The scope of the bug is to show/hide the tags field depending on whether the user has ANY tags, so the first time the star dialog is shown we must use bookmarks.fetchTags to check if the user has any tags, and cache that information somewhere in browser-places.js. It may be in a boolean property maybe.
After that point, if the result is FALSE (no tags) we must keep this cached result up-to-date, in case the user adds a tag later. We can use the already existing PlacesObserver (handleEvent) implementation in browser-places, and detect when the user is adding a tag, then flip the boolean.
This avoids roundtrip to the database every time the dialog is opened.

Assignee: nobody → klubana
Severity: -- → N/A
Priority: -- → P3
Pushed by dgottwald@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a529a3830f68 Hide tags field in the Star ("Bookmark this page") panel when the user has no tags. r=dao,mak
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Flags: qe-verify+

Confirming this enhancement is implemented on Firefox 116.0b2(build ID: 20230706193912) and Nightly 117.0a1(build ID: 20230707092800) on macOS 12, Windows 11, Ubuntu 22.

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

Attachment

General

Created:
Updated:
Size: