-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
replace jquery-minicolors with coloris (#30055) #30165
Conversation
Get rid of one more jQuery dependant and have a nicer color picker as well. Now there is only a single global color picker init because that is all that's necessary because the elements are present on the page when the init code runs. The init is slightly weird because the module only takes a selector instead of DOM elements directly. The label modals now also perform form validation because previously it was possible to trigger a 500 error `Color cannot be empty.` by clearing out the color value on labels. <img width="867" alt="Screenshot 2024-03-25 at 00 21 05" src="https://github.com/go-gitea/gitea/assets/115237/71215c39-abb1-4881-b5c1-9954b4a89adb"> <img width="860" alt="Screenshot 2024-03-25 at 00 20 48" src="https://github.com/go-gitea/gitea/assets/115237/a12cb68f-c38b-4433-ba05-53bbb4b1023e">
Is this backport necessary? Looks like it's not a bugfix. |
I think it needs a clear roadmap about how to refactor. I ever wrote something in https://docs.gitea.com/contributing/guidelines-refactoring
What I meant for
However, since there are really a lot of frontend refactorings for 1.22 (especially when it was going into freezing time), so I think this time it is still better to merge some PRs back to 1.22, to make the future bug fixes easier to backport.
|
I think yes. We can backport some necessary to fix bugs easier but that needs case by case. I will not block this one if you think it's necessary. |
Can skip this one. |
Backport #30055 by @silverwind
Get rid of one more jQuery dependant and have a nicer color picker as well.
Now there is only a single global color picker init because that is all that's necessary because the elements are present on the page when the init code runs. The init is slightly weird because the module only takes a selector instead of DOM elements directly.
The label modals now also perform form validation because previously it was possible to trigger a 500 error
Color cannot be empty.
by clearing out the color value on labels.