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

Fix cancel button in the page of project edit not work #23655

Merged
merged 7 commits into from
Mar 24, 2023

Conversation

sillyguodong
Copy link
Contributor

Before, in project edit page, the cancel button is not work.

Screen.Recording.2023-03-23.at.17.55.08.mov
  1. The wrong classname cancel was added to the <a> tag. That classname caused the default click event of <a> tag to be cancelled. Because we have the following settings in the global. So I remove the classname cancel.

$(document).on('click', 'form .ui.cancel.button', (e) => {
e.preventDefault();
});

  1. Another change is that page will redirect to the previous page.
Screen.Recording.2023-03-23.at.19.15.23.mov

@sillyguodong sillyguodong changed the title Fix buttons in project edit page not work Fix cancel button in the page of project edit not work Mar 23, 2023
@wxiaoguang
Copy link
Contributor

It's a regression of my suggestion in #23337

The proper fix should be : use $(document).on('click', 'form button.ui.cancel.button', (e) => { instead of $(document).on('click', 'form .ui.cancel.button', (e) => {

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 23, 2023
@lunny lunny added this to the 1.20.0 milestone Mar 23, 2023
@lunny lunny added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Mar 23, 2023
@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 23, 2023
@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 24, 2023
@wolfogre wolfogre added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 24, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #23655 (3234df1) into main (f521e88) will increase coverage by 0.02%.
The diff coverage is 40.38%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main   #23655      +/-   ##
==========================================
+ Coverage   47.14%   47.16%   +0.02%     
==========================================
  Files        1149     1154       +5     
  Lines      151446   152382     +936     
==========================================
+ Hits        71397    71873     +476     
- Misses      71611    72034     +423     
- Partials     8438     8475      +37     
Impacted Files Coverage Δ
cmd/dump.go 0.66% <0.00%> (-0.01%) ⬇️
cmd/web.go 0.00% <0.00%> (ø)
models/actions/run.go 1.64% <0.00%> (-0.08%) ⬇️
models/actions/runner.go 1.44% <ø> (ø)
models/packages/package.go 45.45% <0.00%> (-1.13%) ⬇️
models/user/search.go 77.50% <0.00%> (-6.29%) ⬇️
modules/actions/workflows.go 0.00% <0.00%> (ø)
modules/context/context.go 64.54% <0.00%> (-3.53%) ⬇️
modules/doctor/storage.go 30.65% <0.00%> (-1.29%) ⬇️
modules/setting/git.go 45.45% <ø> (ø)
... and 33 more

... and 41 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lunny lunny merged commit d02e83a into go-gitea:main Mar 24, 2023
@lunny lunny removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 24, 2023
@techknowlogick techknowlogick added the outdated/backport/v1.19 This PR should be backported to Gitea 1.19 label Mar 30, 2023
@GiteaBot
Copy link
Contributor

I was unable to create a backport for 1.19, please send one manually. 🍵

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label Mar 30, 2023
sillyguodong added a commit to sillyguodong/gitea that referenced this pull request Mar 30, 2023
Before, in project edit page, the cancel button is not work.

https://user-images.githubusercontent.com/33891828/227182731-6478e29f-0e52-48c4-beb0-6a7d1dda6a1d.mov

1. The wrong classname `cancel` was added to the `<a>` tag. That
classname caused the default click event of `<a>` tag to be cancelled.
Because we have the following settings in the global. So I remove the
classname `cancel`.

https://github.com/go-gitea/gitea/blob/9be90a58754061171bbd5025d85d2b891364efd3/web_src/js/features/common-global.js#L325-L327

2. Another change is that page will redirect to the previous page.

https://user-images.githubusercontent.com/33891828/227187326-c653c6d6-9715-440f-a732-ba0a6f012c81.mov
# Conflicts:
#	templates/projects/new.tmpl
#	templates/repo/projects/new.tmpl
#	web_src/js/features/common-global.js
KN4CK3R pushed a commit that referenced this pull request Mar 30, 2023
Backport #23655

Before, in project edit page, the cancel button is not work.


https://user-images.githubusercontent.com/33891828/227182731-6478e29f-0e52-48c4-beb0-6a7d1dda6a1d.mov

1. The wrong classname `cancel` was added to the `<a>` tag. That
classname caused the default click event of `<a>` tag to be cancelled.
Because we have the following settings in the global. So I remove the
classname `cancel`.


https://github.com/go-gitea/gitea/blob/9be90a58754061171bbd5025d85d2b891364efd3/web_src/js/features/common-global.js#L325-L327

2. Another change is that page will redirect to the previous page.


https://user-images.githubusercontent.com/33891828/227187326-c653c6d6-9715-440f-a732-ba0a6f012c81.mov
@KN4CK3R KN4CK3R added the backport/done All backports for this PR have been created label Mar 30, 2023
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
@sillyguodong sillyguodong deleted the bugfix/project_cance_editl_btn branch February 29, 2024 03:31
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/manual No power to the bots! Create your backport yourself! lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. outdated/backport/v1.19 This PR should be backported to Gitea 1.19 skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants