Page MenuHomePhabricator

Create error state for TextInputWidget
Closed, ResolvedPublic1 Estimated Story Points

Description

Currently we have two implementations of this in VE (FindAndReplace invalid regex, and MediaSizeWidget invalid numbers) which set different shades of pink on the background. For MW theme we can consider changing the blue focus outline to red?

Event Timeline

Esanders assigned this task to matmarex.
Esanders raised the priority of this task from to Needs Triage.
Esanders updated the task description. (Show Details)
Esanders added a project: OOUI.
Esanders added a subscriber: Esanders.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 28 2015, 11:12 AM

We have the 'invalid' flag (driven by the isValid method), but it has no core styling. We also may want to provide an api for setting validity on a plain text widget, without having to override the isValid method.

Jdforrester-WMF triaged this task as High priority.Apr 28 2015, 5:17 PM
Jdforrester-WMF set Security to None.

We actually have three, there's one more in template dialog (which tries to set a red outline but fails).

For MW theme we can consider changing the blue focus outline to red?

+1

We also may want to provide an api for setting validity on a plain text widget, without having to override the isValid method.

I think a good way to do this would be to allow functions to be passed as validate config option, not just regexes.

Change 207413 had a related patch set uploaded (by Bartosz Dziewoński):
TextInputWidget: Styles for 'invalid' flag

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

Change 207414 had a related patch set uploaded (by Bartosz Dziewoński):
TextInputWidget: Allow functions to be passed as 'validate' config option

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

Jdforrester-WMF closed this task as Resolved.Apr 30 2015, 12:59 AM
Jdforrester-WMF edited a custom field.

Change 207413 merged by jenkins-bot:
TextInputWidget: Styles for 'invalid' flag

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

Change 207414 merged by jenkins-bot:
TextInputWidget: Allow functions to be passed as 'validate' config option

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

Jdforrester-WMF moved this task from Backlog to Reviewing on the OOUI board.Jun 3 2015, 9:13 PM