Repository navigation
Control channel: ui.dialog.confirm sends what OK sends (#1459) - #1477
Merged
Merged
Conversation
OK runs a dialog's command with build_params(&d), which reshapes the field values for several dialogs (the rule wrapper of cfQuick, the delimiters list of Text to Columns, the columns of Remove Duplicates and Subtotal, Data Validation's unused fields, Zoom presets, Series, Define Name). ui.dialog.confirm passed the raw field values instead, so a Highlight Cells rule confirmed over the control channel added nothing and Text to Columns ignored the ticked delimiter. Make build_params pub(crate) and use it from ui.dialog.confirm, say so in the control protocol doc, and add tests driving the Greater Than and Text to Columns dialogs over the control channel.
aiongg
added a commit
to aiongg/gridcraft
that referenced
this pull request
Oct 22, 2026
…ata loss crates/ui-egui/src/control.rs: kept storytold#1477's unconditional build_params call crates/ui-egui/src/dialogs.rs: build_params pub(crate) once, with storytold#1628's advancedFilter arm docs/ui-parity.md: status line combined, change-log rows both kept
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1459.
Clicking OK in a dialog and confirming it with
ui.dialog.confirmover the control channel should run the same command with the same parameters. OK goes throughbuild_params(&d), which reshapes the field values for several dialogs (cfQuickwraps them inrule, Text to Columns turns the check boxes intodelimiters, Remove Duplicates and Subtotal splitcolumnsTextintocolumns, Data Validation drops the fields its type/operator don't use, Zoom, Series and Define Name have their own adjustments).ui.dialog.confirmsentJson::Object(d.values.clone())instead, so a Highlight Cells rule confirmed from the control channel added nothing (home.conditionalFormatsaw noruleand asked for the dialog again) and a Text to Columns confirm ignored the ticked delimiter.Changes:
crates/ui-egui/src/dialogs.rs:build_paramsispub(crate), with a one-line doc.crates/ui-egui/src/control.rs:ui.dialog.confirmbuilds the parameters with it.docs/control-protocol.md: saysconfirmruns the dialog's command with the same parameters as its OK button.crates/ui-egui/tests/dialog_confirm.rs: two tests drive dialogs over the control channel (ui.dialog,ui.dialog.set,ui.dialog.confirm) and check the model: Greater Than… adds aCellIsrule with the typed value; Text to Columns with Semicolon ticked splitsa;binto two cells. Both fail onmainand pass with the change.cargo fmt --all -- --check,cargo clippy -p gridcraft-ui-egui --all-targets -- -D warningsandcargo test -p gridcraft-ui-egui --test dialog_confirmpass.Developed with AI assistance (Claude Code); reviewed and tested locally.