-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Show branches and tags that contain a commit #25180
Show branches and tags that contain a commit #25180
Conversation
modules/git/commit.go
Outdated
// LoadBranchName load branch name for commit | ||
func (c *Commit) LoadBranchName() (err error) { | ||
if len(c.Branch) != 0 { | ||
return | ||
} | ||
|
||
c.Branch, err = c.GetBranchName() | ||
return err | ||
} |
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.
Note regarding the changes (above this line) in this file:
They are unused already, hence I removed them.
Below this line was made redundant through this PR.
For the branches, I guess a I would put all branches and tags into the same wrapping flexbox please and add a icon to each. |
I don't think it's a good idea to load them separately. |
Or maybe just two buttons besides the main branch: "Show all branches", "Show all tags" that expand to the inline list of branches and tags. |
Furthermore, I've even contemplated removing the |
Okay if you load them together, that's even simpler. Just a |
Why not do what GitHub does and show a tag range of newest to oldest with an expander in between? It gives just enough info that most of the time I do not need to click expand at all: |
Well… I've explicitly decided against such a mechanism. I mean, if you want to try your luck feel free to, but I think the current mechanism suffices for now. ( |
I guess my ideal UI would be
Where both expanders load the stuff individually. Can we at least decouple the two loads? |
As I said: Feel free to implement, but in general I don't quite see the usefulness behind requiring two clicks instead of one. |
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.
I completely agree with your changes.
(But it is funny that you reverted the layout basically to what it was before the PR review started 😁)
Hmm, I didn't realize that it was asked to do that. I didn't make the "icon" alone because the spaces above/below it look very strange to me. So I make the icon "inline" with other texts. But, if most people like the "icon with vertical spaces", I can try to "revert the revert". |
At least as far as I'm concerned, I can live with both. |
To revert, it could look like this (ps: I didn't use vertical middle alignment because the space above the icon looks strange to me ....) |
I'm OK for the second and for the first one, the commits maybe garbage commits but not destroy yet. |
* giteaofficial/main: (21 commits) improve unit test for caching (go-gitea#26185) Render plaintext task list items for markdown files (go-gitea#26186) Add tooltip to describe LFS table column and color `delete LFS file` button red (go-gitea#26181) Show branches and tags that contain a commit (go-gitea#25180) Release attachments duplicated check (go-gitea#26176) Calculate MAX_WORKERS default value by CPU number (go-gitea#26177) Fixing redirection issue for logged-in users (go-gitea#26105) Update govulncheck, fix typo (go-gitea#26168) Fix handling of plenty Nuget package versions (go-gitea#26075) Fix typos in Contributing.md (go-gitea#26170) Disable download action logs button when there's no logs (go-gitea#26114) Re-add static images to docs (go-gitea#26167) Update email-setup.en-us.md (go-gitea#26068) Improve display of Labels/Projects/Assignees sort options (go-gitea#25886) Fix wrong branch name in rename branch modal (go-gitea#26146) Doc update swagger doc for POST /orgs/{org}/teams (go-gitea#26155) Fix UI regression of asciinema player (go-gitea#26159) refactor improve NoBetterThan (go-gitea#26126) Update Chinese documents (go-gitea#26139) Fix bugs in LFS meta garbage collection (go-gitea#26122) ...
* origin/main: (43 commits) Add `/public/assets` to `.ignore` (go-gitea#26232) Fix attachment clipboard copy on insecure origin (go-gitea#26224) Fix commit compare style (go-gitea#26209) Fix unable to display individual-level project (go-gitea#26198) Fix access check for org-level project (go-gitea#26182) Fixed incorrect locale references (go-gitea#26218) Use calendar icon for `Joined on...` in profiles (go-gitea#26215) Add changelog for 1.20.2 (go-gitea#26208) Add commits dropdown in PR files view and allow commit by commit review (go-gitea#25528) Warn instead of reporting an error when a webhook cannot be found (go-gitea#26039) Fixing the align of commit stats in commit_page template. (go-gitea#26161) Fix allowed user types setting problem (go-gitea#26200) Hide branch/tag icon if branches/tags are empty (go-gitea#26204) Prevent primary key update on migration (go-gitea#26192) improve unit test for caching (go-gitea#26185) Render plaintext task list items for markdown files (go-gitea#26186) Add tooltip to describe LFS table column and color `delete LFS file` button red (go-gitea#26181) Show branches and tags that contain a commit (go-gitea#25180) Release attachments duplicated check (go-gitea#26176) Calculate MAX_WORKERS default value by CPU number (go-gitea#26177) ...
Now, you can see for a commit which existing branches and tags contain it.
You first have to click on the
load branches and tags
button, they are not preloaded by default.All branches and tags are ordered descending by creation date.
You can even see without much hassle if the given commit is already part of the default branch.
Closes #25152
Screenshots
Initial
Loaded