Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🛠 - Investigate other mask options #120

Closed
SergiusSidorov opened this issue Jan 20, 2021 · 16 comments · Fixed by #4725 or #6754
Closed

🛠 - Investigate other mask options #120

SergiusSidorov opened this issue Jan 20, 2021 · 16 comments · Fixed by #4725 or #6754
Assignees
Labels
feature New feature or request P1 This issue has high priority

Comments

@SergiusSidorov
Copy link

🚀 Feature request

Is your feature request related to a problem?

Last release of angular2-text-mask was about 3 years ago. Currently this project is not maintained. Using this library results in a build-time warning:
Warning: /node_modules/@taiga-ui/kit/ivy_ngcc/fesm2015/taiga-ui-kit-components-input-range.js depends on 'angular2-text-mask'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

There is a possibility to switch off this warning. But I'm always frustrated when something can cause optimization bailouts. =)

Describe the solution you'd like

Maybe it would be better to migrate to ngx-mask (https://github.com/JsDaddy/ngx-mask). This project looks alive.

Describe alternatives you've considered

Additional context

@ramax495
Copy link

ngx-mask doesn't work on Ionic.
Just for info)

@waterplea
Copy link
Collaborator

Thank you for raising this issue. Yes, we would like to migrate to another mask solution at some point.

I have refactored work with mask in input a little. Now if you were to use angular2-text-mask — you could set it directly on tui-input. This way Taiga UI supports angular2-text-mask but doesn't enforce it on you, as end user. It is still required by our internal implementation for various masked inputs, such as InputDate, InputNumber etc. But that could be refactored without breaking changes in future when we will have resources and a good candidate library (or have written our own).

@0xphilipp
Copy link

I can highly recommend angular-imask which uses imask.js under the hood. Which would be a bit bigger in comparison

@waterplea waterplea added the feature New feature or request label Jan 29, 2021
@Fafnur
Copy link

Fafnur commented Feb 1, 2021

Don't use ngx-mask.

@zy2ba
Copy link
Contributor

zy2ba commented May 13, 2021

Don't use ngx-mask.

Support this opinion. We take it for our project and have some pain moments.

Primarily, ngx-mask works normally only with type=text. Mobile users be frustrated by strange keyboard type selection with it

@waterplea waterplea changed the title [FEATURE] angular2-text-mask is too old and currently is not maintained Explore other mask options Oct 12, 2021
@waterplea waterplea changed the title Explore other mask options Investigate other mask options Oct 12, 2021
@waterplea waterplea added the P1 This issue has high priority label Jan 21, 2022
@waterplea waterplea changed the title Investigate other mask options 🛠 - Investigate other mask options Feb 1, 2022
@Yohandah
Copy link
Contributor

Also, this is blocking because we are unable to run Unit Tests because of this lib text-mask/text-mask#1019

Error: TextMaskModule does not have a module def (ɵmod property)

@waterplea
Copy link
Collaborator

I believe that's unrelated. It is something with Jest and ngcc not working properly with Ivy.

@hakimio
Copy link
Contributor

hakimio commented Sep 27, 2022

Maybe @ngneat/input-mask could be a good alternative?

@waterplea
Copy link
Collaborator

I believe we looked into it and decided not to go with it. Writing our own mask solution seems to be the way to go, especially since it would be in demand at our company outside Angular scope as well. So this is one of the supertasks for 3.0 we plan to get to in a couple of weeks.

@hakimio
Copy link
Contributor

hakimio commented Oct 21, 2022

Worth noting that angular2-text-mask is not only causing problems with Stackblitz but also prevents usage of yarn v2+ and pnpm because of ngcc requirement. Would be awesome if getting rid of this dependency could be prioritized.

@waterplea
Copy link
Collaborator

waterplea commented Oct 21, 2022

I believe we dropped angular2-text-mask and copy-pasted it for now in newer versions. But text-mask remains a dependency. We will prioritize new mask from November 1st, but it's a huge task so there's no forecast how long it's going to take us.

@hakimio
Copy link
Contributor

hakimio commented Oct 21, 2022

The copy-pasted version is marked as internal and deprecated, but, yeah, it could be a valid work-around until you develop your own solution.

@hakimio
Copy link
Contributor

hakimio commented May 4, 2023

Angular v16 was just released where they dropped ngcc.
@nsbarsukov how is maskito coming along? Do you plan to start using it in taiga-ui soon?

@nsbarsukov
Copy link
Member

Angular v16 was just released where they dropped ngcc. @nsbarsukov how is maskito coming along? Do you plan to start using it in taiga-ui soon?

Maskito is ready to use it inside Taiga UI, yep.
I am going to start in next week. And I will do 1-2 components per week (not all masked inputs at once.).

@hakimio
Copy link
Contributor

hakimio commented May 4, 2023

Awesome 🙂

@nsbarsukov
Copy link
Member

nsbarsukov commented May 16, 2023

Full list with masked Taiga’s inputs:






Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request P1 This issue has high priority