Repository navigation
test(Layer): cover a side placement, which no viewport story exercised - #7011
Merged
Merged
Conversation
Every Viewport inset story places its layer below its trigger, so the side placements had no coverage at either viewport. A side placement is the case where the slide cannot help: the alignment axis is the block axis, so sliding moves the layer up or down and does nothing about an inline overflow. Only the flip and the cap can keep it on screen. Two stories, both running at 1280x900 and 390x844 like the rest: a 320px layer placed to the inline end of a trigger 24px from that edge, which must flip rather than shrink; and a 900px layer placed to the start of a centred trigger, where neither side fits and on a phone the viewport does not either, so the cap is what saves it. Ported from #6688, which found these cases while fixing the explicit-width defect at the component. Its other three cases are already covered by the landed viewport stories, and its assertions read internal class names and position-try strings from an implementation the layer runtime has since replaced — these assert the rendered geometry instead.
cixzhang
enabled auto-merge (squash)
October 6, 2026 14:47
Contributor
|
AI review status for this pull request.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
PR Analysis Report
|
Closed
4 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User impact
A side-placed layer that overflows the viewport has only two ways back on screen — flip to the trigger's other side, or be capped. Sliding cannot help: on a side placement the alignment axis is the block axis, so a slide moves the layer up or down and leaves an inline overflow exactly as it was.
Nothing proved that. Every
Viewport insetstory places its layer below its trigger, soplacement: start | endhad no coverage at either viewport. The same gap at 390px width is how the inline cap shipped broken last week.What this adds
Two stories, running at 1280×900 and 390×844 like the other 16:
Both assert the rendered geometry: the width is
min(asked, viewport − gutters)and the box sits inside the gutters.Relationship to #6688
Ported from there. That change found these cases while fixing the explicit-width defect inside
Popover;spec:AST-059has since moved the fix to the layer runtime, so its implementation is superseded but its cases are not.Its other three — start-aligned width, end-aligned width, no width, centered width — are already covered by the landed viewport stories. Its assertions read internal class names and
position-trystrings from the replaced implementation; these assert what a person sees instead.Scope