-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add delete tags functionality #9796
Conversation
This just randomly popped up in the console of this build (a462040),
|
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.
-
Functionally everything works great for OSX, however there is a 2-3 sec lag in getting the tag to be recognized by Desktop. For example, if I create a tag and immediately try to delete it, there is a lag which prohibits me from doing soon right away. Is this due to the dev env?
-
Secondly, perhaps we should always show the
Delete tag
menu option, but just disable it if the logic does not apply? It would be consistent with theView on Github
option here:
There is an edge case if we opt to go this route. If a pushed commit with an existing tag gets a new second tag, we would have to enable Delete tag option, but in the secondary context menu, only show the new tag as enabled.
--
In Windows after running yarn build:dev
I am getting this error and I cannot successfully spin up:
@tierninho see #9396 |
Thanks for pointing to the "View on GitHub" option, I agree we should be consistent here (I remember @ampinsk also mentioning that to me for the submenu, so we seem to all agree), so I'll change this.
Yes I think that this should be fine, do you think this can cause problems/confussion?
Yup, this delay is caused by the network request that is done to check for unpushed tags. This delay will probably go away once #9800 is fixed. |
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.
Looking good @rafeca, a few nitpicks from me and one theoretical concern, happy to discuss that when we sync up later today
I opened this PR in Windows, but every time I try to create or delete a tag it crashes with this error:
|
@tierninho You’ll have to rebuild the main process for this to work. |
6423e9e
to
22016b6
Compare
Already pushed tags are now in a disabled state
Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
Co-authored-by: Markus Olsson <j.markus.olsson@gmail.com>
Co-Authored-By: Markus Olsson <niik@users.noreply.github.com>
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.
Just a tiny question remaining. I'm fine with not addressing it but it felt like such a small change
…hen the tag gets deleted correctly
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.
Confirming that functionality works great on both OSX/Win however I spotted this edge case:
- User can delete a tag while commits are pushed.
- Add a tag and push
- While the tag is being right-click to delete the tag
- Wait until push finishes in background (Delete modal should still be open).
- Notice that at this point, a user should not be able to delete a tag
- Click
Delete
and it is removed - Click
Fetch
to bring it back
Also, a suggestion:
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.
Awesome, for the sake of getting us set up for a beta I'm going to merge this as-is and leave the suggestions @tierninho made to be considered separately
Closes #9770
This PR is based on #9828
Description
This PR adds the functionality to delete tags that haven't been pushed yet from GitHub Desktop.
In order to do so, a new context menu item has been added to commits that have unpushed tags. If the commit has one single unpushed tag, the menu iten will show a text like "Delete tag v1.0.0", but if there are more than one unpushed tags, the menu item will display a "Delete tags..." text and will show the tags that can get deleted via a submenu.
In order to implement that, the context menu behaviour has been changed to support submenus in context menus (see commit 55443cd).
@tierninho in order to test this PR you'll have to run
yarn build:dev
beforehand, since it modifies code from the main process.Screenshots
Release notes
Notes: [Added] Allow to delete tags that have not been pushed to the remote repository