forked from 1b-agent/fieldcraft-upstream
UI: a reference field is always a drop-down; with nothing to pick it offers Create …, and one candidate starts picked (#215)
A reference field (a material, set, step…) with no items was a free-text box; it is now a greyed
drop-down ("No materials yet") with a button that opens the command making one (the
collection's requirement provider). That form comes back to this one on OK, with the new item
picked, or as it was on Cancel. A required reference with one candidate, or with the browser's
selection of its kind, starts picked when the form opens, so the fields and the JSON view agree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
29e7a4ca31
commit
6bfa0b410a
6 files changed
+224
-21
No files matched your search
@@ -278,7 +278,7 @@ pub fn handle(app: &mut ModelApp, ctx: &egui::Context, req: &ControlRequest) ->
|
||||
return err("no command form is open (ui.start opens one)");
|
||||
}
|
||||
if b("cancel") {
|
||||
app.dialog = None;
|
||||
app.close_dialog();
|
||||
return ok(Value::Null);
|
||||
}
|
||||
if let (Some(d), Some(params)) = (app.dialog.as_mut(), p.get("params")) {
|
||||
|
||||
Reference in new issue
Block a user