Closed Bug 1654862 Opened 11 months ago Closed 10 months ago

Show suggestions for the empty query when in search mode

Categories

(Firefox :: Address Bar, enhancement, P2)

enhancement
Points:
3

Tracking

()

VERIFIED FIXED
81 Branch
Iteration:
81.1 - July 27 - Aug 09
Tracking Status
firefox81 --- verified

People

(Reporter: harry, Assigned: mak)

References

Details

Attachments

(3 files, 1 obsolete file)

We should show suggestions when the input is empty but the user is in search mode. A user might get in this scenario by selecting a one-off with an empty input or when pressing Accel+K.

Product would like us to look into showing trending searches, but this will require collaboration with Google and some UX work. In the meantime, we can show maxRichResults form history results. This could also be what we show for non-Google engines.

We should only show form history for searches made with the current search mode engine.

Severity: -- → S3
Priority: -- → P2

Currently form history is per input field, not per engine, so this apparently requires redesigning form history, that is quite expensive.

A possible workaround here may be on search store form history both in searchbar-history and in searchbar-history-engineName, then use the latter for empty searches, while the former will continue ensuring search history is shared across fields. In the future if we want to completely sandbox search history we can just stop using the old one.

another alternative may be to modify FormHistory to get an optional descriptor object when it's updated, containing whatever we want. New versions could know how to retried and parse that, while old versions would ignore it. This may be a bit more complex to implement (schema migration and filtering in the search controller), but likely would be more future proof.

It sounds like I just volunteered to pick this.

Assignee: nobody → mak
Status: NEW → ASSIGNED
Iteration: --- → 81.1 - July 27 - Aug 09
Points: 3 → 5

(In reply to Marco Bonardo [:mak] from comment #3)

another alternative may be to modify FormHistory to get an optional descriptor object when it's updated, containing whatever we want.

I vote for this fwiw. :-) But maybe we shouldn't try to overgeneralize -- just store the engine instead of a general object?

Also, addressing the other part of this, form history has its own frecency and we could sort by that and show the top maxRichResults (for the given engine).

(In reply to Drew Willcoxon :adw from comment #5)

(In reply to Marco Bonardo [:mak] from comment #3)

another alternative may be to modify FormHistory to get an optional descriptor object when it's updated, containing whatever we want.

I vote for this fwiw. :-) But maybe we shouldn't try to overgeneralize -- just store the engine instead of a general object?

I'm actually adding a moz_sources table that can contain strings, the string can be the engine name of course. This stays "searchable".

Also, addressing the other part of this, form history has its own frecency and we could sort by that and show the top maxRichResults (for the given engine).

I think that already happens automatically, but anyway I agree.

Depends on: 1656348
Points: 5 → 3

Add an optional source property for FormHistory that can be defined when bumping,
removing of querying values.
This can be used by consumers to partition FormHistory based on specific sources,
for example the name of the engine used to execute the search.

Comment on attachment 9167176 [details]
Bug 1654862 - Show suggestions for the empty query when in search mode. r=adw

Revision D85489 was moved to bug 1656348. Setting attachment 9167176 [details] to obsolete.

Attachment #9167176 - Attachment is obsolete: true
Depends on: 1657211
Depends on: 1657572
Blocks: 1657648
Blocks: 1657918
Attachment #9168790 - Attachment description: Bug 1654862 - Show suggestions for the empty query when in search mode. → Bug 1654862 - Show suggestions for the empty query when in search mode. r=adw

Depends on D86355

Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b9a3af079f0e
Show suggestions for the empty query when in search mode. r=adw
https://hg.mozilla.org/integration/autoland/rev/83b89001fa0c
Tests. r=adw

I autolanded the first two patches since Marco will be away for a bit; adding leave-open until part 3 lands.

Keywords: leave-open
Regressions: 1658330
No longer regressions: 1658330
Keywords: leave-open
Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1ae21b324796
Use a property bag instead of abusing searchParams. r=MattN
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

I verified this issue using 82.0a1 (2020-09-14) on macOS 10.13 and Windows 10 x64.
Adrian could you help me with Ubuntu verification?

Flags: needinfo?(adrian.florinescu)

Verified as fixed under Ubuntu 18.04 64-bit using Firefox 81RC (with update2 prefs enabled) and latest Nightly 82.0a1.

Status: RESOLVED → VERIFIED
Flags: needinfo?(adrian.florinescu)
You need to log in before you can comment on or make changes to this bug.