Skip to content

add slides minimap#9097

Merged
Light2Dark merged 8 commits into
mainfrom
sham/slides-minimap
Apr 10, 2026
Merged

add slides minimap#9097
Light2Dark merged 8 commits into
mainfrom
sham/slides-minimap

Conversation

@Light2Dark

@Light2Dark Light2Dark commented Apr 8, 2026

Copy link
Copy Markdown
Member

📝 Summary

  • Add a slides minimap which displays the cells outputs at a smaller scale
  • Increase the height to 650px and decrease the width of slide renderer. This is intentional because there's space taken up at the left
  • Allows reordering (disabled for multi-column), click on minimap to jump to slide
  • Adds a mutation observer which doesn't render the slide in the minimap unless it's within view (for performance)

Tested with light, medium and a heavy notebook (40+ cells with a lot of tables)

Screen.Recording.2026-04-08.at.6.46.33.PM.mov

📋 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 (Please provide a link if applicable).
  • 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.

Copilot AI review requested due to automatic review settings April 8, 2026 10:55
@Light2Dark Light2Dark requested a review from manzt as a code owner April 8, 2026 10:55
@vercel

vercel Bot commented Apr 8, 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 Apr 10, 2026 3:03am

Request Review

@Light2Dark Light2Dark marked this pull request as draft April 8, 2026 10:56
@Light2Dark Light2Dark changed the title feat: add slides minimap add slides minimap Apr 8, 2026
@Light2Dark Light2Dark added the enhancement New feature or request label Apr 8, 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

Adds a slides minimap (thumbnail list) to the slides layout to improve navigation and enable slide reordering.

Changes:

  • Introduces a SlidesMinimap component with thumbnail rendering and drag-to-reorder support.
  • Adds a new cell reducer action (moveCellToIndex) and maps it to document changes for persistence/sync.
  • Refactors slide rendering into a shared Slide component and wires slide ↔ minimap active state.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
frontend/src/core/cells/document-changes.ts Treats moveCellToIndex as a reorder/config change emitter for document syncing.
frontend/src/core/cells/cells.ts Adds moveCellToIndex reducer logic to reorder cells by index/column.
frontend/src/core/cells/tests/cells.test.ts Adds test coverage for moveCellToIndex (same column, across columns, no-ops).
frontend/src/components/slides/slides-component.tsx Adds controlled active index support and reports active index changes.
frontend/src/components/slides/slide.tsx Extracts slide rendering into a memoized Slide component.
frontend/src/components/slides/minimap.tsx Implements the minimap UI + drag/drop reordering logic and active-slide scrolling.
frontend/src/components/editor/renderers/slides-layout/slides-layout.tsx Integrates minimap into slides layout and keeps active slide state in sync.

Comment thread frontend/src/components/slides/minimap.tsx
Comment thread frontend/src/components/slides/minimap.tsx
Comment thread frontend/src/components/slides/minimap.tsx
Comment thread frontend/src/components/slides/slides-component.tsx
Comment thread frontend/src/components/slides/slides-component.tsx
Comment thread frontend/src/components/slides/slide.tsx
Comment thread frontend/src/components/slides/minimap.tsx
@codecov

codecov Bot commented Apr 8, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 12.13kB (0.05%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
marimo-esm 24.84MB 12.13kB (0.05%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: marimo-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/cells-*.js 384 bytes 703.39kB 0.05%
assets/index-*.js 264 bytes 601.53kB 0.04%
assets/index-*.css 290 bytes 362.29kB 0.08%
assets/dist-*.js 72 bytes 176 bytes 69.23% ⚠️
assets/dist-*.js -14 bytes 169 bytes -7.65%
assets/dist-*.js 283 bytes 387 bytes 272.12% ⚠️
assets/dist-*.js 7 bytes 183 bytes 3.98%
assets/dist-*.js -227 bytes 160 bytes -58.66%
assets/dist-*.js -172 bytes 104 bytes -62.32%
assets/dist-*.js 46 bytes 183 bytes 33.58% ⚠️
assets/dist-*.js -239 bytes 164 bytes -59.31%
assets/dist-*.js -81 bytes 102 bytes -44.26%
assets/dist-*.js -32 bytes 137 bytes -18.93%
assets/dist-*.js 174 bytes 276 bytes 170.59% ⚠️
assets/dist-*.js 95 bytes 259 bytes 57.93% ⚠️
assets/dist-*.js 266 bytes 403 bytes 194.16% ⚠️
assets/dist-*.js 166 bytes 335 bytes 98.22% ⚠️
assets/dist-*.js -166 bytes 169 bytes -49.55%
assets/dist-*.js -155 bytes 104 bytes -59.85%
assets/dist-*.js -23 bytes 137 bytes -14.37%
assets/JsonOutput-*.js -1 bytes 336.29kB -0.0%
assets/edit-*.js -42.36kB 329.61kB -11.39%
assets/layout-*.js 56.26kB 185.91kB 43.39% ⚠️
assets/slides-*.js 360 bytes 116.37kB 0.31%
assets/panels-*.js -3.15kB 45.36kB -6.5%
assets/button-*.js 93 bytes 3.93kB 2.43%
assets/__vite-*.js 5 bytes 98 bytes 5.38% ⚠️
assets/__vite-*.js -5 bytes 93 bytes -5.1%

Files in assets/cells-*.js:

  • ./src/core/cells/document-changes.ts → Total Size: 11.21kB

  • ./src/core/cells/cells.ts → Total Size: 35.84kB

Files in assets/layout-*.js:

  • ./src/components/slides/minimap.tsx → Total Size: 13.94kB

  • ./src/components/editor/renderers/slides-layout/slides-layout.tsx → Total Size: 2.82kB

  • ./src/components/slides/slide.tsx → Total Size: 758 bytes

Files in assets/slides-*.js:

  • ./src/components/slides/slides-component.tsx → Total Size: 5.4kB

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 7 out of 7 changed files in this pull request and generated 6 comments.

Comment thread frontend/src/components/slides/minimap.tsx
Comment thread frontend/src/components/slides/minimap.tsx
Comment thread frontend/src/components/slides/minimap.tsx
Comment thread frontend/src/components/slides/minimap.tsx
Comment thread frontend/src/components/slides/minimap.tsx
@Light2Dark Light2Dark marked this pull request as ready for review April 8, 2026 16:49
@Light2Dark Light2Dark requested a review from kirangadhave April 9, 2026 09:18
mscolnick
mscolnick previously approved these changes Apr 9, 2026

@mscolnick mscolnick 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.

very clean, nice stuff

Comment thread frontend/src/components/editor/renderers/slides-layout/slides-layout.tsx Outdated
};
}

function resolveDropTarget({

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.

could be nice to add some snapshot tests for this and projectDropTarget

@Light2Dark Light2Dark Apr 10, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

added some unit tests for those functions, don't think snapshot tests are necessary for testing the logic (could be wrong).

@kirangadhave

Copy link
Copy Markdown
Member

🚀 looks great!

@Light2Dark Light2Dark merged commit e50c74c into main Apr 10, 2026
29 checks passed
@Light2Dark Light2Dark deleted the sham/slides-minimap branch April 10, 2026 13:55
@github-actions

Copy link
Copy Markdown

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

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

Labels

bash-focus Area to focus on during release bug bash enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants