Create `command` module
Dependencies
- [2]
NSWIJUHGAdd support for subcommands - [3]
MIY7QPYKRefactor argument handling into a separate file - [4]
REI53XR4Render argument state as HTML - [5]
A4E5KLI2Turn arguments into sidebar - [6]
BMG4FSHNAdd basic `clap` support - [7]
C73UJ7ZYCreate simple `xilem_html` demo - [8]
ZYNEMGAZUse generated Typst code from Rust - [9]
ZVDBFCW7Display arguments when input is invalid - [10]
MT5RA7VYIncrease sidebar density - [11]
G54GZBS4Remove dependency on clap patches - [*]
JFJVY57RList `clap` argument IDs
Change contents
- edit in src/main.rs at line 3
pub mod command;use command::command_view; - replacement in src/main.rs at line 9
use xilem_html::{document_body, elements as el, App, View, ViewExt};use xilem_html::{document_body, elements as el, App, View, ViewExt, ViewMarker}; - edit in src/main.rs at line 48[13.374][3.632]
fn sidebar(state: &AppState) -> impl View<AppState> + ViewMarker {let arg_matches = state.arg_matches.as_ref().ok();el::div((command_view(&state.command, arg_matches),state.command.get_subcommands().map(|subcommand| {command_view(subcommand,arg_matches.and_then(|arg_matches| {arg_matches.subcommand_matches(subcommand.get_name())}),)}).collect::<Vec<_>>(),)).attr("id", "sidebar")} - replacement in src/main.rs at line 77
arg::sidebar(&state),sidebar(&state), - replacement in src/arg.rs at line 210
fn args_view(command: &Command, arg_matches: Option<&ArgMatches>) -> impl ViewSequence<AppState> {pub fn args_view(command: &Command,arg_matches: Option<&ArgMatches>,) -> impl ViewSequence<AppState> { - edit in src/arg.rs at line 227[2.1543]→[2.1543:1732](∅→∅),[3.1077]→[3.4838:4873](∅→∅),[2.1732]→[3.4838:4873](∅→∅),[3.4838]→[3.4838:4873](∅→∅),[3.4873]→[2.1733:2014](∅→∅),[2.2014]→[3.5157:5190](∅→∅),[3.5157]→[3.5157:5190](∅→∅),[3.5190]→[3.1078:1112](∅→∅),[3.1112]→[2.2015:2022](∅→∅),[3.1118]→[3.5262:5291](∅→∅),[2.2022]→[3.5262:5291](∅→∅),[3.5262]→[3.5262:5291](∅→∅)
pub fn sidebar(state: &AppState) -> impl View<AppState> + ViewMarker {let arg_matches = state.arg_matches.as_ref().ok();el::div((args_view(&state.command, arg_matches),state.command.get_subcommands().map(|subcommand| {args_view(subcommand,arg_matches.and_then(|arg_matches| {arg_matches.subcommand_matches(subcommand.get_name())}),)}).collect::<Vec<_>>(),)).attr("id", "sidebar")}