New issue
Advanced search Search tips

Issue 842856 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Extension toolbar button drawing logic is scattered

Project Member Reported by rdevlin....@chromium.org, May 14 2018

Issue description

Extension toolbar buttons contain an icon, an optional badge, and potentially "some additional state" (which could be pressed/hover decorations, a blocked action indication, etc).  Right now, the icon and badge are both handled by IconWithBadgeImageSource, while the button state is handled by the native UI elements.

The advantage to drawing icons in IconWithBadgeImageSource is that it is shared cross-platform, meaning we don't have to reimplement the same logic for Views platforms and Mac.  However, with the addition of the blocked actions decoration, we're now passing in more button state information, and likely that decoration should be drawn by the bubble instead.  We probably don't want to move *all* logic for icon drawing into the button UI elements, because it's rather complicated (depending on extension state, active tab, etc).  However, there should be a clean delineation.

For now, we can isolate all the drawing in IconWithBadgeImageSource, but we should consider pulling pieces (such as the blocked action decoration) out into the button itself.  Once MacViews ships for the toolbar, this will make even more sense (since we will again only have to implement once).
 
Components: Platform>Extensions UI>Browser
Labels: OS-Chrome OS-Mac OS-Windows

Sign in to add a comment