Skip to content

feat(slides): "Scroll for more" hint on overflowing slides#10305

Merged
Light2Dark merged 5 commits into
mainfrom
improvement/slide-scroll-hint
Jul 24, 2026
Merged

feat(slides): "Scroll for more" hint on overflowing slides#10305
Light2Dark merged 5 commits into
mainfrom
improvement/slide-scroll-hint

Conversation

@Light2Dark

@Light2Dark Light2Dark commented Jul 23, 2026

Copy link
Copy Markdown
Member

📝 Summary

Slide content that overflows the slide frame is easy to miss during a presentation, especially in fullscreen where OS overlay scrollbars are hidden. There's no visual cue that more content exists below the fold. Related to #10306

This adds a lightweight, dismissible "Scroll for more" affordance to slides:

  • Shows only when a slide's content actually overflows and the viewport is still near the top; it animates in, and is removed once the user scrolls.
  • Adapts to theme (gradient + pill use background/muted-foreground, verified in light and dark mode).
  • Overflow detection lives in a pure, unit-tested helper (shouldShowScrollHint); the container observes its content wrapper with a ResizeObserver so late-loading content (images, charts) still flips the hint on, and a small MutationObserver re-checks when reveal.js fragments are shown/hidden (which do not change layout). Space reserved by not-yet-revealed fragments is excluded, so the hint reflects only currently revealed content, and coalesces updates via requestAnimationFrame.
  • Purely additive: only SubslideView in the reveal deck wraps its content in the new SlideScrollContainer. The minimap and other renderers are untouched.

🎥 Media

Overflowing slide — hint shown 1-overflow-hint
Same slide after scrolling — hint dismissed 2-scrolled-no-hint
Short slide (fits) — no hint 3-short-slide-no-hint
Dark mode — gradient + pill adapt 4-dark-mode-hint

📋 Pre-Review Checklist

  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions.
  • Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it.
  • Video or media evidence is provided for any visual changes (optional).

✅ Merge Checklist

  • I have read the contributor guidelines.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Tests have been added for the changes made.

Made with Cursor

Slide content that overflows the frame is easy to miss in fullscreen,
where OS overlay scrollbars are hidden. Add a dismissible affordance
that appears when a slide overflows and is scrolled to the top.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jul 24, 2026 2:37pm

Request Review

Copilot AI 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.

Pull request overview

Adds a new “Scroll for more” visual affordance to Reveal.js-based slides when slide content overflows, aiming to prevent hidden below-the-fold content during presentations (especially fullscreen with overlay scrollbars).

Changes:

  • Introduces a SlideScrollContainer + useSlideScrollHint hook to detect overflow/top-of-scroll and render a hint overlay.
  • Wraps SubslideView content in SlideScrollContainer to enable the hint in the Reveal deck renderer.
  • Adds unit/component tests for shouldShowScrollHint and the container behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
frontend/src/components/slides/slide-scroll-hint.tsx New scroll container, overflow detection hook, and hint overlay UI.
frontend/src/components/slides/reveal-component.tsx Wraps subslide content in the new scroll container so the hint can appear in slides.
frontend/src/components/slides/tests/slide-scroll-hint.test.tsx Adds tests for the helper + container, including overflow and scroll dismissal behavior.

Comment thread frontend/src/components/slides/slide-scroll-hint.tsx
Comment thread frontend/src/components/slides/slide-scroll-hint.tsx Outdated
Comment thread frontend/src/components/slides/__tests__/slide-scroll-hint.test.tsx
Comment thread frontend/src/components/slides/reveal-component.tsx
- Unobserve removed nodes in the scroll-hint ResizeObserver
- Restore stubbed globals between tests to avoid cross-file leakage

Co-authored-by: Cursor <cursoragent@cursor.com>

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread frontend/src/components/slides/slide-scroll-hint.tsx Outdated
Comment thread frontend/src/components/slides/__tests__/slide-scroll-hint.test.tsx
Comment thread frontend/src/components/slides/slide-scroll-hint.tsx

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for ./frontend

Status Category Percentage Covered / Total
🔵 Lines 77.02% 77273 / 100326
🔵 Statements 77.02% 77273 / 100326
🔵 Functions 71.17% 652 / 916
🔵 Branches 79.59% 4495 / 5647
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
frontend/src/components/slides/reveal-component.tsx 100% 96.77% 100% 100%
frontend/src/components/slides/slide-scroll-hint.tsx 98.94% 57.14% 100% 98.94% 90
Generated in workflow #19911 for commit 1ecf2fd by the Vitest Coverage Report Action

@Light2Dark
Light2Dark marked this pull request as ready for review July 24, 2026 05:30
<div className="h-16 w-full bg-linear-to-t from-background via-background/80 to-transparent" />
<div className="absolute bottom-3 flex items-center gap-1 rounded-full border border-border/60 bg-background/90 px-2.5 py-1 text-xs text-muted-foreground shadow-sm backdrop-blur-sm">
<ChevronDownIcon className="h-3.5 w-3.5" />
<span>Scroll for more</span>

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.

maybe this could be smaller and more minimal? idk

mscolnick
mscolnick previously approved these changes Jul 24, 2026

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread frontend/src/components/slides/slide-scroll-hint.tsx
Comment thread frontend/src/components/slides/slide-scroll-hint.tsx
Reveal.js keeps not-yet-revealed fragments in the layout (space reserved
via visibility: hidden), so scrollHeight counted future fragment content
and showed "Scroll for more" prematurely. Measure overflow only up to the
first unrevealed fragment and re-check on fragment visibility changes.

Also keep the observed content wrapper sizing to its content (min-h-full
on a block scroll container) so the ResizeObserver reliably fires for
late-loading content without changing slide layout.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 1 file (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread frontend/src/components/slides/slide-scroll-hint.tsx
@Light2Dark
Light2Dark merged commit d14d8fb into main Jul 24, 2026
31 checks passed
@Light2Dark
Light2Dark deleted the improvement/slide-scroll-hint branch July 24, 2026 17:09
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.23.16-dev6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants