fix(user_data): support default=false in multi-select choice syntax#2556
fix(user_data): support default=false in multi-select choice syntax#2556BillionClaw wants to merge 1 commit intocopier-org:masterfrom
Conversation
Allow setting default=false in the extended choice syntax for multi-select
questions. Previously, the 'default' property in choice definitions was
ignored, and all choices were unchecked by default (questionary's default).
Now users can specify:
choices:
- value: feature_a
default: false
- value: feature_b
default: true
The choice-level default is respected when no question-level default is set.
When a question-level default list is provided, it overrides the choice-level
defaults for backward compatibility.
Fixes multi-select choice default=false bug
|
Thanks for suggesting this feature and submitting a PR, @BillionClaw! 👍 I'm not fully convinced yet by the approach TBH:
I'm curious about your thoughts. |
|
Just checking in — is this ready for review? |
|
I'll get the CLA signed — will follow up once it's done. |
|
Not quite yet — I still need to address the ambiguity between question-level and choice-level defaults. I’m going to update the PR to handle that cleanly before marking it ready for review. |
|
Thanks for the feedback. I don't see a narrower change that would resolve the ambiguity cleanly without broadening the default/validator model, so I'm going to leave this PR open rather than try to force a redesign into it. |
Allow setting default=false in the extended choice syntax for multi-select questions. Previously, the default property in choice definitions was ignored.
With this change, users can specify:
choices:
default: false
default: true
The choice-level default is respected when no question-level default is set. When a question-level default list is provided, it overrides the choice-level defaults for backward compatibility.
Related to #2421