Closed Bug 1569020 Opened 5 years ago Closed 5 years ago

Add new template for showing Moments pages

Categories

(Firefox :: Messaging System, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 70
Iteration:
70.2 - Jul 22 - Aug 4
Tracking Status
firefox69 --- fixed
firefox70 --- fixed

People

(Reporter: Mardak, Assigned: andreio)

References

Details

(Keywords: github-merged)

Attachments

(1 file)

Looks like a Moment is a combination of targeting, a url to show, and an optional expiration. This would use the startup page opening functionality from bug 1568692, e.g., browser.startup.homepage_override.once = { expire: 123, url: "https://www.mozilla.org" }

Perhaps one difference from other router messages is that this is somewhat delayed trigger in that it prepares the next startup to show something instead of immediately, so not sure if that causes issues with picking messages to "show" and not overwriting a previous yet-to-be-shown Moment.

andreio, I'm guessing this should be similar to adding feature badge message in bug 1561536 / https://github.com/mozilla/activity-stream/pull/5133 ? Anything notable to watch out for when adding?

Anything special for enterprise? Just expose a provider that can be disabled by pref?

Flags: needinfo?(andrei.br92)

It's not clear to me what would trigger this action. Right now all messages are a result of a user action (location change, click) or browser event (startup). Depending on when we set this up there might not be an issue with picking a message to show.

One idea for badging was to add a mechanism similar to SYSTEM_TICK where we check for new messages outside of user actions.

This message sounds to be something that we want to guarantee happens so maybe we just make an extra call as part of ASRouter initialization. Depending on the message provider we might not want to add an impression (because it will affect frequency caps) and simply block after taking the action.

Flags: needinfo?(andrei.br92)

andreio, could you take this? I'll be out later this week, and we'll want probably want this to land sooner for extra QA of startup triggers with bug 1568692. That bug was implemented (not yet landed) in the context of not slowing down startup as well as it being synchronous code. So that's why it checks a pref without waiting for router / message initialization.

I believe Kate thought the SYSTEM_TICK idea should be good because even though something could be triggered by remote settings updating, that isn't sufficient as local state / time changes that then could trigger a startup page.

For the initial implementation, it probably is sufficient to just treat a message as shown when setting the .once pref. Further down the line(??), we might want to stash something like a message id in the json so that router can "undo" a startup page that no longer should be shown -- either a it got preempted by a more important message or its condition no longer is satisfied (e.g., show a startup page for a user who hasn't logged in to FxA but the user logged in after setting the .once pref but before the next startup).

I don't have example messages, but they seem to be of 2 main types:

  • profile age, e.g., anniversary. show page once within a week of the anniversary
  • date based, e.g., privacy day. show page once within a day of the event
Assignee: edilee → andrei.br92
Iteration: --- → 70.2 - Jul 22 - Aug 4
Blocks: 1570745
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: