Shopping toolbar button
Categories
(Firefox :: Shopping, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox118 | --- | verified |
People
(Reporter: jhirsch, Assigned: fchasen)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fidefe-shopping])
Attachments
(1 file, 1 obsolete file)
This bug covers creating a shopping page action button.
If the shopping experience is enabled, that is, browser.shopping.experience2023.enabled
is true, then this button should appear in the URLBar when the user visits a supported product page.
If the shopping experience is disabled, that is, browser.shopping.experience2023.enabled
is false, we don't want to show the page action button at all.
There is a pref that tells us whether a user has opted in or out of the experience, browser.shopping.experience2023.optedIn
. (Note this is different from the browser.shopping.experience2023.enabled
pref, which simply puts a user in the experimental population that might be shown the experience.)
If the browser.shopping.experience2023.optedIn
pref value is false, then when the user visits a supported shopping page, we want to display the shopping page action button in an inactive state. (The sidebar will not pop open automatically in this case.)
If the browser.shopping.experience2023.optedIn
pref value is true, then when the user visits a supported product page, the page action button will be shown in an active state, and the sidebar will appear.
Whenever the user clicks the page action button, the browser.shopping.experience2023.optedIn
pref value should be flipped (note, this behavior may change in the next few days), and the button should toggle between active/inactive states.
Figma designs: https://www.figma.com/file/Wu4kaHSfKSQnzkym7qek3R/Shopping-Experience-MVP?type=design&node-id=67-23327&mode=design&t=VvOstFKWe7hwylJc-4
To notify your button component when the user arrives on a product page, you can make a call directly from either branch of the if (this._isProductPage)
conditional here, inside the onLocationChange listener.
Explicit non-goals for this bug:
- we don't yet have a final icon, so don't spend too much time styling the placeholder shopping cart svg; flipping a color is enough.
- after the page action button is clicked, the sidebar toggling behavior is still not fully signed off, but flipping the pref is a good enough guess for now.
Implementation notes:
To notify your button component when the user arrives on a product page, you can make a call directly from either branch of the if (this._isProductPage)
conditional here.
I would guess Gijs is the right person to review patches, as he's familiar with toolbar button code (I'm not sure if anyone else on the team is).
Updated•1 year ago
|
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
- Adds a urlbar button to toggle sidebar and show isProduct state
- ShoppingSidebarManager.toggleSidebar() method to open and close sidebar
- Add shopping cart svg
Assignee | ||
Comment 2•1 year ago
|
||
- Adds a urlbar button to toggle sidebar and show isProduct state
- ShoppingSidebarManager.toggleSidebar() method to open and close sidebar
- Add shopping cart svg
- Button only toggles sidebars in it's window
- Sidebar status is stick when opening new windows
- Sidebar status is saved to a pref for restoring
Updated•1 year ago
|
Updated•1 year ago
|
Comment 4•1 year ago
|
||
bugherder |
Comment 5•1 year ago
|
||
Verified as fixed in our latest 119.0a1 (2023-08-28).
Description
•