Repository navigation
feat(ui): an icon is edited by hovering it, with a corner button to remove it - #852
Open
Yifan Lin (linyifan1024) wants to merge 3 commits into
Open
Yifan Lin (linyifan1024) wants to merge 3 commits into
Yifan Lin (linyifan1024) wants to merge 3 commits into
Conversation
Contributor
Dependency graph benchmarkMedians of 3 runs in headless Chrome on a shared runner; lower is better. Base and head run in turn on the same machine. thousand
three-thousand
nested
|
Yifan Lin (linyifan1024)
marked this pull request as ready for review
November 25, 2026 20:11
Yifan Lin (linyifan1024)
marked this pull request as draft
November 25, 2026 20:12
Yifan Lin (linyifan1024)
marked this pull request as ready for review
November 25, 2026 20:13
…he crop dialog is exported Claude-Session: https://claude.ai/code/session_019AN33kiCqa4Smjx6onUzfx
This branch has not been deployed
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
EditableIcon: an icon someone can change. Hovering or focusing it dims it and shows the edit text in the middle; clicking it, or Enter, callsonEdit. A round button on its top-right corner callsonRemove, shown only while there's an image. It takes the image's URL (orrenderImage), afallbackIcon, a circle or squareshape,borderandbgColor, and its text from the shared strings or props.ImageUploaduses it: the separate "Edit image" menu button beside the tile is gone. Clicking the tile opens the file picker and the crop dialog as before; the corner button removes the image.ImageUploadsaves an animated GIF as it is, skipping the crop that would keep only its first frame, and passesonUploada second argument that makes the GIF's centered square as a PNG, for a server that won't take GIFs. A GIF upload that fails shows its message in a toast.imageUpload.uploadandimageUpload.replaceare gone from the strings, since nothing shows them now. A host that passes them drops them.Testing
EditableIcon.test.tsx;ImageUpload.test.tsxcovers the corner button and the GIF path. The stories smoke test includes the new stories: 738 passed.tsc --noEmitpass.At rest:

Hovered:

Keyboard focus:

After removing the image (hovered, no corner button):

Image upload tile, hovered:

Checklist
make checkpasses (ran biome,tsc --noEmitand the ui tests above; CI runs the rest)problem/messages/(none changed)