Skip to content

fix: add isolation to components with leaky z-index - #2004

Merged
cixzhang merged 1 commit into
mainfrom
navi/fix/z-index-isolation-sweep
May 3, 2026
Merged

fix: add isolation to components with leaky z-index#2004
cixzhang merged 1 commit into
mainfrom
navi/fix/z-index-isolation-sweep

Conversation

@cixzhang

@cixzhang cixzhang commented May 3, 2026

Copy link
Copy Markdown
Contributor

Sweep of all z-index usage in core — five components use z-index internally but their containers lacked a stacking context, letting values leak to the parent.

Adds isolation: isolate to:

Component Container Why z-index exists
CheckboxInput checkboxWrapper Hidden input above visible checkbox
RadioListItem radioWrapper Hidden input above radio visual
Switch switchWrapper Hidden input above track
Slider trackContainer Thumb above track/filled track
Thumbnail root Remove button + upload overlay above image

Companion to #2001 (Calendar). The remaining z-index sites are already contained (Field, Chat, CodeBlock, AppShell) or intentionally cross-boundary (SideNav sticky, Toast, Popover, Table resize, Resizable handle).

CheckboxInput, RadioListItem, Switch, Slider, and Thumbnail all use
z-index internally (hidden inputs above visuals, thumb above track,
remove button above image) but their containers lacked a stacking
context, letting those values leak to the parent.

Add isolation: isolate to each container so internal z-index stays
scoped without affecting external layout.
@vercel

vercel Bot commented May 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
xds-sandbox Ready Ready Preview, Comment May 3, 2026 0:13am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 3, 2026
@github-actions

github-actions Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 17.7KB 27.5KB 4.1KB

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@cixzhang
cixzhang merged commit d43c331 into main May 3, 2026
20 checks passed
@github-actions
github-actions Bot deleted the navi/fix/z-index-isolation-sweep branch May 4, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant