Add checks to the UrlbarResult constructor for each result type
Categories
(Firefox :: Address Bar, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox76 | --- | fixed |
People
(Reporter: adw, Assigned: adw)
References
Details
Attachments
(2 files)
It's probably a good idea to add checks to the UrlbarResult constructor to reject results that have missing or incorrect properties according to their types. For example, tip results need a type property. See discussion here: https://phabricator.services.mozilla.com/D62256#inline-379647
| Assignee | ||
Comment 1•6 years ago
|
||
Another point that's related to this came up in the data review in bug 1608461 comment 42. For tips, we have the urlbar.tips keyed scalar telemetry. When a tip's main button and help button are picked, UrlbarInput automatically increments the keys <type>-picked and <type>-help, where <type> is the tip's payload.type [1]. So if we add a new tip type, we're automatically adding new keys to this scalar and therefore we need an expanded data collection review.
So two things, which we can probably do in this bug:
- We should enforce that all
TIPresults have apayload.type(i.e., throw an error if one isn't given) - Wherever we end up enforcing that, we should also comment that adding new types automatically adds new keys to
urlbar.tipsand therefore requires expanded data collection review, as Tim requested in bug 1608461
[1] We should also probably automatically increment <type>-shown but we don't currently. The search tips and interventions providers manually do that. I'll file a bug.
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 3•6 years ago
|
||
| Assignee | ||
Comment 4•6 years ago
|
||
| Assignee | ||
Comment 5•6 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 6•5 years ago
|
||
Updated•5 years ago
|
| Assignee | ||
Comment 7•5 years ago
|
||
| Assignee | ||
Comment 8•5 years ago
|
||
| Assignee | ||
Comment 9•5 years ago
|
||
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/41590d1f096e
https://hg.mozilla.org/mozilla-central/rev/4f7300ad6e99
| Assignee | ||
Updated•5 years ago
|
Description
•