Closed Bug 1965130 Opened 9 days ago Closed 6 days ago

Improve JSDoc for ActionsResult

Categories

(Firefox :: Address Bar, task, P3)

task

Tracking

()

RESOLVED FIXED
140 Branch
Tracking Status
firefox140 --- fixed

People

(Reporter: sthompson, Assigned: sthompson)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The ActionsResult class bundles up the data about a single result from an ActionsProvider. It's a simple bag of data but it would still be helpful to have type hints about the data types.

While writing tests for ActionsProviderTabGroups, I found it challenging to parse through an array of UrlbarResult to identify whether that actions provider actually provided anything, let alone which results it provided. I noticed that the ActionsResult class has a providerName but it's never set. I expect the intention was to have a system like how Query.add sets a providerName on the UrlbarResult. I think it would be very useful to have that on each ActionsResult, so ProviderGlobalActions.startQuery could perform that role.

Defines and/or updates JSDoc types on all ActionsResult properties.

The pre-existing property ActionsResult.providerName never gets set. Query.add sets a providerName on UrlbarResult objects, so to follow that pattern, I made ProviderGlobalActions.startQuery responsible for setting providerName on already constructed ActionsResult instances. Having the provider name available for actions results will make it easier for tests to find relevant actions results within search results.

Assignee: nobody → sthompson
Status: NEW → ASSIGNED
Blocks: 1964610
Severity: -- → N/A
Type: enhancement → task
Component: Search → Address Bar
Priority: P5 → P3
Pushed by sthompson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b52e774f82d5 set JSDoc types and providerName for ActionsResult r=urlbar-reviewers,Standard8
Status: ASSIGNED → RESOLVED
Closed: 6 days ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: