Page MenuHomePhabricator

When typing a namespace, the top option should be highlighted and be able to be added with enter
Closed, ResolvedPublic


As a user
I want to be able to choose the current top option from the namespace search
so that I can use the keyboard to choose namespaces more quickly

Ideal Solution

  • The namespaces dropdown highlights the current top option in blue. If a user presses enter, that namespace is added. It should behave like the tags selector on phabricator.

adv.png (396×873 px, 59 KB)

Acceptance Criteria

  • Investigate if the solution can be done as part of OOUI. If it cannot, please report, so we can see if it should be included into OOUI in general

Event Timeline

Lea_WMDE triaged this task as Medium priority.Dec 14 2017, 11:31 AM
Lea_WMDE updated the task description. (Show Details)

Ah! We actually did that in RCFilters, with a hack, see here:

The idea is that we go over the visible items after they're toggled visible/invisible (in updateItemVisibility) and then we select the first available item. We do that only if we're not in "select" mode, in case the user clicked one of the bubble/tags that already exists. In that part, we select the menu item from the list and scroll to it.

Head's up about this code -- it is about to be replaced SLIGHTLY, because RCFilters uses different "views" (there are 3 possible lists of items that can appear in the menu) and we have to keep track of what appears and what doesn't, so we canceled the filtering that is internal to the MenuSelectWidget, and will instead be using our own model.
(You can see that fix here: but I don't think it's really affecting what you're doing, since your menu always has a single non-changing list)

Did this help? We might want to upstream this behavior if this is overall helpful/wanted.

Hi @Mooeypoo, we can't think of any reasons why this should not be standard behavior, so we would be really happy if it was part of OOUI :) Is this easy for you to do or should we give it a try?

matmarex added a subscriber: matmarex.

Looks like the OOUI patch in T187398 fixes this. It will probably be released next Tuesday, then we'll upgrade the OOUI version in MediaWiki, which will then reach WMF production wikis on the Tuesday-Thursday of the week after that.

Heyho, we have just found weird behavior that to me looks like it would originate from this change: T190156: first item in namespace drop-down isn't always preselected . Could you take a look at it? Thanks :) @Mooeypoo @matmarex