Add a Help menu with a built-in Markdown cheatsheet

Mirrors the logrs cheatsheet: a scrollable reference window covering the
markdown md-manuscript renders on export, plus the manuscript-specific
conventions (# Title:/# Slug: metadata, the draft-marker header, and
comments). Opened from Help ▸ Markdown cheatsheet in the menu bar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
landon
2026-07-29 10:49:13 -05:00
parent b31ac0c6c8
commit 503ef4f24a
4 changed files with 187 additions and 0 deletions
+13
View File
@@ -63,6 +63,8 @@ pub struct App {
settings_test_rx: Option<std::sync::mpsc::Receiver<Result<usize, String>>>,
/// Result line for the settings window's "Test connection" button.
settings_test_status: String,
/// Whether the markdown cheatsheet window is open.
show_cheatsheet: bool,
}
impl App {
@@ -96,6 +98,7 @@ impl App {
show_settings: false,
settings_test_rx: None,
settings_test_status: String::new(),
show_cheatsheet: false,
};
app.open_workspace();
app
@@ -969,6 +972,12 @@ impl App {
self.show_settings = true;
}
});
ui.menu_button("Help", |ui| {
if ui.button("📝 Markdown cheatsheet").clicked() {
ui.close_menu();
self.show_cheatsheet = true;
}
});
});
});
}
@@ -1411,6 +1420,10 @@ impl eframe::App for App {
self.settings_window(ctx);
}
if self.show_cheatsheet {
crate::help::cheatsheet_window(ctx, &mut self.show_cheatsheet);
}
if self.pending_repo.is_some() {
self.repo_prompt(ctx);
}