Repository navigation
Conversation
…rytold#1160) An icon set threshold is ">=" by default or ">", stored as gte="0" on its cfvo. GridCraft ignored gte and compared with ">=", so a value exactly on a ">" threshold got the next icon (Excel for Microsoft 365, 3 traffic lights over 0..10 with "> 3", "> 6": 3 is red and 6 yellow; GridCraft showed yellow and green). CfRule::IconSet keeps a per-threshold `greater` flag (serde default, empty = all ">="); the reader takes gte, the writer writes gte="0", the evaluator compares with ">" where it is set, and home.conditionalFormat takes icon thresholds: [{type, value, operator: ">=" | ">"}]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SAgnkqJiy3v24Hp25dQLRj
) home.conditionalFormat without a rule asked the UI for the dialog `newFormattingRule`, which didn't exist, so New Rule's key tip (Alt, H, L, N), the submenu key tips that run the same command and Search Commands did nothing. The dialog (dialogs/new_rule.rs) has Excel's six rule types with their description fields: colour scales, data bars and icon sets with each icon's threshold (">=" or ">", number, percent, percentile or formula); cell value, specific text, dates, blanks, errors; top or bottom N or %; above or below average including "or equal" and 1-3 standard deviations; unique or duplicate; formula; and the format with a preview. OK runs home.conditionalFormat. New Rule… runs the command; every Conditional Formatting submenu ends in More Rules…, which opens the dialog on that submenu's rule type. home.conditionalFormat takes `equal` and `stdDev` for above/below-average rules. ui.dialog.confirm sends what OK sends (dialogs::build_params), so dialogs that reshape their values confirm over the control channel as they do on screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SAgnkqJiy3v24Hp25dQLRj
Author
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 #1165:
home.conditionalFormatwithout a rule opened nothing.Builds on #1199 (#1160, icon thresholds with ">"): the dialog's icon thresholds use that PR's command parameter. Please merge that one first. Until then this branch also contains its commit.
Problem
home.conditionalFormatwithout aruleasks the UI for the dialognewFormattingRule, and the UI had no dialog by that name. So these did nothing:The ribbon's New Rule… opened a formula-only dialog instead, and none of the submenus had Excel's "More Rules…".
Fix
New Formatting Rule dialog (
crates/ui-egui/src/dialogs/new_rule.rs). It has Excel's six rule types, each with its description fields:home.conditionalFormatwith the rule the values describe.Entry points:
home.conditionalFormatwithout a rule opens the dialog, so Alt, H, L, N and Search Commands work.Command:
home.conditionalFormattakesequalandstdDev(1–3) for above/below-average rules. The model and the evaluator had them; the command always passedfalse/ 0.Control channel:
ui.dialog.confirmnow sends the parameters OK sends (dialogs::build_params). Before, it sent the raw field values. So the conditional-format dialogs can be confirmed over the channel; before, they arrived without theirrulewrapper. The same goes for the other dialogs whose OK reshapes the values: Data Validation, Text to Columns, Remove Duplicates, Series and others.preset_style(engine) is public, and the dialog's preview draws with it. The quick-format list and the date periods are shared with the existing quick-rule dialog.Testing
tests/new_formatting_rule.rs(kittest):dialogs::new_ruleunit tests: each rule type's parameters, defaults for More Rules…, colour parsing.above_average_with_equal_and_standard_deviations(engine):stdDevandequal, with values measured in Excel. Over 0…10, 40 and 19, only 40 and 19 are more than one population standard deviation above the average. Over 1, 2, 3, "equal or above" and "equal or below" both take the 2.cargo xtask ci: fmt, clippy, test, assets, layers and wasm pass.parityandkeytipsreport their generated files out of date on this Windows checkout (core.autocrlf).git diffis empty, as onmain.🤖 Generated with Claude Code
https://claude.ai/code/session_01SAgnkqJiy3v24Hp25dQLRj