feat: show Committed label on committed-only Review file rows - #239
Draft
Ziinc wants to merge 3 commits into
Draft
feat: show Committed label on committed-only Review file rows#239Ziinc wants to merge 3 commits into
Ziinc wants to merge 3 commits into
Conversation
Mark Review-tab file collapsibles that contain only committed changes with a Committed badge next to the existing Viewed/Renamed/Binary chips. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
Capture the Review tab with mixed committed/uncommitted files and assert the Committed badge appears only on the committed-only collapsible. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
| </button> | ||
| {isCommitted && ( | ||
| <span | ||
| data-testid="committed-file-label" |
There was a problem hiding this comment.
Separate isCommitted from readOnly because the whole Review pane can already be read-only for other reasons — using readOnly alone would mis-label uncommitted rows.
- Only the
committedFiles.map(...)branch inDiffContentArea.tsxpassestrue - Backend already keeps committed-only paths out of the uncommitted list, so this badge means committed-only, not mixed
| expandedLargeDiffs={expandedLargeDiffs} | ||
| diffFontSize={diffFontSize} | ||
| readOnly={true} | ||
| isCommitted={true} |
There was a problem hiding this comment.
Wire-up only: committed rows already rendered below uncommitted ones with readOnly={true} + overrideFileHunks. Adding isCommitted={true} here is what makes the header badge show without changing collapse/hunk loading behavior.
Move the committed-only chip next to the path copy control and restyle it as a light sky badge at text-sm. Co-authored-by: Ziinc <Ziinc@users.noreply.github.com>
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
text-sm) next to the copy button.committedFilesmap inDiffContentArea.App QA
Light blue Committed label next to copy button
Test plan
FileRowHeader.test.tsx: committed-only rows showcommitted-file-label; uncommitted rows do notcommitted-only.txtonlyTo show artifacts inline, enable in settings.