Create a remotely configurable bookmarks bar button messaging surface
Categories
(Firefox :: Messaging System, enhancement, P1)
Tracking
()
People
(Reporter: mviar, Assigned: hanna_a)
References
(Blocks 4 open bugs)
Details
Attachments
(1 file)
This bug captures the on-train work required to support the Promote Firefox Features to Early Day Users experiment and future experimentation with a bookmark style buttons that can replace the existing default “Getting Started” bookmark in Release.
This will be a new surface in messaging system and should be remotely configurable (see Jira ticket for configurability and telemetry requirements).
For now, we can assume the button will only be added during first run. We’ll target new users in the initial experiment, but want the option to target existing users after upgrade in the future.
Bug 1877295 should be a helpful reference for adding a new toolbar button. In that bug, maybeAddSetupButton checks to see if the button should be added. For this use case, we’ll want logic that checks to see if there’s an ASRouter message targeting the user. sendTriggerMessage can be used to fire a new trigger and obtain a message (similar to how it’s used in Feature Callouts).
To make this surface more versatile, we can make use of the existing OPEN_URL special message action and plan to support other actions in the future.
We’ll also want to add a configurable option to remove the button after a user triggers the primary action. Typically, we use action: {dismiss: true}
to dismiss surfaces like FeatureCallout. I see a few options to explore here:
- We could check for
dismiss: true
in the message’s action (assuming it will also have a SMAtype
and any other fields required by the SMA). If present, we remove the button after that SMA is complete, similar to how we use “navigate” in about:welcome. - Explore using MULTI_ACTION and adding a special message action to remove the button.
- Adding something like a
remove_after_action
field to this surface’s schema.
Since this is a new surface, we’ll want to:
- Update the ASRouter source docs (see this Spotlight example)
- Add a new schema (Spotlight example)
- Add the surface to experimenter.info.
Reporter | ||
Updated•5 months ago
|
Reporter | ||
Updated•5 months ago
|
Reporter | ||
Comment 1•5 months ago
•
|
||
There is built in telemetry for toolbar widgets with browser.ui.interaction / BrowserUsageTelemetry. See docs on Scalars for more. Any changes will require data review. We can consider breaking telemetry out into its own bug.
For messaging system telemetry, we could use dispatchCFRMessage
. You can see this example where Spotlight receives dispatchCFRMessage
as the value of dispatch
from here in ASRouter for sending dismiss and impression telemetry.
Reporter | ||
Updated•5 months ago
|
Reporter | ||
Comment 2•5 months ago
•
|
||
Some follow up based on our discussion yesterday:
- Exposure
- As long as this is registered as a new feature in FeatureManifest.yaml, exposure should be recorded here in ASRouter's sendTriggerMessage.
- We will want to capture impressions for ASRouter to honor frequency caps
- Impression for Telemetry
- We can use an existing "added" event via browser.ui.interaction (see comments below).
- Data Review / Adding Telemetry
- If we ended needing any new telemetry, we can update TelemetryFeed.sys.mjs to include user events from the new surface. Searching the file for "infobar" provides a good example. See bug 1685525 for the accompanying data request for Infobar, similar to what will also be required for registering user events for this new surface.
- Dismiss/Remove events
We can record "DISMISS" events in a similar way to how recording impressions is described above (similar to here in Infobar).Alternatively, we may be able to use a "removed" event in browser.ui.interaction or add one.
- If we do go the route of updating browser.ui.interaction to capture the new events, there's an example data review request in this patch that might be useful for reference.
Reporter | ||
Comment 3•4 months ago
|
||
Hi :gijs, we're working on this new bookmarks toolbar button messaging surface. Basically, it's a configurable widget that looks like a bookmark but can be configured to perform special message actions on click.
We want to finalize our plans for telemetry to get data review for landing in 128 Nightly. I was looking through the browser.ui.interaction
events and while I found bookmarks_bar for capturing clicks, I didn't see existing probes to capture when an item is added or removed from the bookmarks bar. Am I correct these don't currently exist? And if so, do you see any issues with adding probes to capture these events?
We could stick with messaging system telemetry as described in my comment above, but it would be nice to keep the source of add/remove data consistent with what we're using to capture clicks.
Comment 4•4 months ago
|
||
(In reply to Meg Viar [:mviar] from comment #3)
Hi :gijs, we're working on this new bookmarks toolbar button messaging surface. Basically, it's a configurable widget that looks like a bookmark but can be configured to perform special message actions on click.
Sounds kind of like the import button? Be aware that there is special logic for what happens for an "empty" bookmarks toolbar that you may need to adapt. If you look for personal-toolbar-empty
that should lead you to it.
We want to finalize our plans for telemetry to get data review for landing in 128 Nightly. I was looking through the
browser.ui.interaction
events and while I found bookmarks_bar for capturing clicks, I didn't see existing probes to capture when an item is added or removed from the bookmarks bar. Am I correct these don't currently exist? And if so, do you see any issues with adding probes to capture these events?
browser.ui.customized_widgets
tracks both individual moves and what buttons are where, I think? Does that help? There's also some more recent glean telemetry mixed into BrowserUsageTelemetry that may be able to help, but I don't recall exactly what that covers and/or if it's nightly-only.
That is all assuming we're talking CustomizableUI toolbar widgets. For the bookmarks system itself (ie actual bookmarks), I don't know. But this also won't be a bookmark so at least initially I'm going to assume you mean the former. For the latter, you'd want to ask :mak, I expect...
Reporter | ||
Comment 5•4 months ago
•
|
||
Thanks, :gijs, that should do it! We'll look into using the existing browser.ui.customized_widgets telemetry.
Assignee | ||
Comment 6•4 months ago
|
||
Updated•4 months ago
|
Reporter | ||
Updated•4 months ago
|
Reporter | ||
Updated•4 months ago
|
Reporter | ||
Updated•4 months ago
|
Updated•4 months ago
|
Reporter | ||
Updated•4 months ago
|
Updated•4 months ago
|
Comment 8•3 months ago
|
||
Backed out for causing py3 failures on make-schemas.py
[task 2024-07-31T13:58:40.328Z] "MultiMessage": {
[task 2024-07-31T13:58:40.328Z] "description": "An object containing an array of messages.",
[task 2024-07-31T13:58:40.328Z] "type": "object",
[task 2024-07-31T13:58:40.328Z] "properties": {
[task 2024-07-31T13:58:40.328Z] "template": {
[task 2024-07-31T13:58:40.328Z] "type": "string",
[task 2024-07-31T13:58:40.328Z] "const": "multi"
[task 2024-07-31T13:58:40.328Z] },
[task 2024-07-31T13:58:40.328Z] "messages": {
[task 2024-07-31T13:58:40.328Z] "type": "array",
[task 2024-07-31T13:58:40.328Z] "description": "An array of messages.",
[task 2024-07-31T13:58:40.328Z] "items": {
[task 2024-07-31T13:58:40.328Z] "$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/TemplatedMessage"
[task 2024-07-31T13:58:40.328Z] }
[task 2024-07-31T13:58:40.328Z] }
[task 2024-07-31T13:58:40.328Z] },
[task 2024-07-31T13:58:40.328Z] "required": [
[task 2024-07-31T13:58:40.328Z] "template",
[task 2024-07-31T13:58:40.328Z] "messages"
[task 2024-07-31T13:58:40.328Z] ]
[task 2024-07-31T13:58:40.328Z] }
[task 2024-07-31T13:58:40.328Z] }
[task 2024-07-31T13:58:40.328Z] }
[task 2024-07-31T13:58:40.328Z]
[task 2024-07-31T13:58:40.328Z]
[task 2024-07-31T13:58:40.328Z] Traceback (most recent call last):
[task 2024-07-31T13:58:40.328Z] File "make-schemas.py", line 472, in <module>
[task 2024-07-31T13:58:40.328Z] main(args.check)
[task 2024-07-31T13:58:40.328Z] File "make-schemas.py", line 453, in main
[task 2024-07-31T13:58:40.328Z] check_diff(schema_def, schema)
[task 2024-07-31T13:58:40.328Z] File "make-schemas.py", line 405, in check_diff
[task 2024-07-31T13:58:40.328Z] raise ValueError("Schemas do not match!")
[task 2024-07-31T13:58:40.328Z] ValueError: Schemas do not match!
[task 2024-07-31T13:58:40.328Z] Creating default state directory: /builds/worker/.mozbuild
[task 2024-07-31T13:58:40.328Z] Creating local state directory: /builds/worker/.mozbuild/srcdirs/gecko-8a5b87fe5d69
[taskcluster 2024-07-31 13:58:41.237Z] === Task Finished ===
[taskcluster 2024-07-31 13:58:41.237Z] Unsuccessful task run with exit code: 1 completed in 263.565 seconds
Assignee | ||
Comment 9•3 months ago
|
||
Thanks, fixed schema errors. Will try landing again.
Comment 10•3 months ago
|
||
Comment 11•3 months ago
|
||
bugherder |
Assignee | ||
Updated•3 months ago
|
Assignee | ||
Comment 12•3 months ago
|
||
Hi @Marius, Just bringing this feature to your attention. It has landed in 130, and adds a new experimenter feature config fxms_bmb_button. Let us know if you have questions while creating a test plan, thanks!
Comment 13•3 months ago
|
||
Hi, Hanna!
Thanks for bringing this feature config to our attention! We really appreciate this because we don’t have to search ourselves for actionable new feature configs in the FeatureManifest.
That being said, we will create a Jira ticket that will contain all the information as soon as our bandwidth allows and tag you there.
Updated•3 months ago
|
Description
•