Skip to content

chore: 🤖 restore flyout content focus handlers#924

Merged
punkbit merged 4 commits intomainfrom
chore/restore-flyout-content-focus-handlers
Mar 12, 2026
Merged

chore: 🤖 restore flyout content focus handlers#924
punkbit merged 4 commits intomainfrom
chore/restore-flyout-content-focus-handlers

Conversation

@punkbit
Copy link
Collaborator

@punkbit punkbit commented Mar 12, 2026

Why?

Restore focus handlers in flyout's props type definition. These focus management props were inadvertently removed during the decoupling from Radix UI types, e.g. needs a few more iterations/passes to get right. They are now explicitly added back to provide parity with the Dialog component and support common accessibility use cases.

How?

  • Add optional handlers onOpenAutoFocus and onCloseAutoFocus

Preview?

N/A

@changeset-bot
Copy link

changeset-bot bot commented Mar 12, 2026

🦋 Changeset detected

Latest commit: d6d628a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clickhouse/click-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ClickHouse ClickHouse deleted a comment from github-actions bot Mar 12, 2026
@github-actions
Copy link

github-actions bot commented Mar 12, 2026

Claude finished @punkbit's task in 58s —— View job


Code Review

✅ Looks great! No issues found — nice work!

Summary: This PR correctly restores onOpenAutoFocus and onCloseAutoFocus to FlyoutContentProps. The type signatures (event: Event) => void match Radix UI's DialogContent expectations, and the Content component already forwards these via {...props} to the underlying FlyoutContent (a styled(DialogContent)), so no implementation changes are needed — only the type definition was missing.

A quick check confirms all other Radix DialogContent focus/interaction handlers are already present (onEscapeKeyDown, onPointerDownOutside, onInteractOutside, onFocusOutside), making the surface complete.

♿ Accessibility — positive impact: restoring these hooks allows consumers to prevent or customize the default focus-trap behavior on open/close, which is important for embedded/inline flyout use cases where auto-focusing may conflict with the surrounding context.

@workflow-authentication-public
Copy link
Contributor

📚 Storybook Preview Deployed

✅ Preview URL: https://click-4gi8ljjl3-clickhouse.vercel.app

Built from commit: ab6e1056ea90d434b7ce7bb286e2f855eca6db7e

@punkbit punkbit requested a review from hoorayimhelping March 12, 2026 15:58
@punkbit punkbit merged commit 3fbefc6 into main Mar 12, 2026
8 checks passed
@punkbit punkbit deleted the chore/restore-flyout-content-focus-handlers branch March 12, 2026 16:23
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