fix: improve mindmap panel sizing and shortcuts#17
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e584084494
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fn mindmap_panel_width_for_step(step: usize, window_size: Option<iced::Size>) -> f32 { | ||
| let target = window_size | ||
| window_size | ||
| .map(|size| size.width * MIND_PANEL_FRACS[step % MIND_PANEL_FRACS.len()]) | ||
| .unwrap_or(MIND_PANEL_DEFAULT); | ||
| target.clamp(MIND_PANEL_MIN, MIND_PANEL_MAX) | ||
| .unwrap_or(MIND_PANEL_DEFAULT) |
There was a problem hiding this comment.
Preserve the minimum width for keyboard panel sizing
On narrow windows, the new keyboard calculation can produce a panel narrower than MIND_PANEL_MIN: for example, the 1/2 step on a 400 px window yields 200 px, and the 1/3 step is even smaller. This contradicts the retained minimum-width behavior (which drag resizing still enforces) and can make the preview panel unusably narrow; remove only the upper bound while retaining .max(MIND_PANEL_MIN).
Useful? React with 👍 / 👎.
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
⌘⌥WMindmap panel cycle to1/3 → 1/2 → 2/3of the window.⌘/open or close the shortcuts panel in Mindmap mode, including macOS physical Slash-key fallback handling.Validation
cargo test --lib shortcuts_key -j 1cargo build --release --bin rmdv -j 1rustfmt --edition 2021 --check src/app.rs src/mindmap.rs src/virt.rs src/diagram.rsgit diff --check