-
Notifications
You must be signed in to change notification settings - Fork 98
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: Allow to reorder options of "checkbox" "radio" and "dropdown" question types in frontend #2092
base: main
Are you sure you want to change the base?
Conversation
2faf119
to
ee71d9d
Compare
I think it looks fine but had one suggestion :) |
ee71d9d
to
ef615de
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.
Some things I found by looking at the code, did not test it by now.
ef615de
to
18901ad
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.
There is not much space for a "drag" handle + a11y button so I just used buttons, I do not think it looks super awesome, but it works. Do you have an idea how to improve? Especially because there is already the drag handle for the question itself.
@susnux what about using a drag handle that on click/enter shows a menu saying "Move up" and "Move down"? Then it would be 1 icon less, and both cases would be covered.
Questions:
- Should the drag handle be on left or right – I would tend towards left
- Which icon to use. I’d say the simple "drag" – or we use that for the whole question, and the "drag-horizontal-variant" for the individual replies?
@jancborchardt This would on the other hand introduce one more click for every move operation...
having the handle on the left would introduce one more difference between edit and view mode, but we already have some differences, so I'd be fine with that. Whatever looks better as a whole. |
The problem with a drag handle on the left is the conflict with the drag handle for the question itself. |
Signed-off-by: Ferdinand Thiessen <[email protected]>
…ype options Signed-off-by: Ferdinand Thiessen <[email protected]>
18901ad
to
4a5cd72
Compare
69939ee
to
fecb454
Compare
@susnux @jancborchardt What about having the arrow icons as an overlay at the end of the input fields that only shows up when the field has the focus / hover? @susnux should I add your backend code to the API v3 PR or would you like to keep it in here and adjust it after v3 merge? |
will adjust afterwards :) |
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.
What about having the arrow icons as an overlay at the end of the input fields that only shows up when the field has the focus / hover?
@Chartman123 sounds good! Then it’s not that much visual noise, and the fields are nicely aligned in width. :)
This adds support to reorder options instead of having to remove them.
It works but I had to modify a lot of places to keep smooth behavior of the list ordering.
Implementation things:
@nextcloud/designers question:
Screenshots