You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see templates are on the roadmap for Input widget, and since I need them on one of my projects, I'd like to give it a try. I'm opening this issue for discussion with the goal of making my first contribution to textual.
I propose to add a template reactive attribute to Input that emulates the behavior of Qt input masks, since this is what I'm used to and I think it allows enough freedom to cover all the use cases mentioned in the roadmap (I see IP address, physical units, currency, credit card) and more. Since Qt input masks are well documented, I'm not going to copy the docs here; just have a look at the link above. They are also effective as they are used in many production environments.
As an extension however, I'd like to add the possibility to specify more than a single blank character after the optional final ;: for this I propose to reuse the placeholder text, which when used in conjunction with template is always made visible even if Input value is not empty. The placeholder covers untyped content only and is dimmed of course. If blank character is specified in the template string, it has a precedence over placeholder.
This should allow for templates suitable to help in the development of the date picker widget (#3576), something like:
Hi all,
I see templates are on the roadmap for Input widget, and since I need them on one of my projects, I'd like to give it a try. I'm opening this issue for discussion with the goal of making my first contribution to textual.
I propose to add a template reactive attribute to Input that emulates the behavior of Qt input masks, since this is what I'm used to and I think it allows enough freedom to cover all the use cases mentioned in the roadmap (I see IP address, physical units, currency, credit card) and more. Since Qt input masks are well documented, I'm not going to copy the docs here; just have a look at the link above. They are also effective as they are used in many production environments.
As an extension however, I'd like to add the possibility to specify more than a single blank character after the optional final
;
: for this I propose to reuse the placeholder text, which when used in conjunction with template is always made visible even if Input value is not empty. The placeholder covers untyped content only and is dimmed of course. If blank character is specified in the template string, it has a precedence over placeholder.This should allow for templates suitable to help in the development of the date picker widget (#3576), something like:
Thoughts?
The text was updated successfully, but these errors were encountered: