-
-
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
Fix disabled open in vscode menu when disabling download source from UI #20713
Conversation
Codecov Report
@@ Coverage Diff @@
## main #20713 +/- ##
=======================================
Coverage ? 46.92%
=======================================
Files ? 981
Lines ? 136262
Branches ? 0
=======================================
Hits ? 63937
Misses ? 64477
Partials ? 7848 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
templates/repo/home.tmpl
Outdated
</div> | ||
</button> | ||
{{else}} | ||
<button id="download-btn" onclick="window.location='vscode://vscode.git/clone?url={{$.RepoCloneLink.HTTPS}}'" class="ui basic small compact jump icon button tooltip" data-content="{{.locale.Tr "repo.clone_in_vsc"}}" data-position="top right"> |
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.
Inline scripts, is that necessary? Is it possible to wrap a <a href=....>
into this element?
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 cannot compact all the buttons when using a tag. I have found other place to use onclick
, so just follow that.
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.
DisableDownloadSourceArchives
check is now missing and there is duplicate vscode button & menu
fixed. |
I think we should keep this a menu like #19999 did and not add more seldomly used buttons like this vscode button to the always-rendered view. E.g. revert this change, rename button to "More Actions" with new icon and then just add the hide conditions on the individual items that trigger downloads, unconditionally rendering the vscode menu item. |
But there is no point in menu if there is single item in it |
I'd argue there still is, for sake of consistent user experience where a menu doesn't magically transform into a single-action button. |
I think it's just a habbit problem. The most next action to click the copy button is to paste it in a client commandline or software and then clone the repository. But now, if you are using vscode(about 80% developers used), clicking the second button will finish them more frequently. In future, VSCode button could also become another menus to support gitpod or other offline/online editors which is different from the download archives behaviors. |
I personally do not use VSCode, so this feels like unnecessary preferential treatment of one editor over others. After #19999, will have citation actions as well in that menu and I'm sure there will be more stuff to come. So I still prefer that button to be tucked into that menu. |
That's my |
That's what I'd approve, e.g. just move the |
If there is planned adding more menu options than yes, it's no point in making it currently as button and then making it back in menu when other actions are added |
@Gusted it's just one of experimental proposals, if you look over this PR you will see multiple iterations here :) |
But as more items are soon to be added here I agree we should move back to inital commit 9815cf9 |
63601b9
to
e0ce701
Compare
I rollbacked to my first version since nobody against that for two days. @lafriks @silverwind @Gusted |
make L-G-T-M work |
* giteaofficial/main: Fix disabled open in vscode menu when disabling download source from UI (go-gitea#20713)
Fix #20579 (comment)