Open Bug 1825107 Opened 2 years ago Updated 9 months ago

preferenceValue, regexpMatch, and other FilterExpressions not well documented for targeting

Categories

(Firefox :: Messaging System, task, P2)

task

Tracking

()

People

(Reporter: dmosedale, Assigned: nsauermann)

References

(Blocks 2 open bugs)

Details

There are a bunch of Firefox-specific extensions to JEXL that one can use in targeting expressions, including preferenceValue, regexpMatch, and others that are very hard to discover.

The list is here:

https://searchfox.org/mozilla-central/rev/907db2c22743f1b24496198b10a3dca4085cfb08/toolkit/components/utils/FilterExpressions.sys.mjs#39-52

I'd suggest we document them (or link to a doc about them) from the top of https://firefox-source-docs.mozilla.org/browser/components/newtab/content-src/asrouter/docs/targeting-attributes.html#available-attributes, as I suspect at least preferenceValue is likely to come in handy helping someone run an experiment without having to wait for a train ride...

As part of this documentation, for preferenceValue in particular, we may want to write up the tradeoffs of using it vs exposing preferences as explicit targeting attributes (the latter exposes it to ASRouter devtools, which makes it more discoverable and gives it a more convenient way to reference).

Priority: -- → P2
Assignee: nobody → halemu

Would be nice to just improve the documentation for JEXL in general. This doc could benefit from a lot more detail and a more high-level overview of what JEXL is, and how we extend it.

Hanna, are you still planning to work on this by any chance?

Flags: needinfo?(halemu)
Blocks: fxms-docs
Assignee: halemu → nobody
Flags: needinfo?(halemu)

Sorry, this fell off my radar. Please feel free to take it on :)

No longer blocks: fxms-infra
Blocks: fxms-infra
Assignee: nobody → nsauermann
You need to log in before you can comment on or make changes to this bug.