Skip to content

feat: use distinct icons for Close file and Discard actions#161

Merged
k1LoW merged 3 commits intomainfrom
feat/distinct-close-discard-icons
Apr 4, 2026
Merged

feat: use distinct icons for Close file and Discard actions#161
k1LoW merged 3 commits intomainfrom
feat/distinct-close-discard-icons

Conversation

@k1LoW
Copy link
Copy Markdown
Owner

@k1LoW k1LoW commented Apr 4, 2026

Summary

  • Use stroke-based icons (matching other toolbar buttons) instead of filled Octicons for the Close/Discard button
  • Close file (local files): document icon with fold corner and × in the bottom-right, extending beyond the document boundary
  • Discard (drag-and-dropped files): trash can icon
  • Both CloseFileButton and FileContextMenu updated consistently

@k1LoW k1LoW added the enhancement New feature or request label Apr 4, 2026
@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 RemoveIcon component that renders either a document-with-× icon or a trash icon depending on uploaded.
  • Updated CloseFileButton to use RemoveIcon instead of an embedded filled Octicon.
  • Updated FileContextMenu to use RemoveIcon for 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 4, 2026

Code Metrics Report

main (75782b9) #161 (a99640d) +/-
Coverage 57.1% 57.1% -0.1%
Code to Test Ratio 1:0.5 1:0.5 -0.1
Test Execution Time 31s 31s 0s
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%)

Files Coverage +/- Status
internal/frontend/src/components/CloseFileButton.tsx 0.0% 0.0% modified
internal/frontend/src/components/FileContextMenu.tsx 20.0% 0.0% modified
internal/frontend/src/components/RemoveIcon.tsx 0.0% 0.0% added

Reported by octocov

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@k1LoW k1LoW merged commit 7f619ef into main Apr 4, 2026
7 checks passed
@k1LoW k1LoW deleted the feat/distinct-close-discard-icons branch April 4, 2026 11:53
@k1LoW k1LoW self-assigned this Apr 4, 2026
@github-actions github-actions bot mentioned this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants