Improve discard unstaged messaging and disabled state clarity#5406
Open
dhanush0x96c wants to merge 5 commits intojesseduffield:masterfrom
Open
Improve discard unstaged messaging and disabled state clarity#5406dhanush0x96c wants to merge 5 commits intojesseduffield:masterfrom
dhanush0x96c wants to merge 5 commits intojesseduffield:masterfrom
Conversation
The "Discard unstaged changes" menu item was incorrectly disabled when no staged changes were present, even if unstaged changes existed. This change ensures it is only disabled when there are no unstaged changes.
Author
|
Note: updated the English translation only; other languages are handled via Crowdin. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #5388
This PR improves the clarity of the "Discard unstaged changes" action by refining its tooltip and providing more precise disabled-state messages.
Problem
The previous messaging could be confusing:
This made it difficult for users to understand the intent of the action and the conditions under which it is enabled.
Solution
This PR improves the wording and feedback without changing any underlying behavior:
Updated the tooltip to explicitly state that staged changes are preserved
Split the disabled reason into two context-specific messages:
These changes make the UI more intuitive and reduce confusion by clearly explaining both the action and its availability.
Checklist
go generate ./...)