Closed Bug 1846044 Opened 1 year ago Closed 1 year ago

Shopping sidebar auto-open behavior: set up trigger and targeting, and make sure the open state doesn't persist between sessions

Categories

(Firefox :: Messaging System, task, P1)

task
Points:
7

Tracking

()

RESOLVED FIXED
119 Branch
Iteration:
119.1 - Aug 28 - Sept 8
Tracking Status
firefox119 --- fixed

People

(Reporter: aminomancer, Assigned: aminomancer)

References

(Blocks 1 open bug)

Details

(Whiteboard: [omc])

Attachments

(1 file)

This bug is about cementing the logic for opening the sidebar automatically. The first auto-open is when landing on a PDP for the first time. The second auto-open will use the same trigger, but it must have been 24 hours since the first auto-open, and it must be a new session.

There's also a new update about what exactly auto-opening does — when auto-opening, the global sidebar "open" state should not persist between sessions. In other words, when restarting, if the sidebar was open in the last session, it should only start open in the new session if the user toggled it intentionally (i.e., don't start open if we auto-opened it for the user).

Let's investigate how we can implement the change to the planned auto-opening behavior for the shopping sidebar. Here's some more context about the change. We discussed this with Verdi and Najla in a meeting about onboarding requirements. Here were the original requirements:

  1. Landing on a PDP page on Amazon, Best Buy or Walmart for the first time opens the sidebar automatically with the onboarding message.
  2. The sidebar opens automatically with the onboarding message If a non-opted in user lands on a PDP page and it’s been at least 24 hours since they first saw the onboarding message in the sidebar AND it’s a new session. This is the second time that they will see the onboarding message in the sidebar.

So my understanding is that we only want to auto-open the sidebar 1) in the first session, and 2) in subsequent sessions if 24 hours has passed. But as currently implemented, when we open the sidebar, don't we flip a global toggle that persists across sessions? So if the user doesn't close the sidebar in the first session, but simply ignores it, then restarts Firefox, will the sidebar state be restored by pref, causing it to be opened on PDPs even if 24 hours hasn't passed?

Verdi suggested it might be annoying for users who don't use many tabs, but just open Firefox, use a single tab, then quit Firefox when they're done. Since they could open Firefox, see a PDP, see the sidebar auto-open, then quit Firefox, restart, and immediately see the sidebar again. So we agreed it would be best if the sidebar's global enabled/open state only persists between sessions if the user intentionally toggled it themselves. When we auto-open the sidebar for the user, can we show it 1) only on that one PDP tab? or 2) only in that particular session?

The new requirements were added to this draft and to the Shopping Onboarding MVP Figma spec:

The sidebar opens automatically displaying the onboarding components. It sets a global toggle that enables the shopping sidebar in every tab (though the sidebar won’t be visible except on PDPs).

However, this toggle should not persist across restarts unless the user chose to opt-in. This prevents a possible conflict where the user restores sessions after ignoring the opt-in message, and we attempt to trigger the sidebar at the same time that its “open” state is restored.

Instead, we avoid restoring the “open” state.

The auto-open behavior occurs a max of 2 times.

ni? Jared, since the persistence change might be more in frontend's wheelhouse at the moment.

Thanks!

Flags: needinfo?(jhirsch)
Iteration: --- → 118.1 - July 31 - Aug 11
Priority: -- → P1
Assignee: nobody → shughes
Status: NEW → ASSIGNED

If the user has not opted in, auto-open the sidebar if...

  1. The sidebar has not already been auto-opened twice
  2. The last auto-open was at least 24 hours ago
  3. The last auto-open happened in a different session
Flags: needinfo?(jhirsch)
Points: --- → 8
Points: 8 → 7
See Also: → 1848058
Iteration: 118.1 - July 31 - Aug 11 → 118.2 - Aug 14 - Aug 25
Attachment #9346596 - Attachment description: Bug 1846044 - Implement Shopping Sidebar auto-open behavior. r=#shopping-reviewers,#omc-reviewers → Bug 1846044 - Implement Shopping Sidebar auto-activation behavior. r=#shopping-reviewers,#omc-reviewers
Blocks: 1842071
Iteration: 118.2 - Aug 14 - Aug 25 → 119.1 - Aug 28 - Sept 8
Pushed by shughes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ebcc4c4cd64e Implement Shopping Sidebar auto-activation behavior. r=shopping-reviewers,omc-reviewers,jhirsch,Mardak
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: