Closed Bug 1901261 (bookmark-button-surface) Opened 5 months ago Closed 3 months ago

Create a remotely configurable bookmarks bar button messaging surface

Categories

(Firefox :: Messaging System, enhancement, P1)

Firefox 129
enhancement
Points:
8

Tracking

()

RESOLVED FIXED
129 Branch
Iteration:
130.2 - Jul 22 - Aug 2
Tracking Status
firefox129 --- wontfix
firefox130 --- fixed

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.

Tech doc draft


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 SMA type 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:

Alias: bookmark-button-surface
Iteration: --- → 129.1 - Jun 10 - Jun 21
Target Milestone: --- → 129 Branch
Blocks: 1899360
Blocks: 1901266
Assignee: nobody → halemu
Points: --- → 8
Priority: -- → P1

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.

Iteration: 129.1 - Jun 10 - Jun 21 → 129.2 - Jun 24 - Jul 5

Some follow up based on our discussion yesterday:

  • Exposure
  • 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.
Blocks: 1904630

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.

Flags: needinfo?(gijskruitbosch+bugs)

(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...

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(mviar)

Thanks, :gijs, that should do it! We'll look into using the existing browser.ui.customized_widgets telemetry.

Flags: needinfo?(mviar)
Attachment #9410234 - Attachment description: WIP: Bug 1901261 - Create a remotely configurable bookmarks bar button messaging surface → Bug 1901261 - Create a remotely configurable bookmarks bar button messaging surface r=mviar
Iteration: 129.2 - Jun 24 - Jul 5 → 130.1 - Jul 8 - Jul 19
No longer blocks: 1904630
Depends on: 1904630
Blocks: bugzy-epic
Blocks: 1908927
Blocks: 1908932
Attachment #9410234 - Attachment description: Bug 1901261 - Create a remotely configurable bookmarks bar button messaging surface r=mviar → WIP: Bug 1901261 - Create a remotely configurable bookmarks bar button messaging surface r=mviar
Iteration: 130.1 - Jul 8 - Jul 19 → 130.2 - Jul 22 - Aug 2
Attachment #9410234 - Attachment description: WIP: Bug 1901261 - Create a remotely configurable bookmarks bar button messaging surface r=mviar → Bug 1901261 - Create a remotely configurable bookmarks bar button messaging surface r=mviar
Blocks: 1910641
Pushed by halemu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8e5aa4b063cc Create a remotely configurable bookmarks bar button messaging surface r=mviar,desktop-theme-reviewers,omc-reviewers

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
Flags: needinfo?(halemu)

Thanks, fixed schema errors. Will try landing again.

Flags: needinfo?(halemu)
Pushed by halemu@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aa647a9d0753 Create a remotely configurable bookmarks bar button messaging surface r=mviar,desktop-theme-reviewers,omc-reviewers
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Flags: qe-verify+

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!

Flags: needinfo?(mcoman)

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.

Flags: needinfo?(mcoman)
Blocks: 1919061
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: