Skip to content

fix: improve mindmap panel sizing and shortcuts#17

Merged
minchenlee merged 2 commits into
mainfrom
codex/side-panel-width
Jul 24, 2026
Merged

fix: improve mindmap panel sizing and shortcuts#17
minchenlee merged 2 commits into
mainfrom
codex/side-panel-width

Conversation

@minchenlee

Copy link
Copy Markdown
Owner

Summary

  • Change the ⌘⌥W Mindmap panel cycle to 1/3 → 1/2 → 2/3 of the window.
  • Preserve the minimum panel width while removing the upper cap from keyboard sizing and pointer dragging.
  • Show the existing keyboard-shortcuts button in document and Full Mindmap modes instead of adding a shortcuts pill to the canvas hint island.
  • Make ⌘/ open or close the shortcuts panel in Mindmap mode, including macOS physical Slash-key fallback handling.

Validation

  • cargo test --lib shortcuts_key -j 1
  • cargo build --release --bin rmdv -j 1
  • rustfmt --edition 2021 --check src/app.rs src/mindmap.rs src/virt.rs src/diagram.rs
  • git diff --check

@minchenlee
minchenlee marked this pull request as ready for review July 24, 2026 04:08

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment thread src/app.rs
Comment on lines 527 to +530
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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 0ba239b044

ℹ️ 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".

@minchenlee
minchenlee merged commit 4cf5566 into main Jul 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant