This patch adjusts the serialized json struct stored in 'browser.uiCustomization.state' in such a way as to intelligently insert the new securitylevel button and move the torbutton button beside it while keeping other user settings unchanged.
This patch tweaks the default toolbar layout so that the Downloads button appears to the right of the Security Level button to match the logic in the torbutton patch.
Toolbar layout now:
| Back | Forward | Refresh | URL Bar | Torbutton | Security Level | Downloads | Hamburger
Trac: Status: assigned to needs_review Keywords: TorBrowserTeam201903 deleted, TorBrowserTeam201903R added
This looks good and it seems to work. Kathy and I just found a few nits.
In the commit message:
s/to the right of/after/ (that way the commit message will be correct for RTL languages as well)
s/urlbar bar/url bar/
In the patch:
Should we preserve the #13378 (moved) comment? I think it might still be relevant but I did not look at the patch from that ticket.
Maybe rename placeButtonBesideUrlbar() to placeButtonAfterUrlBar() and add a blank line after its definition.
In or near the if urlbar isn't present comment, please mention that the UI does not allow users to remove the URL bar (which means we are very unlikely to end up putting our icons at the beginning of the toolbar).
In that same comment, I suggest s/front of/beginning of/
Trac: Status: needs_review to needs_revision Keywords: TorBrowserTeam201903R deleted, TorBrowserTeam201903 added
Thanks! I cherry-picked the browser patch and applied it as a fixup to the patch for #25658 (moved) as reordering the taskbar is somewhat orthogonal to intelligently inserting the buttons. The commit is commit 2825e7f974d50a6394b5a5196c2133c068d85286 on tor-browser-60.6.1esr-8.5-1.
The Torbutton patch got applied to Torbutton's master branch (commit d7595079a561fb36220a83e1d60ba9e6bab289e5).
Trac: Status: needs_review to closed Resolution: N/Ato fixed