fix(docs): size demo modal to content, scroll tall demos#278
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCSS updates improve demo visualization layout with max-height dialog sizing, stage scrolling, sticky positioned controls, and cross-browser mask support. A new progress streaming demo component simulates chunked worker processing via RAF-driven animation and is wired into the demo registry and landing page as the primary scenario demo. ChangesProgress streaming demo feature
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/app/components/demos/progress-demo.tsx`:
- Around line 93-98: The restart function unconditionally resets tRef.current to
0, which breaks the demo when reduced motion is enabled because the RAF loop
never runs, leaving the progress stuck at 0% instead of showing the finished
state. Modify the restart function to check for reduced motion support and
conditionally set the progress value: if reduced motion is enabled, set
tRef.current to the final completed progress value instead of 0, otherwise reset
to 0 as normal.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e21b02ed-2c8b-447a-b2b0-b35f640c796c
📒 Files selected for processing (4)
docs/app/components/demos/progress-demo.tsxdocs/app/components/demos/registry.tsdocs/app/components/demos/types.tsdocs/app/components/landing/scenario-finder.tsx
✅ Files skipped from review due to trivial changes (3)
- docs/app/components/demos/types.ts
- docs/app/components/demos/registry.ts
- docs/app/components/landing/scenario-finder.tsx
Problem
After porting the demos to React (#277), the modal dialog kept a fixed height (
min(86vh, 880px)) — sized for the old full-bleed iframe. The React demos have their own intrinsic height, so:Fix
.dm-dialog:height→max-height— the dialog now fits the demo's natural height, capped so tall demos scroll instead of overflowing the viewport..dm-stage: becomes the scroll container (overflow: auto,min-height: 120pxfor the loading spinner)..dm-frame-react: no longer absolutely positioned — it flows so its height drives the stage.Pure CSS; no component changes.
Verify
pnpm lint+pnpm buildgreen.Summary by CodeRabbit