Cache the top sites query context
Categories
(Firefox :: Address Bar, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox97 | --- | verified |
People
(Reporter: adw, Assigned: adw)
References
Details
Attachments
(3 files)
The urlbar view looks a little janky to me recently when it opens. There are a few different things that appear on screen at different points in the process, and altogether they add up to a lack of fluidity.
One of the problems is that when the input is focused while the pageproxystate is valid or there's no search string, there's a gap of time between when the input is focused and its background turns white to when the view opens and shows the top sites. This does not happen when the pageproxystate is invalid because we have a nice context-caching system that allows the view to immediately open and show the cached results.
The cache currently ignores the empty search string so it does not cache the top sites context, but there's no reason not to cache it AFAICT. Caching it fixes the problem.
Assignee | ||
Comment 1•2 years ago
|
||
This caches the top-sites context like we cache other contexts. Please see the
bug for more.
It also removes the early return from QueryContextCache.put()
when the context
has no results because that doesn't seem necessary. If a context doesn't have
any results, that's a valid outcome and it's OK to open and update the view
immediately.
Assignee | ||
Comment 2•2 years ago
•
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=bdfe5fbf399defff1010cf0ac995b799c56626a2
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f6f0dfeb859be55dd533379bd2d80ed3883bcf39
https://treeherder.mozilla.org/#/jobs?repo=try&revision=102ac4c39e799b72b0fb1d8d34f4432a39377969
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e11d0a80e095193d12b48a201fc1cffa6a1ae000
https://treeherder.mozilla.org/jobs?repo=try&revision=32bc9955fac454d883a2888e329f51275d761f0b
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a6af5cff5adf Cache the top-sites query context like we cache other contexts. r=harry
Comment 4•2 years ago
|
||
bugherder |
Assignee | ||
Updated•2 years ago
|
Comment 5•2 years ago
|
||
Hi Drew,
Are there any steps for us to reproduce and verify the changes here? Also, any possible risks/regression area to be taken into account?
Thank you!
Assignee | ||
Comment 6•2 years ago
|
||
Hi Petruta, this fix should make the urlbar panel open more quickly when it shows the top sites, except for the first time it opens in a new window. STR:
- Open a new window, or use the window immediately after starting Firefox
- Click the urlbar (or use the Ctrl+L shortcut)
- Close the urlbar panel (e.g., press Esc or click outside it)
- Click the urlbar again
After step 4, the panel should open at the same time the urlbar input is focused and turns white. What should not happen is: the input turns white and then later the panel opens. I'll attach a slowed-down gif to show what it should look like.
As for regressions, the panel should not show top sites or have any flickering of the top sites when it opens in other cases. e.g., if you press Ctrl+K to enter search mode.
Assignee | ||
Comment 7•2 years ago
|
||
Here's a slowed-down gif of what it looked like before the fix. Opening the panel the first time in a window (after step 2 in the STR above) also looks like this, even with the fix.
Comment 8•2 years ago
|
||
Thank you for the gifs and the detailed explanation.
Verified as fixed using latest Nightly 97.01 2022-01-07 under Win 10 64-bit and Mac OSX 11.6.2.
Description
•