Skip to content
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

[Enhancement]: Indicate to the user as a nudge when default selected does not match with user options on select, radio, checkbox widgets #9243

Open
1 task done
ramsaptami opened this issue Nov 18, 2021 · 7 comments
Labels
Checkbox Group widget Issues related to Checkbox Group Widget Checkbox Widget Enhancement New feature or request Low An issue that is neither critical nor breaks a user flow MultiSelect Widget Issues related to MultiSelect Widget MultiTree Select Widget Issues related to MultiTree Select Widget Radio Widget Select Widget Select or dropdown widget TreeSelect Issues related to TreeSelect Widget Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets

Comments

@ramsaptami
Copy link
Contributor

ramsaptami commented Nov 18, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Summary

Currently, Default Selected Value(s) field on Radio, Select, Checkbox, Checkbox group, Tree Select does not validate against user defined options. So incorrect default value simply clears any selection (see video). Instead, provide a nudge to the user on a mismatch between default value set. Also, provide an option to leave this field blank to accommodate flexible use (as is current behavior)

Why should this be worked on?

Gently nudging the user helps user experience in case they miss changing default text for any reason.

LOOM DEMO

@ramsaptami ramsaptami added Enhancement New feature or request Select Widget Select or dropdown widget Radio Widget Checkbox Widget MultiSelect Widget Issues related to MultiSelect Widget Checkbox Group widget Issues related to Checkbox Group Widget MultiTree Select Widget Issues related to MultiTree Select Widget TreeSelect Issues related to TreeSelect Widget labels Nov 18, 2021
@github-actions github-actions bot added Widgets Product This label groups issues related to widgets UI Building Pod labels Nov 18, 2021
@somangshu
Copy link
Contributor

this is expected behaviour, I am closing this because its a non issue

@ramsaptami ramsaptami changed the title [Feature]: Validate default selected with options on select, radio, checkbox widgets [Enhancement]: Indicate to the user as a nudge when default selected does not match with user options on select, radio, checkbox widgets Nov 19, 2021
@ramsaptami ramsaptami assigned hetunandu and unassigned somangshu Nov 19, 2021
@ramsaptami ramsaptami reopened this Nov 19, 2021
@aswathkk
Copy link
Contributor

aswathkk commented Dec 3, 2021

Hey team! Please add your planning poker estimate with ZenHub @riodeuno @hetunandu

@riodeuno
Copy link
Contributor

riodeuno commented Dec 3, 2021

We need to update the validations to use a FUNCTION validation type, which uses the current props to validate that the defaultValues are a subset of the options. This effects the following widgets:
Radio, Select, Checkbox, Checkbox group, Tree Select, Multi-tree select, switch group

@aswathkk
Copy link
Contributor

aswathkk commented Dec 3, 2021

@riodeuno We had that kind of validation for CheckboxGroupWidget and we removed it on #8598 since it was creating some issues. The default value can also come through bindings which makes things complicated.
Maybe @jsartisan can give some more information.

@jsartisan
Copy link
Contributor

we removed it because we felt that validation is just overkill and was creating issues with refreshing the app. I won't suggest doing it because sometimes the options list comes from an API and the default value may not be in the list from API.

@riodeuno
Copy link
Contributor

riodeuno commented Dec 9, 2021

I believe this issue talks about a DX issue for an Appsmith developer developing an app. The reason I like this issue, is because

  • It standardises DX across all widgets of this kind.
  • Improves the integrity of the default values by preventing typos and incorrect bindings
  • End users are not effected

Having said that, I believe as @jsartisan and @aswathkk mentioned we have a technical hurdle here w.r.t dynamically bound options.

So, let's revisit this issue once we have an approach for a DX that has an impact on our users.

@ramsaptami I'm decreasing the priority of this issue for now.

@riodeuno riodeuno added the Low An issue that is neither critical nor breaks a user flow label Dec 9, 2021
@shadabbuchh
Copy link
Contributor

Due to this issue some other validations don't work as expected:
https://www.loom.com/share/5e4c82c312aa41ec822d90ecece941a1

@Nikhil-Nandagopal Nikhil-Nandagopal added the Widgets & Accelerators Pod Issues related to widgets & Accelerators label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Checkbox Group widget Issues related to Checkbox Group Widget Checkbox Widget Enhancement New feature or request Low An issue that is neither critical nor breaks a user flow MultiSelect Widget Issues related to MultiSelect Widget MultiTree Select Widget Issues related to MultiTree Select Widget Radio Widget Select Widget Select or dropdown widget TreeSelect Issues related to TreeSelect Widget Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets
Projects
None yet
Development

No branches or pull requests

9 participants