Closed Bug 1059758 Opened 7 years ago Closed 7 years ago

Search results disappear and reappear on every keystroke - very distracting

Categories

(Firefox OS Graveyard :: Gaia::Search, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.1 fixed, b2g-v2.2 verified)

RESOLVED FIXED
2.1 S3 (29aug)
Tracking Status
b2g-v2.1 --- fixed
b2g-v2.2 --- verified

People

(Reporter: kats, Assigned: kgrandon)

References

Details

(Whiteboard: [systemsfe])

Attachments

(2 files)

When typing in the rocketbar search the search results (and the tooltip that shows up on first use) disappear and reappear on every single keystroke. This is highly distracting. When I already have a URL I'm trying to go to the results churning away like that just slows me down and annoys me. It would be good to put in a delay so that the results only update after say 500ms of not typing. Alternatively, the results update should be done atomically in a single layout/repaint cycle so that they just update rather than disappearing and reappearing. I'll attach a video shortly.
Actually it does seem like there's a bit of a delay in today's latest code compared to yesterday's build (which is much better, thanks!) so maybe you guys already addressed this to some extent. Still, here's the video as promised:

http://people.mozilla.org/~kgupta/tmp/rocketbar.mp4 (13MB video, too big for bugzilla attachment)
OS: Mac OS X → Gonk (Firefox OS)
Hardware: x86 → ARM
We're supposed to have a delay here already, I'll look into it today and tune if necessary.
We should have a 600ms delay here: https://github.com/mozilla-b2g/gaia/blob/master/apps/search/js/search.js#L12

Could the problem be that we are clearing the results after you press a character? If we are interleaving keystrokes with long delays I could see this being a problem with the results flashing.

E.g.,

w (+100ms)
w (+100ms)
w (+700ms)
<- results display ->
. <- results clear ->(+100ms)


Francis - what do you think here, should we not clear the previous results until we meet the 600ms threshold?
Flags: needinfo?(fdjabri)
Kats - not sure if you have cycles or care to give this a run through, but I'm proposing that we keep the existing set of results until we have something to display. It keeps the screen in a more steady state while your typing.

Feel free to chime in if you'd like to, but if you don't have time that's fine too. Thanks for filing this!
Flags: needinfo?(bugmail.mozilla)
Assignee: nobody → kgrandon
Status: NEW → ASSIGNED
Target Milestone: --- → 2.1 S3 (29aug)
I tried it out and it definitely feels like an improvement. Thanks!
Flags: needinfo?(bugmail.mozilla)
> 
> Francis - what do you think here, should we not clear the previous results
> until we meet the 600ms threshold?

As discussed, let's try it with 500ms
Flags: needinfo?(fdjabri)
Comment on attachment 8481441 [details] [review]
Pull request - keep results until next set is ready

This patch is fairly simple and since both kats and djabber have had a look at it I feel comfortable with r=me.
Attachment #8481441 - Flags: review+
Master: https://github.com/mozilla-b2g/gaia/commit/47d8f63dd7d2bbbbe1a7962c0caa32468767e007
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [systemsfe]
Comment on attachment 8481441 [details] [review]
Pull request - keep results until next set is ready

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): This bug
[User impact] if declined: Terrible experience when using search
[Testing completed]: Been on master for some time
[Risk to taking this patch] (and alternatives if risky): Low risk
[String changes made]: None
Attachment #8481441 - Flags: approval-gaia-v2.1?
Comment on attachment 8481441 [details] [review]
Pull request - keep results until next set is ready

It seems like this change was already uplifted to v2.1. It does seem like we could make this better though. We may want to do this work in bug 1027381.

https://github.com/mozilla-b2g/gaia/blob/v2.1/apps/search/js/search.js#L145
Attachment #8481441 - Flags: approval-gaia-v2.1?
Attached video verified_2.2.3gp
This bug has been verified as pass on latest build of Flame v2.2 by STR in comment 0.
Actual result:When typing in the rocketbar search ,the search results will not disappear and reappear on every single keystroke.The result will display  in some milliseconds after there is not taping in  rocketbar.
See attachment:verified_2.2.3gp
 
Device: Flame 2.2 build(pass)
Build ID               20150701162502
Gaia Revision          bd386f346eb1591fddbc84bf034b22700e7e2a58
Gaia Date              2015-06-30 15:53:15
Gecko Revision         https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/f16c1125b9d6
Gecko Version          37.0
Device Name            flame
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.cltbld.20150701.195343
Firmware Date          Wed Jul  1 19:53:55 EDT 2015
Bootloader             L1TC000118D0
You need to log in before you can comment on or make changes to this bug.