Page MenuHomePhabricator

Opening new tabs from search dropdown results
Closed, DuplicatePublic

Description

Compare the behavior of the dropdown of the top search bar in Phabricator with e.g. the search box in the MediaWiki Vector skin [i.e. as in Wikipedia]. There, if you get several interesting search results in the dropdown, you can just middle-click them all to open them in new tabs (or right-click and select "Open in new window", or do any of the other things one can do with a link). Phabricator just navigates away in the current tab on any kind of click.

For MediaWiki that was T19808 / https://gerrit.wikimedia.org/r/#/c/23674/ ; in general, you need to make sure, that the search dropdown items are wrapped in <a> tags pointing to the right location, and that the click handler does not catch non-left-clicks or left clicks with a modifier key. The code we used in MediaViewer for that is

if ( e.altKey || e.shiftKey || e.ctrlKey || e.metaKey || e.button ) { /* let the browser handle the click * / }

although it will be a bit more tricky if you want to be handle old IE versions correctly.

Original report: https://phabricator.wikimedia.org/T76812

Event Timeline

qgil raised the priority of this task from to Needs Triage.
qgil updated the task description. (Show Details)
qgil added a project: Search.
qgil updated the task description. (Show Details)
qgil added a subscriber: qgil.

I understand the point, but I personally can't think of what data in the main search typeahead someone would want to do that with. Projects names?

Project names, user names. Admittedly it's not something I would use often, but it did annoy me a few times.

chad triaged this task as Low priority.Dec 9 2014, 3:20 PM
chad added a project: PHUI.

A more specific use case: when I am adding a new task and am unsure whether it fits into a certain project, typing that project name in the search box and middle-clicking would be a convenient way of checking that project's description.

We already have planned several UI improvements to Typeaheads, see T1906 and T6579.

In general we expect feature requests that come in to describe problems, not solutions. That way we can solve many problems through more generalized solutions. See https://secure.phabricator.com/book/phabcontrib/article/feature_requests/#describe-problems

We should make middle clicks work as expected though, regardless.