appuniversum / ember-appuniversum

Ember addon wrapping the appuniversum components.
https://appuniversum.github.io/ember-appuniversum
MIT License
14 stars 11 forks source link

Revisit the masking feature #470

Open Windvis opened 9 months ago

Windvis commented 9 months ago

The formbuilder team recently used the au-input modifier to implement a currency input. We ran into some strange / buggy behaviours in the inputmask library that we use. We also use this library for the AuDateInput component, and it also does some strange things sometimes (when trying to change specific numbers in the date without deleting everything after it, for example).

We chose this library in the past because it seemed the one that was the most widely used and maintained. Looking into it again, it seems the last stable release (5.0.8) was released in march 2023. There are beta releases of 5.0.9 that fix some issues, but the last one was released in november last year. So the addon is less maintained than we want (which is expected if it is maintained by a single person who isn't paid for it).

Another downside is that it's a fairly large library to ship for only a small couple of use cases. Not all apps need all the feature it supports, but we can't ship less since it's a generic modifier.

That combined with the fact that input masking isn't really a feature specific to Appuniversum makes me question the need for the {{au-input}} modifier.

My vision:

It's a bit painful, since we already required a migration when we deprecated the masking behavior in the AuInput component. We could maybe update the v2->v3 migration guide so apps that still need to do it can hop to the new recommendation immediately.