feat: use distinct icons for Close file and Discard actions#161
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the frontend UI to use distinct stroke-based icons for file removal actions, differentiating Close file (local files) from Discard (drag-and-dropped/uploaded files), and applies the change consistently across toolbar and context menu.
Changes:
- Added a new
RemoveIconcomponent that renders either a document-with-× icon or a trash icon depending onuploaded. - Updated
CloseFileButtonto useRemoveIconinstead of an embedded filled Octicon. - Updated
FileContextMenuto useRemoveIconfor the Close/Discard menu item.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/frontend/src/components/RemoveIcon.tsx | Introduces a reusable stroke-based icon component for Close vs Discard variants. |
| internal/frontend/src/components/FileContextMenu.tsx | Replaces the filled remove icon with RemoveIcon and keeps Close/Discard labeling. |
| internal/frontend/src/components/CloseFileButton.tsx | Replaces the filled remove icon with RemoveIcon in the toolbar close/discard button. |
Contributor
Code Metrics Report
Details | | main (75782b9) | #161 (a99640d) | +/- |
|---------------------|----------------|----------------|-------|
- | Coverage | 57.1% | 57.1% | -0.1% |
| Files | 40 | 41 | +1 |
| Lines | 3538 | 3539 | +1 |
| Covered | 2023 | 2023 | 0 |
- | Code to Test Ratio | 1:0.5 | 1:0.5 | -0.1 |
| Code | 5686 | 5717 | +31 |
| Test | 2961 | 2961 | 0 |
| Test Execution Time | 31s | 31s | 0s |Code coverage of files in pull request scope (18.1% → 16.6%)
Reported by octocov |
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