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

replace jquery-minicolors with coloris #30055

Merged
merged 16 commits into from
Mar 29, 2024
Merged

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Mar 24, 2024

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.

Screenshot 2024-03-25 at 00 21 05 Screenshot 2024-03-25 at 00 20 48

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 24, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 24, 2024
@silverwind silverwind added the type/enhancement An improvement of existing functionality label Mar 24, 2024
@silverwind
Copy link
Member Author

I think the CSS can be trimmed down a bit more. It still has quite a bit of unnecessary stuff.

* origin/main:
  Remove jQuery `.attr` from the Fomantic modal cancel buttons (go-gitea#30113)
  Remove jQuery `.attr` from the code comments (go-gitea#30112)
  Remove jQuery calls that have no effect on `showElem` and `hideElem` (go-gitea#30110)
  Remove jQuery `.attr` from the common issue page functions (go-gitea#30083)
  Restore aligned grid column CSS (go-gitea#30106)
  Fix possible data race on tests (go-gitea#30093)
  Add svg linter and fix incorrect svgs (go-gitea#30086)
  Fix duplicate migrated milestones (go-gitea#30102)
  Update JS any PY dependencies, remove workarounds (go-gitea#30085)
  Fix gitea doctor will remove repo-avatar files when execute command `storage-archives` (go-gitea#30094)
  Fix alignment in actions right view (go-gitea#29979)
  Remove repetitive words (go-gitea#30091)
  Fix table header text-align (go-gitea#30084)
  Fix panic for `fixBrokenRepoUnits16961` (go-gitea#30068)
@silverwind
Copy link
Member Author

CSS is stripped down, so I'd say this is ready to review.

@silverwind
Copy link
Member Author

public/assets/img/webpack is removed as well. The only purpose of that folder was to serve the PNG from jQuery-minicolors, which is now gone.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 27, 2024
@silverwind silverwind marked this pull request as draft March 27, 2024 20:49
@silverwind silverwind marked this pull request as ready for review March 28, 2024 21:54
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Mar 28, 2024
@silverwind silverwind added the backport/v1.22 This PR should be backported to Gitea 1.22 label Mar 28, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 29, 2024
@silverwind silverwind merged commit dd8dde2 into go-gitea:main Mar 29, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Mar 29, 2024
@silverwind silverwind deleted the coloris branch March 29, 2024 03:00
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Mar 29, 2024
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Mar 29, 2024
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">
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 29, 2024
* upstream/main:
  Remove fomantic checkbox module (go-gitea#30162)
  Refactor topic Find functions and add more tests for pagination (go-gitea#30127)
  replace jquery-minicolors with coloris (go-gitea#30055)
  Add API for `Variables` (go-gitea#29520)
  Fix `DEFAULT_SHOW_FULL_NAME=false` has no effect in commit list and commit graph page (go-gitea#30096)
  Fix migration v292 (go-gitea#30153)
  Adjust VS Code debug filename match in .gitignore (go-gitea#30158)
  Prevent re-review and dismiss review actions on closed and merged PRs (go-gitea#30065)
  Render code tags in commit messages (go-gitea#30146)
  Bump `@github/relative-time-element` to v4.4.0 (go-gitea#30154)
  Migrate font-family to tailwind (go-gitea#30118)
  Move from `max( id )` to `max( index )` for latest commit statuses (go-gitea#30076)
  Remember login for a month by default (go-gitea#30150)
@wxiaoguang wxiaoguang added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Apr 27, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/v1.22 This PR should be backported to Gitea 1.22 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/dependencies modifies/internal modifies/js modifies/templates This PR modifies the template files size/L Denotes a PR that changes 100-499 lines, ignoring generated files. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants