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 organization rename prompt toggle #29195

Merged
merged 6 commits into from
Feb 16, 2024

Conversation

yardenshoham
Copy link
Member

  • Switched to plain JavaScript
  • Tested the organization rename prompt toggling functionality and it works as before

Demo using JavaScript without jQuery

action

- Switched to plain JavaScript
- Tested the organization rename prompt toggling 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 16, 2024
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 16, 2024
@yardenshoham yardenshoham added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Feb 16, 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 16, 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 Feb 16, 2024
@yardenshoham yardenshoham added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 16, 2024
@pull-request-size pull-request-size bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 16, 2024
Comment on lines +5 to +6
const orgNameInput = document.querySelector('.organization.settings.options #org_name');
if (!orgNameInput) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh wait .... it seem incorrect .....

There is another call initCompLabelEdit below. It shouldn't return here.

So the old logic (like if ($('.organization').length === 0) { ) is still needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh right, reverting.

@wxiaoguang wxiaoguang removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 16, 2024
@wxiaoguang wxiaoguang self-requested a review February 16, 2024 14:42
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels Feb 16, 2024
@pull-request-size pull-request-size bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 16, 2024
@pull-request-size pull-request-size bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 16, 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 Feb 16, 2024
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 16, 2024
@silverwind silverwind merged commit 5902372 into go-gitea:main Feb 16, 2024
26 checks passed
@GiteaBot
Copy link
Contributor

@yardenshoham please fix the merge conflicts. 🍵

@GiteaBot GiteaBot added this to the 1.22.0 milestone Feb 16, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 16, 2024
@yardenshoham yardenshoham deleted the common-organization-jquery branch February 16, 2024 15:48
@wxiaoguang
Copy link
Contributor

No, this is still not right. https://github.com/go-gitea/gitea/pull/29195/files#r1492567342

It shouldn't return there, there is another call below: initCompLabelEdit.

@silverwind @yardenshoham it needs a following fix.

@silverwind
Copy link
Member

Sorry, I thought that was handled, @yardenshoham please follow-up.

@yardenshoham
Copy link
Member Author

I'm on it

@yardenshoham
Copy link
Member Author

#29198

silverwind pushed a commit that referenced this pull request Feb 16, 2024
Fix broken `if` from #29195

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this pull request Feb 19, 2024
Fix broken `if` from go-gitea/gitea#29195

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
(cherry picked from commit 2d8756a9607ee6029ad7a44985e9751988d5fdaa)
silverwind added a commit to silverwind/gitea that referenced this pull request Feb 20, 2024
- Switched to plain JavaScript
- Tested the organization rename prompt toggling functionality and it
works as before

# Demo using JavaScript without jQuery

![action](https://github.com/go-gitea/gitea/assets/20454870/e6f641b0-aa46-4b85-9693-0d608cca855e)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
silverwind pushed a commit to silverwind/gitea that referenced this pull request Feb 20, 2024
Fix broken `if` from go-gitea#29195

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
6543 pushed a commit to 6543-forks/gitea that referenced this pull request Feb 26, 2024
- Switched to plain JavaScript
- Tested the organization rename prompt toggling functionality and it
works as before

# Demo using JavaScript without jQuery

![action](https://github.com/go-gitea/gitea/assets/20454870/e6f641b0-aa46-4b85-9693-0d608cca855e)

---------

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
(cherry picked from commit 5902372)
Copy link

Automatically locked because of our CONTRIBUTING guidelines

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 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/XS Denotes a PR that changes 0-9 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.

5 participants