Closed Bug 1699227 Opened 2 months ago Closed 2 months ago

Support negative suggestedIndex values to allow indexes to be specified from the end of the list of results

Categories

(Firefox :: Address Bar, enhancement, P3)

enhancement
Points:
3

Tracking

()

RESOLVED FIXED
89 Branch
Iteration:
89.1 - Mar 22 - Apr 4
Tracking Status
firefox89 --- fixed

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(1 file)

It would be nice if suggestedIndex == -1 meant that the result should always be last, -2 meant it should be the second to last, etc. With quick suggest, it should always be last, so currently we have to use UrlbarPrefs.get("maxRichResults") - 1. (We should be using queryContext.maxResults - 1...) IIRC Dale assumed/thought that -1 would work, for example.

Not a big deal, more of a nice to have. One concern is that suggestedIndex == -1 currently means "no suggested index," so we'd have to change that and potentially update a bunch of tests, but that might not be so hard if we can mostly just update head.js to change the default "no suggested index" value.

This is more than just a nice-to-have. Given the result span problem described in bug 1699211 and bug 1699607, there's no way for quick suggest to accurately specify the last index as its suggested index.

Assignee: nobody → adw
Status: NEW → ASSIGNED
Iteration: --- → 89.1 - Mar 22 - Apr 4

Given the result span problem described in bug 1699211 and bug 1699607,
currently there's no way for quick suggest to accurately specify the last index
as its suggested index.

See Also: → 1699607
Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/73f5ef5cab35
Support negative suggestedIndex values to allow indexes to be specified from the end of the list of urlbar results. r=mak
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in before you can comment on or make changes to this bug.