-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(forms): Adding dropdown category and related sub question type #17126
feat(forms): Adding dropdown category and related sub question type #17126
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small bugs I've found:
1) Wrong input name
Should be answers_141 since we switched to the new format.
This mean answers are not taken into account for this question type.
2) Invalid order
It seems the dropdown is not refreshed after options order are modified using drag and drop.
The "old" order is still displayed until we do another action like changing the default value.
c5ced17
to
bd6fc60
Compare
(opinion based on the provided screenshots) I think in this particular case, you should not decorate options at all. More, there is the drag icon, so 2 icons on the left of the options Ideas for alternative ux:
|
c02da61
to
9e480e7
Compare
@AdrienClairembault @orthagh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI is good now.
Some changes requested for the code.
1393d86
to
171489f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems globally OK, I just made a few minor remarks.
// Check selected options and option labels | ||
checkSelectedOptions([1]); | ||
checkOptionLabels(["Option 1", "Option 2", "Option 3"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a blocker, but, IMHO, when we switch from multiple to single value dropdonw, we should do this:
- if there are multiple values selected, all should be deselected,
- if there is a unique value selected, it should remain selected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed together, the current design still has flaws (particularly choosing the default value dropdown, covering the rest of the design, leads to a strange state).
But they may be addressed later, especially with the right panel discussed many times.
Some I agree we're ok for this PR.
Co-authored-by: Cédric Anne <cedric.anne@gmail.com>
The decoration input has been hidden, so the tests related to the radio/checkbox check was deleted. The only way to set an option has a default value is to select one or more options in the preview dropdown
Co-authored-by: Cédric Anne <cedric.anne@gmail.com>
8022991
to
000b2be
Compare
Added
Dropdown
category and related sub-question type :Dropdown
Form editor view :
Form end user view :