Repository navigation
feat(dioxus): flower's page editor on Dioxus's native renderer - #2
Merged
Merged
Conversation
crates/flower-dioxus is the page view of flower-ratatui and the Swift FlowerPages, drawn by dioxus-native 0.8.0-alpha.2 (Blitz on wgpu, no webview): one or two panes along the lineage, groups under captions, short lists as chips, the picker over the page and the footer as the edit line. The terminal's key table, plus a window's ⌘Z/⇧⌘Z, ⌫/⌦ and ⌥↑/⌥↓; presses and the wheel as the terminal's mouse. Save, Save As, the zoom and the clipboard are asked of a Host, so the widget, like flower-core, never touches a file. apps/flower-dioxus hosts it in a window: open, save, save as, the unsaved-changes question, the zoom and the window title. Both are workspaces of their own, excluded from the root one, for the reason leaf's crates/leaf-dioxus is: the alpha pins a winit beta and a wgpu tree nothing in the root workspace should resolve.
apps/flower-dioxus/src/menu.rs builds Flower, File, Edit, Go, View and Window through muda, the native NSMenu on macOS. Every item is a key chord replayed through the same handler as the keyboard (Shell::chord: the editor's table, then the shell's ⌘O), so the menu cannot disagree with the keys; a test replays every item's chord against a model. A chord with ⌘ or ⌥ is its item's shortcut; the editor's single letters are not, since AppKit hands a shortcut to the menu before the view and Edit Value would take every `e` typed into a value. Items are enabled for what the editor is doing: the page's commands off while a value is open (replayed then, `e` would be typed), Paste only then, Undo and Redo by the journal. The widget gains the Finder's ⌘↓ and ⌘↑ (Go ▸ Open, Enclosing Page), and its doc no longer claims a bare ⌫ deletes. muda is built without GTK, so the menu compiles and is tested on Linux, where none is shown.
adammharris
force-pushed
the
cc/optimistic-bardeen-4l74x4
branch
from
October 16, 2026 17:21
1486f3d to
9664f91
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Flower on
dioxus-native0.8.0-alpha.2 (Blitz on wgpu, no webview), split into a widget and an app the way leaf's Dioxus editor is.crates/flower-dioxus: the widgetflower-ratatuiand the SwiftFlowerPages:j/k/l/h,e/E,a/A,c/C,x,u/U), plus ⌘Z/⇧⌘Z, ⌫/⌦/⌘⌫ and ⌥↑/⌥↓ for moving an entry.Host, so the widget never touches a file, same as flower-core.layout.rs(panes, entries, placement, line text) uses no Dioxus types, so it is unit-tested without a window. Keys are read from winit, not DOM focus; leaf-dioxus documents why.apps/flower-dioxus: the appWorkspace
Both crates are standalone workspaces and are
excluded from the root one. The alpha pins a winit beta and a wgpu tree that the root shouldn't resolve. Their lockfiles are committed, as leaf's are.Verification
clippy -D warningsand tests pass for both crates: 20 widget tests and 2 app tests. Rootcargo fmt --all --checkand the xtask tests still pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01LXrGKAEfBBD8Kg3GR3M7Ej
Generated by Claude Code