Skip to content

✨(frontend) Start the presenter from a block - #2485

Merged
PanchoutNathan merged 2 commits into
mainfrom
feature/present-mode-start-from-block
Aug 4, 2026
Merged

PanchoutNathan merged 2 commits into
mainfrom
feature/present-mode-start-from-block

Conversation

@PanchoutNathan

Copy link
Copy Markdown
Contributor

Purpose

  • Add a "Present" action to the editor block side menu.
  • Open the presenter on the slide containing the selected block.
  • Map nested blocks and divider blocks to their rendered content slide.
  • Exclude the keyboard shortcut, which is tracked separately in Add keybord shortcut to jump in presentation mode #2473.

Refs #2466
Closes #2470

@PanchoutNathan PanchoutNathan self-assigned this Jul 1, 2026
@PanchoutNathan
PanchoutNathan marked this pull request as draft July 1, 2026 12:31
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Size Change: +444 B (+0.01%)

Total Size: 4.36 MB

📦 View Changed
Filename Size Change
apps/impress/out/_next/static/68b30cd7/_buildManifest.js 677 B +677 B (new file) 🆕
apps/impress/out/_next/static/542463b4/_buildManifest.js 0 B -677 B (removed) 🏆
apps/impress/out/_next/static/chunks/3347.js 4 kB +4 kB (new file) 🆕
apps/impress/out/_next/static/chunks/3626.js 0 B -4.55 kB (removed) 🏆
apps/impress/out/_next/static/chunks/5149.js 0 B -23.1 kB (removed) 🏆
apps/impress/out/_next/static/chunks/6803.js 24.1 kB +24.1 kB (new file) 🆕

compressed-size-action

@PanchoutNathan
PanchoutNathan force-pushed the feature/present-mode-start-from-block branch from 0a311b8 to f1a8ad9 Compare July 22, 2026 10:09
@PanchoutNathan
PanchoutNathan requested review from AntoLC and Ovgodd July 22, 2026 10:17
@AntoLC AntoLC added frontend feature add a new feature editor labels Jul 23, 2026
@AntoLC
AntoLC marked this pull request as ready for review July 27, 2026 12:24
@PanchoutNathan
PanchoutNathan force-pushed the feature/present-mode-start-from-block branch from f1a8ad9 to 71bfaec Compare August 3, 2026 12:05
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 37ce42e2-bcca-4cbd-94a0-65e6b796844a

📥 Commits

Reviewing files that changed from the base of the PR and between d0a091e and b956be1.

📒 Files selected for processing (6)
  • src/frontend/apps/e2e/__tests__/app-impress/presenter-mode.spec.ts
  • src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteEditor.tsx
  • src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteSideMenu.tsx
  • src/frontend/apps/impress/src/features/docs/doc-presenter/__tests__/useSlides.spec.ts
  • src/frontend/apps/impress/src/features/docs/doc-presenter/components/PresentBlockItem.tsx
  • src/frontend/apps/impress/src/features/docs/doc-presenter/hooks/useSlides.ts

Walkthrough

Adds a custom BlockNote side menu with deletion, presentation, color, and table header actions. Adds recursive block-to-content-slide mapping with fallback handling for empty groups, dividers, nested blocks, and missing IDs. Wires the custom menu into the editor and adds end-to-end coverage for presenting from “Slide two.”

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: ovgodd

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes starting presenter mode from an editor block.
Description check ✅ Passed The description accurately covers the side-menu action, block-to-slide mapping, and excluded keyboard shortcut.
Linked Issues check ✅ Passed The changes implement the requested “Present from here” action and map selected, nested, and divider blocks to content slides [#2470].
Out of Scope Changes check ✅ Passed The changes are limited to the block side-menu action, slide mapping, presenter behavior, and related end-to-end tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/present-mode-start-from-block

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 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
`@src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteSideMenu.tsx`:
- Line 54: Update the side-menu label in BlockNoteSideMenu to use the
translation key for “Present from here” instead of “Present”, matching the
agreed wording and preserving the existing translation mechanism.
- Around line 67-79: Replace the hand-rolled Components.Generic.Menu.Dropdown
wrapper in the side-menu component with the public DragHandleMenu component
imported from `@blocknote/react`, preserving the existing RemoveBlockItem,
PresentBlockItem, BlockColorsItem, TableRowHeaderItem, and TableColumnHeaderItem
children and their order.
- Line 82: Update DocsDragHandleMenu to use the exported DragHandleMenu
component as its wrapper instead of Components.Generic.Menu.Dropdown, and type
the menu with DragHandleMenu’s expected props. Preserve the existing menu items
while ensuring DocsSideMenu continues passing the corrected component through
dragHandleMenu.
🪄 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ca04b917-50c4-44e1-879b-39a840ce94f4

📥 Commits

Reviewing files that changed from the base of the PR and between eed828d and 71bfaec.

📒 Files selected for processing (5)
  • src/frontend/apps/e2e/__tests__/app-impress/presenter-mode.spec.ts
  • src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteEditor.tsx
  • src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteSideMenu.tsx
  • src/frontend/apps/impress/src/features/docs/doc-presenter/__tests__/useSlides.spec.ts
  • src/frontend/apps/impress/src/features/docs/doc-presenter/hooks/useSlides.ts

@PanchoutNathan
PanchoutNathan requested a review from AntoLC August 3, 2026 12:30
@PanchoutNathan
PanchoutNathan force-pushed the feature/present-mode-start-from-block branch from d0a091e to 0333980 Compare August 3, 2026 12:31
@PanchoutNathan
PanchoutNathan marked this pull request as draft August 3, 2026 12:31

@AntoLC AntoLC left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe worth to switch to DragHandleMenu, I let you judge:
#2485 (comment)

@PanchoutNathan
PanchoutNathan force-pushed the feature/present-mode-start-from-block branch from 0333980 to 23f1c1d Compare August 4, 2026 14:02
Add a "Present" item to the block side menu that opens the presenter on
the slide containing that block. Map any block id (incl. nested or
divider ids) to its rendered content slide.

Closes #2470
Exercise block-to-slide mapping and the editor side-menu action.

Keep coverage scoped to starting the presenter from a block.
@PanchoutNathan
PanchoutNathan force-pushed the feature/present-mode-start-from-block branch from 23f1c1d to b956be1 Compare August 4, 2026 15:49
@PanchoutNathan
PanchoutNathan marked this pull request as ready for review August 4, 2026 16:48
@PanchoutNathan
PanchoutNathan merged commit b956be1 into main Aug 4, 2026
48 of 51 checks passed
@PanchoutNathan
PanchoutNathan deleted the feature/present-mode-start-from-block branch August 4, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Start presentation from a block

2 participants