Closed
Bug 973588
Opened 12 years ago
Closed 12 years ago
DXR search input field should be focused after load
Categories
(Webtools Graveyard :: DXR, defect)
Webtools Graveyard
DXR
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: gfritzsche, Assigned: ehsan.akhgari)
Details
* Navigate to dxr.mozilla.org
* Start typing
* Nothing happens
Ideally the search input field would be focused right away to enter a search query.
| Assignee | ||
Comment 1•12 years ago
|
||
I remember writing this patch in one of the older UIs. :-)
https://github.com/mozilla/dxr/pull/245
Assignee: nobody → ehsan
| Assignee | ||
Comment 2•12 years ago
|
||
(Also, what's with the <tag /> XHTML-isms there? ;-)
Comment 3•12 years ago
|
||
We actually specifically disabled this in the new UI. In terms if the HTML style, I prefer to write it strictly even though the HTML5 doctype is forgiving ;)
| Reporter | ||
Comment 4•12 years ago
|
||
(In reply to Schalk Neethling [:espressive] from comment #3)
> We actually specifically disabled this in the new UI.
Hm, why?
Comment 5•12 years ago
|
||
(In reply to Georg Fritzsche [:gfritzsche] from comment #4)
> (In reply to Schalk Neethling [:espressive] from comment #3)
> > We actually specifically disabled this in the new UI.
>
> Hm, why?
Here you go:
https://bugzilla.mozilla.org/show_bug.cgi?id=936199
| Reporter | ||
Comment 6•12 years ago
|
||
For the DXR landing page this seems like a trade-off to support one specific use-case.
Do you know that most people actually want to navigate the directory listing via type-to-select?
I would expect most usage on dxr.mozilla.org/ to start off in the search box, but i'm of course biased by my own usage :)
OS: Mac OS X → All
| Assignee | ||
Comment 7•12 years ago
|
||
(In reply to Georg Fritzsche [:gfritzsche] from comment #6)
> For the DXR landing page this seems like a trade-off to support one specific
> use-case.
> Do you know that most people actually want to navigate the directory listing
> via type-to-select?
I suspect they don't! The whole purpose behind having a search interface is that it makes browsing through things manually mostly unnecessary. I think we should revert that "fix".
(In reply to Schalk Neethling [:espressive] from comment #3)
> In terms if the HTML
> style, I prefer to write it strictly even though the HTML5 doctype is
> forgiving ;)
You've gotten things backwards! HTML5 (which is what is selected in the doctype) does not require these /> hunks, but it's forgiving enough to ignore them when you add them. This is a left over from the XHTML days when people tried to close the tags that did not have explicit HTML close tags this way. It is serving no purpose today in HTML5 documents.
Comment 8•12 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo? me!) (slow responsiveness, emailapocalypse) from comment #7)
> I think we should revert that "fix".
It actually was autofocusing at the start and then changed. I cannot comment on the user base that would prefer one over the other and I would defer that to :ErikRose
> You've gotten things backwards!
Indeed I did, I still prefer self closing and closing tags in general. It is a matter of preference really.
| Assignee | ||
Comment 9•12 years ago
|
||
(In reply to comment #8)
> (In reply to :Ehsan Akhgari (needinfo? me!) (slow responsiveness,
> emailapocalypse) from comment #7)
>
> > I think we should revert that "fix".
>
> It actually was autofocusing at the start and then changed. I cannot comment on
> the user base that would prefer one over the other and I would defer that to
> :ErikRose
I know, because I wrote the original patch to autofocus this! :-)
Let's wait to see why Erik took it out.
> > You've gotten things backwards!
>
> Indeed I did, I still prefer self closing and closing tags in general. It is a
> matter of preference really.
I guess so. It makes me sick because it reminds me of the dark old days of XHTML. ;-) But I don't hold a very big horse in this race.
Comment 10•12 years ago
|
||
(In reply to Schalk Neethling [:espressive] from comment #5)
> (In reply to Georg Fritzsche [:gfritzsche] from comment #4)
> > (In reply to Schalk Neethling [:espressive] from comment #3)
> > > We actually specifically disabled this in the new UI.
> >
> > Hm, why?
>
> Here you go:
> https://bugzilla.mozilla.org/show_bug.cgi?id=936199
I think that bug is for not auto-focusing on indexed pages, which I agree is what we should we do. However, for the landing page we should definitely be auto-focused on the search box. I guess it is not easy to distinguish which is which now, but we should be able to hack that.
Comment 11•12 years ago
|
||
(In reply to Nick Cameron [:nrc] from comment #10)
> (In reply to Schalk Neethling [:espressive] from comment #5)
> > (In reply to Georg Fritzsche [:gfritzsche] from comment #4)
> > > (In reply to Schalk Neethling [:espressive] from comment #3)
> > > > We actually specifically disabled this in the new UI.
> > >
> > > Hm, why?
> >
> > Here you go:
> > https://bugzilla.mozilla.org/show_bug.cgi?id=936199
>
> I think that bug is for not auto-focusing on indexed pages, which I agree is
> what we should we do. However, for the landing page we should definitely be
> auto-focused on the search box. I guess it is not easy to distinguish which
> is which now, but we should be able to hack that.
I agree, there is not much use for the arrow key navigation on the landing page before a query has been executed either via SAYT or by hitting enter. So, perhaps we can bring it back in those instances.
| Assignee | ||
Comment 12•12 years ago
|
||
(In reply to comment #11)
> (In reply to Nick Cameron [:nrc] from comment #10)
> > (In reply to Schalk Neethling [:espressive] from comment #5)
> > > (In reply to Georg Fritzsche [:gfritzsche] from comment #4)
> > > > (In reply to Schalk Neethling [:espressive] from comment #3)
> > > > > We actually specifically disabled this in the new UI.
> > > >
> > > > Hm, why?
> > >
> > > Here you go:
> > > https://bugzilla.mozilla.org/show_bug.cgi?id=936199
> >
> > I think that bug is for not auto-focusing on indexed pages, which I agree is
> > what we should we do. However, for the landing page we should definitely be
> > auto-focused on the search box. I guess it is not easy to distinguish which
> > is which now, but we should be able to hack that.
>
> I agree, there is not much use for the arrow key navigation on the landing page
> before a query has been executed either via SAYT or by hitting enter. So,
> perhaps we can bring it back in those instances.
Yep that makes perfect sense.
Comment 13•12 years ago
|
||
Wow, take a holiday, and people really go to town. :-) I saw the subject line during the day and thought "I'll ask Ehsan to wait for a few more people to weigh in". Lucky for me, it seems a small but forceful consensus has already emerged.
I'm loath to make certain pages autofocus and other pages not (since, as Nick observes, they all look pretty much the same). If no one has a better idea, I'm inclined to just take Ehsan's patch that turns autofocus on all the time. If not being able to page-down once you reach a line number anchor (as with a direct result) bothers others people as much as it does me, we can put in the effort to special-case that.
Before we do that, though, I want to know what Nick meant by "indexed pages": file views?
Flags: needinfo?(ncameron)
Comment 14•12 years ago
|
||
abbeyj registered in IRC that he finds autofocusing to interfere with doing type-to-select searches on file-view pages.
Comment 15•12 years ago
|
||
And Nick did mean "file views".
Comment 16•12 years ago
|
||
Alright, we just did a bunch of hashing things around in #static. How's this strike everyone?
We auto-focus only on the front page (of every tree) and nowhere else. That way, when you surf to DXR via typing "d-x-return" or whatever, you're all set up to do a search, which is (we guess, informed by your personal experiences) the most common action. But once you start browsing around the tree, we assume you're likely to keep browsing (or otherwise clicking on links), so we don't autofocus anywhere else: not on any non-root folder views nor on any file views.
Sane/insane?
| Reporter | ||
Comment 17•12 years ago
|
||
(In reply to Erik Rose [:erik][:erikrose] from comment #16)
> Sane/insane?
Sounds pretty good to me!
Comment 18•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/dxr
https://github.com/mozilla/dxr/commit/b3a1cce5aa0f46e0f61602644c2153ab608e207e
Autofocus the query field at the root of each tree (only). Fix bug 973588. Close #245.
Add an instance for testing markup generation.
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 19•12 years ago
|
||
Let's try that and see how we like it. I tried it locally, and it was fine, except that clicking the linked tree name in "Results from tree 'such and such':" brought me back to the root and autofocused the field. That was a bit jarring, but I think this is an improvement.
Comment 20•12 years ago
|
||
(This will need a new build to take effect, so give it a few hours.)
| Assignee | ||
Comment 21•12 years ago
|
||
Thanks, this makes sense to me.
Updated•12 years ago
|
Flags: needinfo?(ncameron)
Updated•5 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•