desktop icon indicating copy to clipboard operation
desktop copied to clipboard

feat: Enable original extensions panel on hide-unified-extensions-button: false

Open blakegearin opened this issue 1 month ago • 1 comments

Summary

  • Updated ZenSiteDataPanel.sys.mjs to support multiple panels and pass relevant objects to browser-addons.js

  • Patched browser-addons.js to accept panel objects

  • Patched navigator-toolbox.js to get panel objects from window.gZenSiteDataPanel

  • Updated zen-single-components.css to conditionally hide extensions on unified panel

Screenshots

  • hide-unified-extensions-button: true

    image
  • hide-unified-extensions-button: false

    image image

Notes

  • Toggling hide-unified-extensions-button does require a browser restart to fully take effect and swich over. This is because the list of extensions are added on browser initialization. It does not appear browser/components/customizableui/CustomizableUI.sys.mjs is able to natively support adding and removing extensions from multiple areas

blakegearin avatar Nov 18 '25 05:11 blakegearin

Instead of choosing what panel should be used every time, we could just revert these changes if the preference is off: ... Or at least simply override it? gUnifiedExtensions._panel = ...

Yes, that's true. Effectively that's what setMainPanel was for, but that approach is cleaner. And we can safely remove the patches on get panel() which is a nice side effect

blakegearin avatar Nov 19 '25 08:11 blakegearin

Let me know once its finished for review @blakegearin

Please run npm run lint:fix as well and patches seems to fail importing? https://github.com/zen-browser/desktop/actions/runs/19818358014/job/56774645713?pr=11335

mr-cheffy avatar Dec 01 '25 09:12 mr-cheffy

@mr-cheffy Thanks. Should be good to go.

blakegearin avatar Dec 02 '25 02:12 blakegearin

Sorry for the delay, i'll review ASAP when im free

mr-cheffy avatar Dec 08 '25 09:12 mr-cheffy

No worries. Got the conflict resolved.

blakegearin avatar Dec 09 '25 04:12 blakegearin

https://github.com/user-attachments/assets/6f3bf13c-5c36-4d4f-a8a6-da73c49001ff

@blakegearin everything seems good, theres this issue that when opening, it opens it ontop of the button though

mr-cheffy avatar Dec 12 '25 10:12 mr-cheffy

@blakegearin everything seems good, theres this issue that when opening, it opens it ontop of the button though

Good catch. Thankfully it was a pretty easy fix.

blakegearin avatar Dec 15 '25 08:12 blakegearin