-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Refactor RepoBranchTagSelector #32681
Conversation
d0b7624
to
3a548cb
Compare
3a548cb
to
e82471b
Compare
{{template "repo/branch_dropdown" dict | ||
"Repository" .Repository | ||
"ShowTabBranches" true | ||
"CurrentRefType" "branch" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like start showing from branch tab is not correct. when i want to see source from tag, dropdown button still shows branch name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, this selector is used to choose the base branch to receive a cherry-pick commit. It is not used for "source of tags".
This is the same behavior as old code, old code used "noTag" true
to disable the tag tab and only show branch tab.
* giteaofficial/main: Refactor RepoBranchTagSelector (go-gitea#32681) Allow to disable the password-based login (sign-in) form (go-gitea#32687) Fix JS error when reply comment on Conversation page (go-gitea#32685) fix(go-gitea#32667): 🐛 Fixe a keystring misuse and refactor duplicates keystrings (go-gitea#32668)
RepoBranchTagSelector seems to be the dirtiest code ever and one of hardest JS modules to touch, a lot of unrelated things were mixed together.
To make it maintainable and easy to add more features, rewrite it.
It is still not perfect due to some legacy problems (for example: pass data into the sfc), overall it is much better than before (and jQuery is also removed)
Manually tested:
Repo Home:
Commits page:
Release page:
Commit Cherry-pick: