Add pref branch for introduction of new tools in the sidebar launcher
Categories
(Firefox :: Sidebar, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox138 | --- | fixed |
People
(Reporter: Gijs, Assigned: sclements)
References
Details
(Whiteboard: [fidefe-sidebar])
Attachments
(1 external file)
Right now the list of actions in the new launcher sidebar is configured via the sidebar.main.tools pref. We ship this with a given default value (at time of writing, aichat,syncedtabs,history). When users turn individual tools off using the "Customize sidebar" pane, the value of this pref changes, being a comma-separated list of the tools shown there.
Sidebars can be "invisible", based on the pref with which they are configured (which controls the sidebar.visible property which in turn controls the tool.hidden property). Such sidebars are included in the pref value when the user toggles other sidebar panes through the customize sidebar controls (even if/when there is no checkbox for the given sidebar in "customize sidebar"). In other words, on nightly by default the AI chat sidebar is not enabled, but if I check/uncheck history/bookmarks/synced tabs, the aichat value stays in sidebar.main.tools.
The discussion on phabricator was about whether we should add review checker to the list of sidebar panes given it is disabled right now.
There seem to be some conflicting requirements:
- of course under no circumstances do we want to overwrite user settings to hide a given item, once they are able to do so using the checkboxes in customize sidebar
- for 132 we'll want to use Nimbus to control the [default] value of this pref.
- we don't want each sidebar pane that we add (ai chat, review checker, contextual passwords) to have to write its own code to add the item "by default" for users who may have customized the visible sidebar tools items at the point where that sidebar is introduced.
It looks to me like right now the default already makes the "aichat" sidebar visible, and whether it is actually visible is controlled by the other pref (browser.ml.chat.enabled) feeding into sidebar.visible and/or tool.hidden.
ISTM that we probably want to do the same for review checker (RC), as this would basically guarantee that the item will be in the list for users, even if they customize the list, if/when we enable the RC sidebar for them, without requiring other/further work to do a "migration" or similar.
I'm curious if I'm missing a reason this is the wrong approach, or a way this interferes with Nimbus recipes.
More generally I'd be interested in suggestions that would make it easier for future consumers of the sidebar (thinking particularly of contextual password mgmt) to integrate without having to do "manual" migration work (which would be error-prone). Do we need Yet Another Pref, or something?
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
•
|
||
What was discussed and decided is to use a pref branch for each new tool, ie "CPM", "review-checker", etc and then use the Services.prefs.getChildList API to iterate over all prefs in the branch and add them to sidebar.main.tools once based on properties stored in the individual prefs. This will also allow the introduction of the tool to users by adding the pref in-tree or via nimbus for an experiment.
This bug will handle this part, but it only covers these use cases:
- Add a tool once to all users in-tree, which would apply even if multiple tools are added over several releases and an existing user later upgrades (ie, goes from 133 to 138).
- Alternatively, add a tool once to all users via nimbus, or via special targeting of only new profiles or only existing profiles
What it doesn't cover is for the bookmarks scenario, where Ania has asked for us to introduce it to new sidebar.revamp users - which may or may not be a new profile - but not to existing sidebar.revamp users. I think for this we'd want to take the approach outlined in my proposal to change how we use tools (default empty state rather than a fixed value that can't be changed), and do a migration. But I've filed a separate bug for that which can land independently of this since it solves the immediate need for Review Checker.
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 4•1 year ago
|
||
Backed out as requested by Sarah
Backout link: https://hg.mozilla.org/integration/autoland/rev/3bccc19e2a1cd35dfcbfc05500736dc84a09b913
Description
•