Skip to content

Add RevealPanel error handling - #15

Merged
maotora merged 4 commits into
mainfrom
feat/docs-redesign
Sep 6, 2026
Merged

maotora merged 4 commits into
mainfrom
feat/docs-redesign

Conversation

@maotora

@maotora maotora commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add normalized error state, reporting and clearing APIs, panel-wide error markers, and accessible error feedback
  • support guarded async onClose callbacks while keeping rejected closes open
  • harden close handling for React StrictMode, controlled-state transitions, reopened panels, and structured error metadata
  • rewrite the README as a concise guide to composition, async closing, error handling, controlled state, groups, accessibility, and the complete public API

Validation

  • npm run ci
  • npm run docs:build
  • 42 tests passing

Reported failures now keep the panel open, render a role=alert banner at
the bottom of the revealed content, show a red header badge, and mark
every region with data-error. Errors can be reported through render
props or useRevealPanelState, driven from outside with error/onErrorChange,
and onError is notified so backend failures are never silent. Async
onClose rejections become panel errors, and close requests are ignored
while a close is already in flight.
@maotora
maotora merged commit 198c3c8 into main Sep 6, 2026
4 checks passed
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.

1 participant