Open
Bug 1945688
Opened 14 days ago
Updated 5 days ago
Add a setting to auto-close RC panel when leaving supported domains and PDPs
Categories
(Firefox :: Shopping, task, P2)
Firefox
Shopping
Tracking
()
NEW
People
(Reporter: kpatenio, Assigned: rking)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fidefe-RCSidebar])
Setting: Keep RC open on all pages of supported domains. Close RC when a user leaves the supported domain
Rationale: Conserve users’ screen real estate and avoid the negative impact on RC retention that a persistent panel might cause.
User story
As a user, I want to access RC quickly while shopping and experience minimum disruption when I switch to other tasks.
Acceptance criteria
- The RC panel remains open as long as I navigate around the eligible domains, both on PDP and non-PDP pages, displaying review analysis and empty RC panel state, respectively.
- RC panel closes automatically once I leave the eligible domain (default behavior of the panel).
- I can choose to turn off auto-close behavior in RC panel settings. Turning it off results in the following behavior:
- RC panel never closes automatically, staying open on all webpages on all domains, until I proactively close it.
Implementation notes
- We need a new pref similar to existing toggle settings like
autoOpen.userEnabled
.- Note:
autoOpen.enabled
is treated like a "feature flag" - it will show / hide the auto-open toggle since it was previously an experiment. At the moment, I'm unsure if we want an equivalent pref for auto-close; I'm leaning towards yes, but it's best to confirm with the team.
- Note:
- We need a new toggle in settings.mjs and a new string for its label
- We should add tests to ensure it auto-closes when the toggle is enabled and doesn't if the toggle is disabled
- We want to add logic that allows for auto-closing on non PDPs. More details below.
onLocationChange
- While we're guaranteed to hit ReviewCheckerParent's onLocation on page navigation, I'm thinking that it may be better to look at ReviewCheckerManager's onLocation
- ReviewCheckerManager is responsible for auto-opening the RC panel if we're able to do so.
- Therefore, the manager class seems to be suitable for auto-closing too. We will have to check if
ShoppingProduct.isProductURL
and ShoppingProduct.isSupportedSiteURL are false.- If both are false, then we are viewing a non PDP on an unsupported site (ex. wikipedia.org). We can call ReviewChecker.hideSidebar to hide the RC panel if it is visible.
Open questions
- Do we want new Glean metrics specific to auto-close?
- Do we want any new callouts related to auto-close?
Severity: -- → N/A
Priority: -- → P2
Whiteboard: [fidefe-RCSidebar]
Updated•14 days ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•