Skip to content

fix(lab): MobilePowerSearch's sticky sheet header stays above the rows scrolling under it - #8005

Merged
imdreamrunner merged 1 commit into
mainfrom
fix/lab-mobile-powersearch-sticky-header
Oct 23, 2026
Merged

imdreamrunner merged 1 commit into
mainfrom
fix/lab-mobile-powersearch-sticky-header

Conversation

@imdreamrunner

Copy link
Copy Markdown
Contributor

User impact

On a phone, scrolling any MobilePowerSearch sheet a little (Add filter is where it shows first) paints the list rows over the sticky header: the first row's label appears on top of the "Search filters…" field, and the field reads as broken. Every sheet with a sticky header (Filters, Add filter, the value step) is affected.

Problem and solution fit

  1. Why does it happen? The sticky header has z-index: 0 so it would not cover the BottomSheet grab handle, which sits at z-index: 1 on the panel. The List rows are position: relative with z-index: auto and come after the header in the tree, so they are painted after it, on top.
  2. Why does it harm the task? The search field and the title are unreadable as soon as the list moves, and the overlap looks like a layout bug.
  3. Why does that matter? The Add filter step is the entry point of the flow; it is the first thing a person scrolls.

The fix scopes the layering to the sheet's content: the wrapper that holds the header, body and footer gets isolation: isolate, and the sticky header and footer get z-index: 1 inside it. Rows scroll under the header; the grab handle, which is outside that wrapper, still paints above it.

Expected behavior and authority

A sticky header is drawn above the content scrolling under it, and the BottomSheet grab handle stays visible (component:BottomSheet anatomy: the handle is part of the panel chrome).

Smallest restoration

Three style values in MobilePowerSearch.tsx (isolation on the sheet content wrapper, z-index: 1 on the sticky header and footer) and their comments. No API, prop, or visual change other than the overlap.

Evidence

  • Reproduction before the change: a scrolled Add filter sheet on a phone shows the first row ("Status") painted across the "Search filters…" field.
  • Result after the change: the header's computed z-index is 1 and the content wrapper is isolated (new test); rows pass under it.
  • Representative unchanged path: the grab handle stays above the sheet content because the header's layer is confined to the isolated wrapper; the sticky footer keeps its place above the rows.
  • Regression test: MobilePowerSearch.test.tsx › "keeps the sticky header above the rows that scroll under it, without covering the grab handle" — fails with the previous z-index: 0 and no isolation, passes now.

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm exec vitest run packages/lab/src/MobilePowerSearch packages/lab/src/MobileTokenizer: 92 passed.
  • The new test fails when the old values are restored (mutation check).
  • Strict lint and Prettier clean on the changed files. @astryxdesign/lab is private, so no changeset.

…s scrolling under it

Each sheet's sticky header (title, Back, the field search) had z-index 0
so it would not cover the sheet's grab handle (z-index 1). The List rows
below it are position: relative and come later in the tree, so when the
list scrolled they painted over the header: the first row's label showed
through the search field.

The sheet content wrapper now isolates its own stacking context, and the
sticky header and footer sit at z-index 1 inside it. Rows pass under the
header, and the grab handle, outside the wrapper, still paints above.
@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 23, 2026 9:04pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 23, 2026
@astracat-bot

astracat-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 23, 2026, 9:22 PM UTC

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Modified Components

MobilePowerSearch (@astryxdesign/lab) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 2420 -
Complexity N/A Very High (312) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/lab N/A 4.6KB 1.9KB

Accessibility Audit

Status: No accessibility violations detected.


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

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge. Isolating the sheet content and giving the sticky header and footer a local z-index: 1 keeps the list rows under the header while the BottomSheet grab handle stays on top, which follows the repository's local-stacking spec (AST-027). Rows now pass under the header in both the Add filter sheet and the value step, and the new test fails against the previous values. No changes are needed.

[Automated review]

@imdreamrunner
imdreamrunner enabled auto-merge (squash) October 23, 2026 22:30
@imdreamrunner
imdreamrunner merged commit ae842c8 into main Oct 23, 2026
66 checks passed
@github-actions
github-actions Bot deleted the fix/lab-mobile-powersearch-sticky-header branch October 24, 2026 06:20

This branch was successfully deployed

1 active deployment
Preview — 404c5dc5 Deployed Oct 23, 2026 by vercel[bot]
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