Page MenuHomePhabricator

[Alpha/Labs] Add "no results found" state for depicts auto-suggest dropdown
Closed, ResolvedPublic



When attempting to add an item that does not have a Wikibase entity stored, there is no message informing the user that the entity does not exist:

Example GIF:

Expected Behavior:
The dropdown should display a "No results found" element as below (bg color #fee7e6)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 26 2019, 6:38 PM
Ramsey-WMF triaged this task as High priority.Feb 26 2019, 6:39 PM

@egardner have at it :)

Change 493131 had a related patch set uploaded (by Eric Gardner; owner: Eric Gardner):
[mediawiki/extensions/WikibaseMediaInfo@master] Display a "no results found" message in Depicts autocomplete widget

@Ramsey-WMF and @PDrouin-WMF, I just submitted a patch to handle this scenario. You can see the new UI for "no results found" in context below:

I'm relying on the OOUI MenuOptionWidget for this, since that's what pops up when there is a successful match. I have set the element to disabled so that the user can't select it, but I don't know how to make this element red without resorting to hacking my own style overrides. However, my feeling is that making the box red might be sending a stronger signal than is needed – the user hasn't done anything wrong necessarily, they are just searching for something that does not exist yet.

For text, I've currently set the label to read No results found. Let me know if that should change and I'll update the messages.

Sweet! Pending code review, this looks like it's mostly there. I'll leave the decision on the coloring of the element to @PDrouin-WMF (I'm fine with the "salmon" colored #fee7e6 color that is currently desired, and there is precedent for its use).

@egardner's patch looks great - merged it (with white background)
If we want to change copy or background colors, we can submit follow-up patches.

Change 493131 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Display a "no results found" message in Depicts autocomplete widget

Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.Mar 8 2019, 2:29 AM
Ramsey-WMF closed this task as Resolved.Apr 24 2019, 12:34 AM