-
Notifications
You must be signed in to change notification settings - Fork 584
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
feat: enhance context menu labels for branch lane actions #5856
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
0f8afc2
to
8d36bb4
Compare
@krlvi would now be a good time to start changing how this works? Even with these improvements by Pavel I find both the language and the current outcomes very confusing. Iirc the consensus is to make creating a local branch an explicit "export" action, which should resolve the ambiguity of what it means to unapply. |
Looking back at the original issue, I'm a little disappointed in myself that I didn't spot this, and am sorry for causing extra work. We've now got the button text changing based on whether or not the branch is pushed or not, which I'm trying to decide whether it makes sense. Whether a branch is pushed or not has no effect on how the two options work. The behaviours are as follows: If no local branch exists for a lane:
If a local branch exists for a lane:
|
const isVirginLane = $derived( | ||
branch.name.toLowerCase().includes('lane') && commits.length === 0 && branch.files?.length === 0 |
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.
This doesn't make sense as a pushed/unpushed check, how do we tell if all of the branches in a given lane are integrated. Presumably we could use that mechanism.
I see. I've converted this to a draft. btw Instead of disabling certain labels, I hid them. But maybe we should keep showing them in a disabled state instead. @mtsgrd @Caleb-T-Owens, do you have any concrete suggestions regarding the labels? |
As we did identify in the issue, if a branch has no commits or changes, then hiding/disabling As for the other states, I'm not sure changing between |
Got it. Let me update this |
I guess when it's an empty branch and is only showing I do wonder if it would be preferable to keep it with the longer label, and have two tooltips that explain what the two actions do:
|
Thank you for your patience!!!! ❤️ |
@Caleb-T-Owens No problem! 😊 Could we also update the docs? I'm relying more on the docs with the new software rather than tooltips. It looks like the section on "applying and unapplying branches" is outdated. Basically: ![]() I'm also not sure if we're still using the term "Virtual branches." ![]() |
8d36bb4
to
9aaace5
Compare
@Caleb-T-Owens updated variant |
Why does it still have two extra states that depend on whether the lane has been pushed or not? |
I thought there were three conditions:
|
@PavelLaptev I laid out the behaviour of the two buttons in this message: #5856 (comment) The behaviour doesn't change if you've pushed or not. Does the behaviour of the buttons make sense? |
@Caleb-T-Owens I’m not changing the button behavior. According to this issue, if there are no changes and no pushed/local branches, rename "Unapply and drop changes" to "Remove" and disable "Unapply" because it doesn’t make sense. |
9aaace5
to
69a5bdc
Compare
I closed this PR because we will address this more effectively in V3 |
Reasoning:
Make the "Unapply" and "Unapply and drop changes" options clearer in different lane states.
Related issues: #5683
Here is how it looks:
Let me know if you have any improvements.