Markdown example: menubar with File/About menus and a theme switch
Markdown example: menubar with File/About menus and a theme switch
#8 in Riparion/riparion-editor — merged 2026-06-04
Summary
- Restructures the markdown demo into
examples/markdown/and installs three dx catalog widgets into it (dx components add --module-path examples/markdown/components menubar alert_dialog switch), keeping the library's own dependency surface unchanged (dioxus-primitivesis dev-only) - File ▸ New —
alert_dialogconfirmation ("unsaved changes will be lost"), then clears the editor - File ▸ Save — downloads the current Markdown source as
document.md(Blob + object-URL anchor click viadocument::eval) - About — informational
alert_dialog - Theme switch at the menubar's right edge toggles light/dark: it sets
<html data-theme>(the attributedx-components-theme.csskeys its--light/--darkspace toggles off), and the demo's own styles now use the samevar(--light, X) var(--dark, Y)pattern so the whole page follows the switch — this also fixes black-on-black menu text for dark-mode-OS users
Test plan
-
cargo check --example markdown --features web -
check_rsxlint clean -
dx serve --example markdown --features web: File ▸ New shows confirm dialog and clears; File ▸ Save downloadsdocument.md; About shows dialog; switch flips the whole page light/dark
🤖 Generated with Claude Code
Last updated 2026-06-05
Links to this note
Credits
Merged pull requests, newest first.