Skip to content

feat: add accepted state indicator and Done button to JsonDrawer#146

Merged
StephenTangCook merged 2 commits into
mainfrom
claude/json-panel-close-feedback-3vrdv9
Jul 7, 2026
Merged

feat: add accepted state indicator and Done button to JsonDrawer#146
StephenTangCook merged 2 commits into
mainfrom
claude/json-panel-close-feedback-3vrdv9

Conversation

@StephenTangCook

Copy link
Copy Markdown
Contributor

Summary

Enhanced the JsonDrawer component with visual feedback when JSON input is accepted and added a "Done" button to close the drawer. The component now displays a checkmark indicator for 900ms after valid input is applied, and treats empty textarea input as an accepted empty block list rather than a parse error.

Why

Users need clear feedback that their JSON edits have been successfully applied. The previous implementation only showed validation errors, leaving successful submissions ambiguous. Additionally, a "Done" button provides an explicit way to close the drawer, improving UX clarity.

Test plan

  • Added unit tests covering:
    • Blank textarea rendering when no blocks exist
    • Done button closes the drawer
    • Accepted indicator displays after valid edits
  • pnpm typecheck
  • pnpm lint
  • pnpm test
  • Spot-checked in pnpm storybook (if UI changed)

Manual verification: Confirm the checkmark indicator appears for 900ms after editing valid JSON, and that clearing the textarea to paste new content doesn't flash a parse error.

https://claude.ai/code/session_01FaHNdDWDDxR8j7psETAewZ

- Adds a "Done" button at the bottom of the JSON panel to close it
- Flashes a checkmark indicator whenever a typed edit is successfully
  parsed and applied to the draft
- Empty blocks now render a blank textarea instead of "[]", and a
  blank/whitespace-only textarea is treated as an empty block list
  rather than a parse error
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
block-kitchen 48d839a Commit Preview URL

Branch Preview URL
Jul 07 2026, 06:32 PM

- Done button now uses the shared primary Button component
- The accepted checkmark now sits to the left of the copy button
  (top-right of the panel) and stays visible longer (1.8s)
@StephenTangCook StephenTangCook merged commit 6b4b691 into main Jul 7, 2026
13 checks passed
@StephenTangCook StephenTangCook deleted the claude/json-panel-close-feedback-3vrdv9 branch July 7, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants