Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Add permanentNodeType property to BookmarkTreeNode #732

Open
oliverdunk opened this issue Dec 5, 2024 · 1 comment
Open

Proposal: Add permanentNodeType property to BookmarkTreeNode #732

oliverdunk opened this issue Dec 5, 2024 · 1 comment
Labels
neutral: firefox Not opposed or supportive from Firefox neutral: safari Not opposed or supportive from Safari supportive: chrome Supportive from Chrome

Comments

@oliverdunk
Copy link
Member

oliverdunk commented Dec 5, 2024

Proposal

Add a new permanentNodeType property to BookmarkTreeNode, with a new PermanentNodeType enum:

  • BOOKMARK_BAR
  • OTHER
  • MANAGED
  • MOBILE

This could be optional, or set to a NOT_PERMANENT / NONE value for other nodes.

Individual browser vendors could add additional variants to this enum.

Motivation

It is typical for browsers to have a number of permanent nodes at the top-level of the bookmarks tree.

For example, Chrome, Edge and Firefox all have a variation of the bookmarks bar concept.

Identifying these children is currently not possible in a robust way:

By ID

The IDs are not consistent between browsers:

  • These have numerical (albeit string) IDs in Chromium browsers
  • These have special IDs like "toolbar_____" in Firefox

Additionally, in Chromium based browsers the ID is normally predictable but can change in rare cases.

By name

The names are also not consistent and may change over time.

@github-actions github-actions bot added needs-triage: chrome Chrome needs to assess this issue for the first time needs-triage: firefox Firefox needs to assess this issue for the first time needs-triage: safari Safari needs to assess this issue for the first time labels Dec 5, 2024
@oliverdunk oliverdunk added supportive: chrome Supportive from Chrome and removed needs-triage: chrome Chrome needs to assess this issue for the first time labels Dec 5, 2024
@xeenon xeenon added neutral: safari Not opposed or supportive from Safari and removed needs-triage: safari Safari needs to assess this issue for the first time labels Dec 5, 2024
@Rob--W Rob--W added neutral: firefox Not opposed or supportive from Firefox and removed needs-triage: firefox Firefox needs to assess this issue for the first time labels Dec 5, 2024
@Rob--W
Copy link
Member

Rob--W commented Dec 24, 2024

Suggested name folderType instead of permanentNodeType, per discussion from the meeting:

[Issue 732](https://github.com/w3c/webextensions/issues/732): Proposal: Add `permanentNodeType` property to BookmarkTreeNode
* [oliver] The name we had in mind there was `systemNodeType`.
* [rob] Any opinions on the Safari side?
* [timothy] Don't know if system needs to be in the name if there's already a nodeType(?)
* [oliver] There's already a BookmarkTreeNode.type.
* [timothy] Maybe `nodePurpose`? Or maybe just `purpose` makes sense?
* [tomislav] Something like ownership may make more sense?
* [rob] What stops us from reusing nodeType and expanding the supported values?
* [oliver] It is still a folder. If you're building UI that wants to show different types of folders, you may want to change the icon based on the type, for example.
* [rob] Call it `folderType`, since only folders can have this?
* [oliver] Can't think of a reason not to.
* [timothy] I like that, feels nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
neutral: firefox Not opposed or supportive from Firefox neutral: safari Not opposed or supportive from Safari supportive: chrome Supportive from Chrome
Projects
None yet
Development

No branches or pull requests

3 participants