Repository navigation
fix(sheets): a swipe begun on a Mermaid diagram or an unloaded image scrolls the file - #3486
Merged
Merged
Conversation
…rolls the file on phones Fixes #3475. Inside a phone sheet every element is `overscroll-behavior: contain` (#683), so any `overflow: hidden` box, a scroll container that never scrolls, ends the scroll chain and swallows a vertical swipe. A Mermaid diagram's `.markdown-mermaid` and an image slot that is loading or failed (`.image-slot.is-loading`, `.is-failed`) only clip their content: they now use `overflow: clip`, which clips the same but makes no scroll container, so the swipe reaches the document. `overflow: hidden` stays before it as the fallback for a WebView without `clip` (before Safari 16). No addition to the #3294 allow-list. The outline regression's Markdown now holds a Mermaid fence and an image whose bytes are gone, and its phone loop swipes on each. It fails on the diagram with main's CSS, and on the failed image with only the diagram fixed.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
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. |
Owner
Author
|
Merge note (merge pass) at head 0d53607:
|
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.
Fixes #3475.
Summary
In a phone sheet, a vertical swipe begun on a Mermaid diagram or on an image that is loading or failed scrolled nothing.
.modal-scrim * { overscroll-behavior: contain }(#683) makes everyoverflow: hiddenbox inside a sheet a scroll container that ends the scroll chain, and these boxes only clip..markdown-mermaidand.image-slot.is-loading/.is-failed(src/components/ChatView.css) now useoverflow: clip. Aclipbox isn't a scroll container, so the swipe goes on to the file.overflow: hiddenstays just before it as a fallback for browsers withoutclip, which then behave as before.Review
Codex CLI adversarial review, gpt-6.1-terra fast xhigh (route: team proxy):
clip: fixed with thehiddenfallback.DirectoryBrowser.css:118, which is like that on main too;Validation
scripts/markdown-outline-browser-qa.ts: the fixture gains a Mermaid fence and a missing image, both swiped in the phone loop. With main's CSS the swipe on the diagram doesn't scroll the document. With only the diagram fixed, the swipe on the failed image doesn't either. With the full fix both pass.herdr-ci-runner:local): pass for markdown-outline-browser-qa, phone-glass-header-demo, phone-worktree-sheet, touch-long-press-demo, phone-split-grid-demo and chat-size-regression's layout checks. In chat-size-regression, one unrelated attach scenario timed out once under load, then passed twice when run alone.bun run check fast: green on old-desktop (unit tests 14300 pass, 0 fail, 38 skip).