Page MenuHomePhabricator

Form field types in VisualEditor for boolean, number, date
Open, Needs TriagePublicFeature

Assigned To
None
Authored By
Nux
Jan 29 2023, 5:03 PM
Referenced Files
F36545096: obraz.png
Jan 29 2023, 5:03 PM
F36545094: obraz.png
Jan 29 2023, 5:03 PM
Subscribers

Description

Feature summary (what you would like to be able to do and where):

The form filed types (component types) seem rather random in VE. TemplateData types: boolean, number, date should at a very least be single-line. Code editor extension seem to have better defaults.

VECode editor extension
obraz.png (832×898 px, 65 KB)
obraz.png (541×697 px, 32 KB)

Also would be nice to have a default dropdown for boolean. I assume this is supposed to be 1/0/null (empty/undefined).

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

Using new template for the first time it is nice to know the accepted value is 1 or 0 and not "y" or "n" or whatever. A dropdown with i18n of: Yes (1), No (0), Not sure (empty). If that is more complex then just add +/- like in the Code editor for number type.

Would be convenient to choose a date from a calendar. Especially for something like access date for citation templates. Docs say ISO date is preferred anyway so seems like there is no reason not to use the date component.

Fields like date and number and also string take up too much horizontal space now.

Benefits (why should this be implemented?): All using VE.

Event Timeline

See also some problems with the NumberInputWidget:
T328229 Number field should not remove everything when wrong key was pressed