Make Screenshots use the WebExtensions page action API




2 years ago
11 months ago


(Reporter: adw, Unassigned)


Firefox Tracking Flags

(Not tracked)




2 years ago
Once bug 1395387 lands, which will hook up WebExtensions page actions with the new Photon page actions, we should replace the hoops that Screenshots has to jump through in order to use a Photon page action with simply using the WebExtensions page action API.

Comment 1

2 years ago
Screenshots uses those special hooks to place itself in the menu between "Report Site Issue..." and "Send to Device". Not sure the WebExtension API will allow that/or whether we still want that behaviour.

Comment 2

2 years ago
Ah yeah, I forgot about that.  It would be a shame not to use the real API though just for that reason.  I remember someone talking very recently about a new ability for Mozilla-signed extensions to use private API.  Maybe we could use that here.  Or at the very least we could just build special-casing of Screenshots into the Photon page action implementation.
We always like to move stuff out of bootstrap.js when we can. The stability of maintaining order in the interface always seems tricky. Special-casing the placement of the Screenshots menu listing seems like the least-bad solution to that.
Flags: needinfo?(jgruen)

Comment 4

2 years ago
:adw is there a ux spec for how webextensions will look in the page action menu relative to native stuff?
Flags: needinfo?(jgruen) → needinfo?(adw)

Comment 5

2 years ago
No, but they behave like the built-in actions.  They appear in the "..." panel, at the bottom, ordered alphabetically.  The user can pin them to the urlbar just like they can with the built-in actions.  Ideally they would *look* similar to the built-in actions, but right now that's tricky because all the built-in actions use svg icons and a particular feature of svg icons that's only available to Mozilla-signed extensions and the browser itself.

I did notice though that the starred screenshots svg icon uses color, while none of the built-in action icons do.

Aaron Benson is the UX person for page actions.  He would be able to better answer UX questions than I would.
Flags: needinfo?(adw)

Comment 6

2 years ago
(In reply to [:jgruen] from comment #4)
> :adw is there a ux spec for how webextensions will look in the page action
> menu relative to native stuff?

Aaron subsequently posted this new mockup over in bug 1413574.  I'll post it here too in case it helps.  It shows actions from extensions.

Comment 7

2 years ago
(I should point out though that we're treating screenshots as a "native" or built-in action, not a third-party/extension action.)

Comment 8

2 years ago
The color svg icon mentioned in comment #5 has been removed with

Comment 9

Last year
There's a patch for this in Bug 1466575.

Comment 10

11 months ago
Bug 1466575 has landed.  Now the Screenshots button is in the alpha-sorted list of WebExtension page actions in the "..." panel (and appears in the address bar by default).

Is there a way to place the Screenshots button back among the built-in actions?

:adw or :ntim?

Comment 11

11 months ago
I'll mark this as a dupe of the other bug and comment there.
Closed: 11 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1466575
You need to log in before you can comment on or make changes to this bug.