feat: wizard UI for date config and formula steps
Add key handling for ConfigureDates (space toggle components) and DefineFormulas (n new, d delete, text input mode) wizard steps. Render date component toggles, formula list with input area, and sample formulas derived from detected measures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@ -1200,6 +1200,41 @@ impl App {
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
WizardStep::ConfigureDates => match key.code {
|
||||
KeyCode::Up | KeyCode::Char('k') => wizard.move_cursor(-1),
|
||||
KeyCode::Down | KeyCode::Char('j') => wizard.move_cursor(1),
|
||||
KeyCode::Char(' ') => wizard.toggle_date_component(),
|
||||
KeyCode::Enter => wizard.advance(),
|
||||
KeyCode::Esc => {
|
||||
self.mode = AppMode::Normal;
|
||||
self.wizard = None;
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
WizardStep::DefineFormulas => {
|
||||
if wizard.formula_editing {
|
||||
match key.code {
|
||||
KeyCode::Enter => wizard.confirm_formula(),
|
||||
KeyCode::Esc => wizard.cancel_formula_edit(),
|
||||
KeyCode::Backspace => wizard.pop_formula_char(),
|
||||
KeyCode::Char(c) => wizard.push_formula_char(c),
|
||||
_ => {}
|
||||
}
|
||||
} else {
|
||||
match key.code {
|
||||
KeyCode::Char('n') => wizard.start_formula_edit(),
|
||||
KeyCode::Char('d') => wizard.delete_formula(),
|
||||
KeyCode::Up | KeyCode::Char('k') => wizard.move_cursor(-1),
|
||||
KeyCode::Down | KeyCode::Char('j') => wizard.move_cursor(1),
|
||||
KeyCode::Enter => wizard.advance(),
|
||||
KeyCode::Esc => {
|
||||
self.mode = AppMode::Normal;
|
||||
self.wizard = None;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
WizardStep::NameModel => match key.code {
|
||||
KeyCode::Char(c) => wizard.push_name_char(c),
|
||||
KeyCode::Backspace => wizard.pop_name_char(),
|
||||
|
||||
Reference in New Issue
Block a user