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

Remove jQuery from the Unicode escape button #29369

Merged
merged 11 commits into from
Feb 24, 2024

Conversation

yardenshoham
Copy link
Member

@yardenshoham yardenshoham commented Feb 24, 2024

  • Switched to plain JavaScript
  • Tested the Unicode escape button functionality and it works as before

Demo using JavaScript without jQuery

action

- Switched to plain JavaScript
- Tested the unicode escape button functionality and it works as before

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 24, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 24, 2024
@yardenshoham yardenshoham added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Feb 24, 2024
@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 Feb 24, 2024
@yardenshoham yardenshoham marked this pull request as draft February 24, 2024 11:55
@yardenshoham yardenshoham marked this pull request as ready for review February 24, 2024 12:14
@wxiaoguang
Copy link
Contributor

I will take a look (at most in a few days) when I have time and try to make some small changes.

@wxiaoguang wxiaoguang self-assigned this Feb 24, 2024
web_src/js/features/repo-unicode-escape.js Outdated Show resolved Hide resolved
web_src/js/features/repo-unicode-escape.js Outdated Show resolved Hide resolved
web_src/js/features/repo-unicode-escape.js Outdated Show resolved Hide resolved
Co-authored-by: delvh <dev.lh@web.de>
@wxiaoguang wxiaoguang marked this pull request as draft February 24, 2024 16:17
@wxiaoguang
Copy link
Contributor

I will take a look (at most in a few days) when I have time and try to make some small changes.

Does 3690c3b look good to you?

Major changes:

  1. Introduce a helper function queryElemSiblings.
  2. Use btn = e.target.closest to get the "action button", then no need to use "e.target" anymore.
  3. Change el.classList.toggle('unicode-escaped', isEscaped); to el.classList.toggle('unicode-escaped', ! isEscaped); to flip the boolean

@wxiaoguang wxiaoguang marked this pull request as ready for review February 24, 2024 16:29
@yardenshoham
Copy link
Member Author

Sure, works for me

@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 Feb 24, 2024
@yardenshoham yardenshoham added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 24, 2024
@6543 6543 merged commit c86d033 into go-gitea:main Feb 24, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.22.0 milestone Feb 24, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 24, 2024
@yardenshoham yardenshoham deleted the repo-unicode-jquery branch February 24, 2024 19:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants