Repository navigation
fix(studio): untangle nested buttons in editor tabs - #48101
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
📝 WalkthroughWalkthroughChangesTab control interactions
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎭 Playwright Test Results (tanstack)Details
Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
Stop spreading dnd-kit button attributes onto the sortable shell, and move close controls to siblings of TabsTrigger so tabs are no longer nested interactive elements.
b15d535 to
6c28ba0
Compare
Delete/Backspace on a focused tab closes it, and the active tab's close button is in the tab order with a visible focus ring.
…atchet-debt-82 Resolve SortableTab/Tabs conflicts by keeping the nested-button fix from #48101; the branch's tabIndex={-1} nits on those closes are superseded.
Braintrust eval report
|
…fomap-entry-for-pitr-archiving-stale' into hunleyd/indata-979-studio-lintinfomap-entry-for-pitr-archiving-stale * origin/hunleyd/indata-979-studio-lintinfomap-entry-for-pitr-archiving-stale: (35 commits) chore: simplify CPU messaging for compute sizes (#48109) chore(studio): add valtio and react-hook-form ESLint ratchet rules (#48037) feat: Add ai/python federated content and data (#48043) feat: Add ai-skills federated content and data (#48045) feat: Add deployment/ci federated content and data (#48041) fix(studio): wire up siwc-enabled query param opt-in on sign-in/sign-up (#48126) fix(studio): stop stacking overlaid area series in report charts (#48034) Update Dev toolbar to support filtering feature flags (#48137) Update dev toolbar to support mocking org restrictions (#48136) feat: Add terraform federated content and data (#48010) Chore/add sessions database connections (#48094) fix(studio): guard panel collapse/resize on narrow viewports (#48098) Landing page agent focus (#47989) fix(studio): chip away explicit-tabindex ratchet debt (#48040) fix(studio): untangle nested buttons in editor tabs (#48101) fix(docs): broken link (#48117) docs: add VS Code to the AI coding agent plugin install picker (#48108) docs: add Kimi Code to MCP and AI coding agent plugin setup (#48099) fix: preserve function responses (#47920) fix(assistant): SQL approval buttons do nothing (#48102) ...
What kind of change does this PR introduce?
A11y markup + keyboard close for editor tabs (Table Editor open tables / SQL Editor snippets).
What is the current behavior?
Editor tabs nest interactive elements (already in prod):
attributes→div role="button" tabindex="0"TabsTrigger→ real<button role="tab">role="button"nested inside the tab buttonClose was hover/pointer-only. There was no clear keyboard path.
What is the new behavior?
Markup
div(no dnd-kitattributes/ norole="button"). Safe because tab reorder only usesPointerSensor.<button type="button">sibling ofTabsTrigger.Keyboard close
tabIndex={0}); Tab from the active tab reaches ×, then Enter/Space closes. Inactive closes staytabIndex={-1}.Test plan
Markup
role="button"wrapper aroundrole="tab"; close is not nested inside the tab buttonMouse
Keyboard
Summary by CodeRabbit
New Features
Bug Fixes