Closed Bug 1801266 Opened 1 year ago Closed 1 year ago

Handle the case where an extension widget is not visible and not in the unified extensions panel

Categories

(WebExtensions :: General, enhancement, P2)

enhancement

Tracking

(firefox114 verified)

VERIFIED FIXED
114 Branch
Tracking Status
firefox114 --- verified

People

(Reporter: willdurand, Assigned: willdurand)

References

(Blocks 1 open bug)

Details

(Whiteboard: [addons-jira])

Attachments

(4 files, 1 obsolete file)

This is about situations where extension widgets are not visible and are not in the extensions panel either... This can happen when we place a widget in the bookmark toolbar and then we hide this toolbar.

Severity: -- → N/A
Priority: -- → P2

Notably, this can also happen if items are placed in the menubar on Windows or Linux. The menubar can be collapsed, or "autohide" so that it's only visible after pressing "Alt".

Assignee: nobody → mconley
Attachment #9305167 - Attachment description: WIP: Bug 1801266 - Have gUnifiedExtensions.getActiveExtensions handle toolbar collapse states. r?willdurand! → Bug 1801266 - Add CustomizableUI.getCollapsedToolbarIds. r?sclements!,gijs!
Status: NEW → ASSIGNED
Attachment #9305167 - Attachment is obsolete: true

:mconley since we could theoretically "detect" extensions hidden in collapsed toolbars, could we "move" these invisible extensions like we do for overflowed extensions? (on window resize)

Flags: needinfo?(mconley)

In theory, yes - we could temporarily move these items in the addons panel when the toolbar is collapsed, and back out again when the toolbar is expanded.

Flags: needinfo?(mconley)
Attachment #9305167 - Attachment is obsolete: false
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a1d8c2a320cb
Add CustomizableUI.getCollapsedToolbarIds. r=sclements,Gijs
Attachment #9305643 - Attachment is obsolete: true

I think at this point, willdurand is working on this more than I am, so transferring ownership. Let me know if I got this wrong!

Assignee: mconley → wdurand
Attachment #9315345 - Attachment description: Bug 1801266 - Handle the case where an extension widget is not visible and not in the extensions panel. r?mconley! → Bug 1801266 - Handle the case where an extension widget is not visible and not in the extensions panel. r?mconley!,rpl!
Pushed by wdurand@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e70d87ebbc19
Handle the case where an extension widget is not visible and not in the extensions panel. r=mconley,rpl
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Keywords: leave-open
Resolution: --- → FIXED
Version: unspecified → Firefox 114
Target Milestone: --- → 114 Branch
Version: Firefox 114 → unspecified

Verified as Fixed on the latest Nightly (114.0a1/20230419214510) under Windows 10 x64 and macOS 11.3.1, with regards to the moving of the extension widget from a toolbar to the extensions panel and vice versa when the toolbar is hidden/displayed.

As such, placing an extension widget in the bookmarks toolbar, for example, and then hiding the toolbar will return the extension widget to the unified extensions panel. Making the bookmarks toolbar visible again will remove the extension widget from the unified extensions panel and return it to the toolbar.

Note that to do so, I had to first pin the widget to the toolbar via the “Pin to Toolbar” option so I could then move it to the bookmarks toolbar via the “Customize Toolbar…” option.

For more details, see the attached video.

I will mark the issue as Verified Fixed for the above aspect of the enhancement, but please see the details below.

There seems to be a small issue with the “Pin to Toolbar” option when having an extension widget in the extensions panel after having hidden the bookmarks toolbar in which the widget has been previously placed.

Steps to reproduce:

  1. Install an extension with a widget.
  • The extension widget will be, by default, placed in the extensions panel
  1. Pin the extension widget to the toolbar via the “Pin to Toolbar” option from either the right click context menu of the extension entry in the extensions panel or via the cog menu.
  • At this point the extension widget is on the toolbar and the “Pin to Toolbar” option from the menu displayed when right clicking the widget on the toolbar is marked with a check mark (signaling the setting is enabled which will be important in the next steps)
  1. Make the bookmarks toolbar visible via right clicking the toolbar and selecting “Always Show” from the “Bookmarks Toolbar” sub-menu.

  2. Access the “Customize Nightly” page via right clicking the toolbar and selecting “Customize Toolbar…”. Move the extension widget from its position on the toolbar to the bookmarks toolbar. Close the “Customize Nightly” page.

  • At this point, the extension widget is on the bookmarks toolbar.
  • The “Pin to Toolbar” option from the menu displayed when right clicking the widget on the bookmarks toolbar is still marked with a check mark (signaling the setting is still enabled)
  1. Hide the bookmarks toolbar
  • The extension widget will now be moved to the extensions panel as expected
  • The “Pin to Toolbar” option for the extension in the extensions panel is still marked with a check mark signaling that the option is still enabled. Basically, the extension widget is both in the extensions panel and still pinned to the toolbar.
  1. Unpin the extension from the toolbar via the cog menu from the extensions panel
  • The extension widget remains in the extensions panel
  • The “Pin to Toolbar” option is no longer marked with a check mark
  1. Pin the extension to the toolbar via the cog menu from the extensions panel
  • The extension widget is moved to the toolbar
  • The “Pin to Toolbar” option is again marked with a check mark

I would have expected to make the widget return to the toolbar (its original position before having it moved to the bookmarks toolbar) via pinning with one single action instead of two i.e. I think that at Step (5) above, the “Pin to Toolbar” option should have been unchecked as the widget has been moved in the extensions panel.

See the attached video for more details.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: