Repository navigation
fix(files): keep the Changes stage icon after the row's overflow menu opens - #1021
Merged
Merged
Conversation
… opens FileRowActions renders each secondary action twice: as an inline icon button and as an item of the row's overflow menu, which replaces the inline buttons on narrow rows. The Changes stage/unstage action created its icon once, so opening the menu moved that single DOM node into the menu; once the row widened again the inline button had no icon. The Workspace tree already avoids this with icon getters. The stage icon is now a getter too, keeping the stable action array that large inventories rely on; the pinned preview eye never overflows and stays as is. Validation: git-changes-scale now opens and closes the menu on a narrow row, widens it and checks the inline stage button still has its icon; it failed (0 icons) before the fix and passes after. git-changes-scale 6/6 and git-history 20/20 pass; typecheck passes.
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
FileRowActionsrenders each secondary action twice: as an inline icon button, and as an item of the row's overflow menu, which replaces the inline buttons on narrow rows. The Changes stage/unstage action created its icon only once, so opening the menu moved that single DOM node into the menu. Once the row widened again, the inline button had no icon.The Workspace tree already avoids this with icon getters. The stage icon is now a getter too. The action array keeps its identity, which large inventories rely on. The pinned preview eye never overflows, so it stays as it is. No other
FileRowActionscaller shares a node between the inline button and the menu.Validation
git-changes-scale: open and close the menu on a narrow row, widen it, and verify the inline stage button still has its icon. It failed before the fix (0 icons) and passes after.git-changes-scale6/6 andgit-history20/20 pass.