Skip to content

Add "copy branch name" (icon) on dropdown branch selector #25120

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

Closed
sgabenov opened this issue Jun 7, 2023 · 12 comments · Fixed by #25596
Closed

Add "copy branch name" (icon) on dropdown branch selector #25120

sgabenov opened this issue Jun 7, 2023 · 12 comments · Fixed by #25596
Assignees
Labels
proposal/accepted We have reviewed the proposal and agree that it should be implemented like that/at all. type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@sgabenov
Copy link

sgabenov commented Jun 7, 2023

Feature Description

I want to have ability to easy copy branch name with dropdown menu. Now i can only do this from URL link after selecting the necessary branch

I expect to add this copy button as on the attached mock.
Also, add a context menu "copy branch name" when you click on ... button (button not yet available/implemented)

Screenshots

image

@sgabenov sgabenov added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Jun 7, 2023
@sgabenov
Copy link
Author

sgabenov commented Jun 7, 2023

As well add it here
image

@silverwind
Copy link
Member

silverwind commented Jun 7, 2023

Yes, seems useful to have. In the dropdown, the icon should show only on hover like the current RSS button does.

@silverwind silverwind added the proposal/accepted We have reviewed the proposal and agree that it should be implemented like that/at all. label Jun 7, 2023
@lunny
Copy link
Member

lunny commented Jun 8, 2023

I don't think dropdown is a good place to do that but branches and tags should be better places.

@sgabenov
Copy link
Author

sgabenov commented Jun 9, 2023

I don't think dropdown is a good place to do that but branches and tags should be better places.

This is the way it is done in Bitbucket and i can say it is much easier to do, then go into "brunch" menu

@puni9869
Copy link
Member

I can take it forward. Assign me.

@puni9869
Copy link
Member

puni9869 commented Jun 28, 2023

There are some observation in different platforms like Github, Gitlab, Bitbucket and bunch of more platform.
I have observed they all have copy option for branch name. They don't have copy option for tags.

As a UX prespective for tags we don't need copy option.

By above observation I am suggsting the following UI changes, I know they might not align with UX point of way.But they are simplest to make quick.

Here is my suggestions:
image

When Hover on Copy
image

When Clicked on Copy
image

Code changes in files:-

<button class="btn interact-bg gt-p-3" data-clipboard-text="{{.Name}}" data-tooltip-content="{{$.locale.Tr "repo.branch.copy_branch_name"}}">{{svg "octicon-copy"}}</button>

Translations:-
en-US.ini

[repo]
branch.copy_branch_name = Copy Branch Name

@silverwind @delvh
I am open for any UI/UX suggestion which work the best.

@silverwind
Copy link
Member

@puni9869 seems good there as we should have enough space, but please test with long branch names to be sure. Otherwise, I'm happy to accept a PR for that.

@puni9869
Copy link
Member

Are you referring this use case.
This is the long text branch name. We are not showing branch name in Tippy popup.
image

@silverwind
Copy link
Member

yes, looks good. There is plenty of space for more buttons with such ellipsis, so we can add it.

@puni9869
Copy link
Member

puni9869 commented Jun 28, 2023

Please correct me if I am going in different direction.
Screenshot 2023-06-29 at 12 16 14 AM

Here you want to add the copy button, Near the branch name/

But, There is a problem with UI, We need to modify this tag with every screen set. That will be a tricky effort. I am not worry about the effort. But that will be unnecessary to do for such small thing.

image

Decision is all yours.

@silverwind
Copy link
Member

No, I did not mean that. Just go with your original suggestion. I was just worrying that the extra button may cause issues with the table layout, but it doesn't.

@puni9869
Copy link
Member

Cool, Pr is coming ASAP. Thanks a ton for immediate support.

silverwind pushed a commit that referenced this issue Jun 30, 2023
Adding  branch-name copy  to clipboard and button in branches screen

Replaces #25569
Fixes #25120


New mocks:
<img width="876" alt="Screenshot 2023-06-30 at 12 01 41 AM"
src="https://github.com/go-gitea/gitea/assets/80308335/a34ab00f-5625-4529-ba17-f2bf7af58e2a">
<img width="822" alt="Screenshot 2023-06-30 at 12 03 59 AM"
src="https://github.com/go-gitea/gitea/assets/80308335/3a32dffc-52cd-49e1-a437-6d11d58d0939">

<img width="476" alt="image"
src="https://github.com/go-gitea/gitea/assets/80308335/85e8f361-5cb7-45d4-aced-ad2523d54ab0">
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
proposal/accepted We have reviewed the proposal and agree that it should be implemented like that/at all. type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants