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

Use querySelector over alternative DOM methods #31280

Merged
merged 5 commits into from
Jun 10, 2024

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Jun 7, 2024

As per #30115 (comment), prefer querySelector by enabling unicorn/prefer-query-selector and autofixing all except 10 issues.

According to this, querySelector may be faster as well, so it's a win-win.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 7, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 7, 2024
@silverwind silverwind added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Jun 7, 2024
@silverwind
Copy link
Member Author

16516c5 also fixes the one use of document.getElementsByName in the code base and I specifically tested it.

@silverwind
Copy link
Member Author

anchors tested again, still work.

@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 Jun 7, 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 Jun 10, 2024
@denyskon denyskon added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 10, 2024
@denyskon denyskon added this to the 1.23.0 milestone Jun 10, 2024
@silverwind silverwind merged commit 507fbf4 into go-gitea:main Jun 10, 2024
26 checks passed
@silverwind silverwind deleted the querySelector branch June 10, 2024 20:49
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jun 10, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jun 11, 2024
* giteaofficial/main:
  Fix line number width in code preview (go-gitea#31307)
  Delete legacy cookie before setting new cookie (go-gitea#31306)
  [skip ci] Updated translations via Crowdin
  Use `querySelector` over alternative DOM methods (go-gitea#31280)
  Remove jQuery `.text()` (go-gitea#30506)
  [skip ci] Updated translations via Crowdin
  Remove sub-path from container registry realm (go-gitea#31293)
  Fix some URLs whose sub-path is missing (go-gitea#31289)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Sep 9, 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. modifies/internal modifies/js size/L Denotes a PR that changes 100-499 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.

4 participants