Open Bug 1915440 Opened 2 years ago Updated 21 days ago

Reordered list of tools does not persist after browser restart

Categories

(Firefox :: Sidebar, defect, P2)

defect

Tracking

()

ASSIGNED

People

(Reporter: jsudiaman, Assigned: sclements)

References

Details

(Whiteboard: [fidefe-sidebar])

Steps to Reproduce

  1. Enabled the revamped sidebar in Firefox Labs.
  2. Click the gear icon to open the Customize panel.
  3. Disable one of the tools, except the last one.
  4. Re-enable the same tool.
  5. Restart Firefox.

Expected Results

  • After Step 4, the tool is added to the bottom of the sidebar.
  • After Step 5, the tools are ordered in the same way they were in the previous step.

Actual Result

  • After Step 4, the tool is added to the bottom of the sidebar. (This is correct.)
  • After Step 5, the tool ordering is reset.

Visibility settings persist as expected.

Whiteboard: [fidefe-sidebar]
Severity: -- → S3
Priority: -- → P3

Bug 1944719 adds the ability to disable/re-enable sidebar extensions, which also exhibits the bug described here.

Relevant review comment: https://phabricator.services.mozilla.com/D249433#anchor-inline-1403375
at the following lines: https://searchfox.org/mozilla-central/rev/c329cccde3e1e6f5d71d87c62b3db7e9f5fecb3c/browser/components/sidebar/browser-sidebar.js#1509-1513

This logic should be in the refreshTools() method, otherwise the item will only be moved to the end in the current window and not others. If you move this logic there, it is not strictly necessary to also have the logic here, because the updateToolsPref call below updates the sidebar.main.tools pref, which will trigger the preference change listener that calls refreshTools.

STR:

  1. Install 2 sidebar extensions.
  2. Open a second window. (make sure that the sidebar settings are visible in both).
  3. In the second window, uncheck and re-check the first extension menu item.

Expected:

  • The re-enabled extension item should be in the same locations.

Actual:

  • Current window: appended at end.
  • Other window: shown wherever it previously was.

When this bug is resolved, it would be nice to have unit tests for this scenario, and otherwise at least verify manually that this scenario works.

See Also: → 1944719
Assignee: nobody → sclements
Status: NEW → ASSIGNED
Priority: P3 → P2
You need to log in before you can comment on or make changes to this bug.