You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Presenter View: speaker notes keep their bullets, numbers and formatting - #1211
Presenter View drew the notes from Slide::notes_text() as a single plain label, so bullets, numbers, indents and bold/italic were lost, while the notes pane (from #168) lays them out with bullets() and galley() in notes.rs. This adds a read-only notes::view that reuses that same layout and bullet painting (the editor's bullet loop moved into a shared paint_bullets, unchanged). It shows the galley in a Label, so the notes stay selectable as before, and the presenter's notes pane now draws with it. Links read as plain text, as in the notes pane. The A- / A+ (and [ / ]) size still applies: notes_px is the size of 12 pt text, so runs with their own size and the indents scale with it, as the notes pane does. "No notes." stays as before. PowerPoint's Presenter View resizes the notes with the two buttons in the notes pane, and they wrap and scroll (Start the presentation and see your notes in Presenter view). I also noted the change in docs/slideshow-parity.md.
One thing I left alone because it's the shared layout and the notes pane does the same: at the largest sizes (48) in the narrow presenter column, a level-2 point's 72 pt indent leaves less room than the layout's minimum wrap width, so it runs past the right edge, and a bullet after a paragraph that wraps a lot sits a bit high. At the default 18 it lays out fine. Happy to look at that separately if you'd like.
Heads-up on overlaps: #1032 and #730 also edit the presenter notes block in show.rs (different goals, but they'll conflict textually), and my own #1209 touches show.rs elsewhere (action sounds). Whichever lands second, I'm happy to rebase.
Validation:
show::tests::presenter_notes_keep_bullets_numbers_and_bold: fails against the old plain-label drawing (the presenter painted only "Opening\nWelcome\nAgenda\nDemo", no •, 1., 2.), passes here. It also checks that the bold run keeps the bold font at the pane's size and that the notes are selectable
the existing notes::tests still pass (the editor uses the shared bullet painting)
checked it rendered with egui_kittest at 18 and 48 px: bullets, numbers, nested level, italic and wrapped lines under the text
Reviewing files that changed from the base of the PR and between b47195f and c0b405c.
📒 Files selected for processing: 3
crates/ui-egui/src/notes.rs
crates/ui-egui/src/show.rs
docs/slideshow-parity.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
📝 Walkthrough
Presenter View now renders slide notes from their structured text representation. The notes renderer paints bullet and numbered markers and returns a selectable label response. The presenter notes pane displays “No notes.” when the notes text is empty.
The editor delegates bullet and numbered marker painting to paint_bullets. The new view function renders notes in a selectable label and paints markers relative to the label position.
Presenter View uses structured notes, displays “No notes.” when the text is empty, and renders nonempty notes through crate::notes::view. A test checks selection, list markers, and font sizes. The parity checklist records notes formatting support.
sequenceDiagram
participant PresenterView
participant presenter_notes
participant notes_view as crate::notes::view
participant egui_label as egui label
PresenterView->>presenter_notes: Pass structured slide notes
presenter_notes->>notes_view: Render nonempty notes
notes_view->>egui_label: Display galley and paint list markers
Loading
Suggested reviewers:mathiasko, nikitkara, echelon
Merge Risk:⚪ Minimal · up to c0b40
Presenter notes retain their structured formatting, and no issue requiring a fix before merge was established.
Architecture risk:🔵 Low · up to c0b40
The change affects 2 systems.
Changed systems:crates, docs
Architecture concerns
No architecture-level concerns identified.
Review details
Systems and components
observed — crates (service) was modified; 2 changed files map to changed impact.
observed — docs (service) was modified; 1 changed file maps to changed impact.
Before / after behavior
observed — Modified behavior in crates/ui-egui/src/notes.rs: The editor now delegates bullet and number painting to paint_bullets, passing the clipped painter and editor galley position when the body text matches the draft text; the prior inline painting loop was removed.
observed — Modified behavior in crates/ui-egui/src/notes.rs: Added paint_bullets, which walks paragraphs alongside their computed bullets, positions each marker at the paragraph’s indented first-line x-coordinate and corresponding galley row center, and advances the cursor offset by each paragraph’s character length plus one.
observed — Modified behavior in crates/ui-egui/src/notes.rs: Added public view, which lays out notes at the available width, renders the galley in a label, paints bullets relative to the response rectangle’s minimum position, and returns the label response.
observed — Modified behavior in crates/ui-egui/src/show.rs: Presenter View now uses the slide’s structured notes, falling back to an empty TextBody, instead of retrieving flattened notes text.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title states the main change: Presenter View speaker notes now keep bullets, numbers, and formatting. The raw summary shows the notes pane bullet painting was reused in Presenter View, a new notes…
Linked Issues check
Issue #1128 requires Presenter View to show rich-text speaker-note bullet markers as in the notes view. The change replaces flattened notes_text() rendering with crate::notes::view, which reuses `…
Out of Scope Changes check
The changed files support issue #1128. notes.rs extracts shared bullet painting and adds the read-only view required by Presenter View. show.rs uses that view and adds focused regression coverage.…
Docstring Coverage
Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. (1 skipped: 1 u…
Full details: Title check
Explanation
The title states the main change: Presenter View speaker notes now keep bullets, numbers, and formatting. The raw summary shows the notes pane bullet painting was reused in Presenter View, a new notes::view function was added, and a test checks bullets, numbering, and bold. The PR objectives confirm the same intent, including linked issue #1128 about missing bullets. The title is specific and accurate, so it passes.
Full details: Linked Issues check
Explanation
Issue #1128 requires Presenter View to show rich-text speaker-note bullet markers as in the notes view. The change replaces flattened notes_text() rendering with crate::notes::view, which reuses galley() and shared paint_bullets. This preserves bullets, numbering, indentation, and text formatting. The presenter test verifies bullet, 1., 2., bold formatting, and selectable notes.
Full details: Out of Scope Changes check
Explanation
The changed files support issue #1128. notes.rs extracts shared bullet painting and adds the read-only view required by Presenter View. show.rs uses that view and adds focused regression coverage. docs/slideshow-parity.md records the completed behavior. No unrelated implementation change is shown.
Full details: Docstring Coverage
Explanation
Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Landed on main — thank you for the contribution! If you haven't already, come join us on Discord: https://discord.gg/artcraft
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
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 #1128.
Presenter View drew the notes from
Slide::notes_text()as a single plain label, so bullets, numbers, indents and bold/italic were lost, while the notes pane (from #168) lays them out withbullets()andgalley()innotes.rs. This adds a read-onlynotes::viewthat reuses that same layout and bullet painting (the editor's bullet loop moved into a sharedpaint_bullets, unchanged). It shows the galley in aLabel, so the notes stay selectable as before, and the presenter's notes pane now draws with it. Links read as plain text, as in the notes pane. The A- / A+ (and[/]) size still applies:notes_pxis the size of 12 pt text, so runs with their own size and the indents scale with it, as the notes pane does. "No notes." stays as before. PowerPoint's Presenter View resizes the notes with the two buttons in the notes pane, and they wrap and scroll (Start the presentation and see your notes in Presenter view). I also noted the change indocs/slideshow-parity.md.One thing I left alone because it's the shared layout and the notes pane does the same: at the largest sizes (48) in the narrow presenter column, a level-2 point's 72 pt indent leaves less room than the layout's minimum wrap width, so it runs past the right edge, and a bullet after a paragraph that wraps a lot sits a bit high. At the default 18 it lays out fine. Happy to look at that separately if you'd like.
Heads-up on overlaps: #1032 and #730 also edit the presenter notes block in
show.rs(different goals, but they'll conflict textually), and my own #1209 touchesshow.rselsewhere (action sounds). Whichever lands second, I'm happy to rebase.Validation:
show::tests::presenter_notes_keep_bullets_numbers_and_bold: fails against the old plain-label drawing (the presenter painted only "Opening\nWelcome\nAgenda\nDemo", no •, 1., 2.), passes here. It also checks that the bold run keeps the bold font at the pane's size and that the notes are selectablenotes::testsstill pass (the editor uses the shared bullet painting)cargo clippy --workspace --all-targets -- -D warnings,cargo fmt --all -- --checkSummary by CodeRabbit