Skip to content

Conversation

sergeibbb
Copy link
Member

@sergeibbb sergeibbb commented Sep 2, 2024

Description

Or instead, the Delete Worktree flow could just be triggered as an optional step in the Delete Branch flow.

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

sergeibbb added a commit that referenced this pull request Sep 2, 2024
@sergeibbb sergeibbb force-pushed the feature/GLVSC-632-delete-branch-and-worktree branch from ce5c2d9 to 4d7a322 Compare September 2, 2024 17:20
Copy link
Contributor

@axosoft-ramint axosoft-ramint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just commenting on the user experience, but when I choose to delete a branch, I find it a bit stange that it jumps me into this screen:

image

There is no indication here that "this is a branch with a worktree, so you need to delete the worktree first". It just says "delete worktree". So even though I know what is happening as a developer, if I was a user who is unaware of what is going on, there is no information on what's going on here, so it would feel like I clicked the wrong command, even though I did not.

I think we can do a better job with messaging to make this less confusing. Either the title of the "delete worktree" step can be updated, or the two available options can say "Delete Worktree & Branch" and "Force Delete Worktree & Branch", to make it clear that we are deleting the worktree and then the branch.

repo: string | Repository;
uris: Uri[];
flags: DeleteFlags[];
doNotSuggestDeletingBranches?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can just pass branch or branches as state when coming from "delete branch" and then we don't need to calculate them on the delete steps, and also can use their existence in state as a flag to restrict the options?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@axosoft-ramint

What do you think about this:
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@axosoft-ramint

then we don't need to calculate them on the delete steps

It's not clear how we can use the passed branches on the "worktrees" step. We calculate branches only if "Delete Worktrees&Branches" is selected, but those are hidden.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough - if the state isn't needed then a boolean should suffice 👍🏼

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@axosoft-ramint

I'm thinking about renaming because it affects the view in a very specific case. "Deleting of the worktree of a selected branch". So, it can be called like this: deletingOfSelectedBranches, or moreover I'm thinking of replacing the field by a flag:

type DeleteFlags = '--force' | '--delete-branches' | '--deleting-of-selected-branches';

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sergeibbb No preference here. Up to you. Doing it with a flag like that sounds fine. My main hope is that the messaging on the worktree step allows me to understand that we are deleting the worktree because it is necessary to delete the branch.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@axosoft-ramint

Ok. I'm leaving it with the flag. Feel free to suggest updates for the wording, so it would be more clearer for user. You are the native speaker, so, you know it better.

Copy link
Contributor

@axosoft-ramint axosoft-ramint Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sergeibbb I think we can take out the word "corresponding" in the options since it becomes a bit wordy. We should also make sure the capitalization is consistent in the options.

What do you think about "Delete Worktree of Branch"/"Delete Worktrees of Branches" etc.?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sergeibbb I updated the wording on your branch. Thanks for working on this!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thank you!

@sergeibbb sergeibbb force-pushed the feature/GLVSC-637-delete-worktree-and-branch branch from 7a5d919 to c029552 Compare September 3, 2024 17:26
@eamodio eamodio changed the title Deleting a branche calls dialog of deleting its worktree (GLVSC-632) Deleting a branch calls dialog of deleting its worktree (GLVSC-632) Sep 3, 2024
Base automatically changed from feature/GLVSC-637-delete-worktree-and-branch to main September 3, 2024 17:40
@sergeibbb sergeibbb force-pushed the feature/GLVSC-632-delete-branch-and-worktree branch from 4d7a322 to 34d4ec0 Compare September 3, 2024 18:42
@sergeibbb sergeibbb marked this pull request as ready for review September 3, 2024 18:45
Copy link
Contributor

@axosoft-ramint axosoft-ramint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@axosoft-ramint axosoft-ramint merged commit 6171aeb into main Sep 3, 2024
@axosoft-ramint axosoft-ramint deleted the feature/GLVSC-632-delete-branch-and-worktree branch September 3, 2024 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants