Skip to content

Conversation

@yardenshoham
Copy link
Member

  • Removed all jQuery AJAX calls and replaced with our fetch wrapper
  • Tested the repo tag edit form functionality and it works as before

Demo using fetch instead of jQuery AJAX

action

- Removed all jQuery AJAX calls and replaced with our fetch wrapper
- Tested the repo tag edit form 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 Mar 1, 2024
@yardenshoham yardenshoham added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Mar 1, 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 Mar 1, 2024
if (xhr.responseJSON.invalidTopics.length > 0) {
topicPrompts.formatPrompt = xhr.responseJSON.message;
} catch (error) {
if (error.response?.status === 422) {
Copy link
Member

@silverwind silverwind Mar 1, 2024

Choose a reason for hiding this comment

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

What is error.response? I don't think it's part of the fetch standard. Also I think the logic is wrong because fetch will not throw on negative status codes. Fetch only throws on network errors, nothing else.

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought it throws. I will fix it

@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 2, 2024
@yardenshoham yardenshoham added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 2, 2024
@lunny lunny merged commit 2089b97 into go-gitea:main Mar 2, 2024
@GiteaBot GiteaBot added this to the 1.22.0 milestone Mar 2, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 2, 2024
@yardenshoham yardenshoham deleted the repo-home-jquery-ajax branch March 2, 2024 09:29
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 2, 2024
* upstream/main:
  Remove jQuery AJAX from the repo tag edit form (go-gitea#29526)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 10, 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. 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