Page MenuHomePhabricator

Mention inspector validation needs adjustment to trigger when is needed to avoid premature warnings and mentioning inexistent users
Closed, InvalidPublic

Description

I found the following issues:

  • The input field turns red too early. I just open the inspector and it is already telling me I did something wrong by keeping the field empty. I would expect that to happen when the focus moves away from the input field but not when I'm focused on the input field about to type.
  • With the current inspector I can add mentions to non-existing users. If the user I'm typing does not exist, I'd would expect the field to turn red and the "add" button to be deactivated (I may be missing some specific case where that could be useful).

The expected behaviour would be to:
-When the user opens the inspector, keep the input field as a regular input field while it is focused. Make its border turn red when the focus is lost if it is still empty.

  • When the user types text that does not match any user, turn the input borders in red and make the action to create a mention to become disabled.

The second point seems more critical than the first to me.

Event Timeline

Pginer-WMF raised the priority of this task from to Needs Triage.
Pginer-WMF updated the task description. (Show Details)
Pginer-WMF subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

With the current inspector I can add mentions to non-existing users.

This is a regression. It was not possible to mention a non-existent user when the feature was first deployed.

Did you test against master or production, or only against @Catrope's patch set?

Change 209167 had a related patch set uploaded (by Catrope):
Add user name suggestions from the API in the mention inspector

https://gerrit.wikimedia.org/r/209167

Catrope claimed this task.

This was an issue with an earlier patchset of https://gerrit.wikimedia.org/r/209167 (which is now fixed) , it's not broken in master.