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

Update cleave.js to cleave-zen #2026

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

ArmandoGraterol
Copy link
Contributor

@ArmandoGraterol ArmandoGraterol commented Mar 6, 2024

So this took longer than anticipated.

The author deprecated cleave.js: nosir/cleave.js#723 and a new library has been created in its place: https://github.com/nosir/cleave-zen

The approach to how the library works changed almost completely, so I had to make some extra modifications to the forms (also to simplify the code as it was hard to understand what the heck was happening). I think the new library is easier to use and integrate.

Hopefully, everything still works as expected but now without the annoying warning of componentWillReceiveProps. The forms most affected by the changes are mint tokens, transfer funds, and simple payments.

Resolves #2001

@ArmandoGraterol ArmandoGraterol self-assigned this Mar 6, 2024
@ArmandoGraterol ArmandoGraterol force-pushed the maintenance/2001-update-cleave-js branch from 455908f to c840521 Compare March 7, 2024 17:24
@ArmandoGraterol ArmandoGraterol marked this pull request as ready for review March 7, 2024 18:13
@ArmandoGraterol ArmandoGraterol requested review from a team as code owners March 7, 2024 18:13
Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could reinstall npm packages, but couldn't get the dev environment running, due to the block ingestor not bulding.

Screenshot from 2024-03-07 23-37-49

Does perhaps this needs to be rebased ?

(codewise looks all good)

@chmanie
Copy link
Member

chmanie commented Mar 8, 2024

Could reinstall npm packages, but couldn't get the dev environment running, due to the block ingestor not bulding.

npm had some hiccups yesterday, maybe it was that:

https://github.com/JoinColony/colonyCDapp/actions/runs/8192265293/job/22403383516?pr=2026#step:4:120

npm run dev running fine for me today

Copy link
Member

@chmanie chmanie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good code wise and functionality wise!

I was wondering whether we can do something about the cursor jumping when changing digits in the middle of the number. I know this was a problem before, I just thought it might be fixed by updating this library...

@ArmandoGraterol ArmandoGraterol force-pushed the maintenance/2001-update-cleave-js branch from c840521 to aa11b71 Compare March 8, 2024 17:21
@ArmandoGraterol
Copy link
Contributor Author

@rdig It might be what Chris mentions but I've rebased it just in case

Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good now. You guys were right, might have been a npm issue after all

@ArmandoGraterol ArmandoGraterol merged commit cc3c579 into master Mar 11, 2024
2 of 3 checks passed
@ArmandoGraterol ArmandoGraterol deleted the maintenance/2001-update-cleave-js branch March 11, 2024 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleave.js causes componentWillReceiveProps warning in the console
3 participants