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

[Feature Request]: Add disabledReason to Button Component #1181

Open
2 tasks done
hunoz opened this issue Jun 6, 2023 · 3 comments
Open
2 tasks done

[Feature Request]: Add disabledReason to Button Component #1181

hunoz opened this issue Jun 6, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@hunoz
Copy link

hunoz commented Jun 6, 2023

Description

Currently, the Button component allows for a disabled attribute, but no disabledReason attribute, telling the user why it's disabled. The addition of this attribute would bring it in line with the ButtonDropdownProps.ItemOrGroup attributes, which allows each item to specify why it is disabled to the user.

Code of Conduct

@hunoz hunoz added the enhancement New feature or request label Jun 6, 2023
@johannes-weber
Copy link
Member

Hi @hunoz, thanks for your feature request!
Could you elaborate on your specific use case? We'll use this data to evaluate further and make a determination.

For button dropdown, it's more meaningful to be able to see disabled reasons, since users can't see the items until they open it. For normal buttons you could still indicate the reasons in different ways like in alert or description text instead of relying on a hover action which is not mobile friendly.

@hunoz
Copy link
Author

hunoz commented Jun 14, 2023

Hey there,

I can't speak on the mobility of this, but there isn't really a way to let the user know why the button is disabled aside from a generic alert using something like the Flashbar.

As for my specific use case, at the header portion of my page, I have a button next to my button dropdown, as the context of the button doesn't fit with the others, but I cannot easily tell the user why the button is disabled (be it permissions or an error). This leads to confusion from the user as they believe the button should be enabled for one reason or another. As mentioned, I could use something like a flashbar to notify the user why the button is disabled, however I believe this to be a worse user experience as the notification would feel disconnected from the button and would be overkill especially if the user had no intention of using the button.

@n3662
Copy link

n3662 commented Jan 9, 2024

+1 for this, we require it to notify the user for required permissions/reason why the button is disabled. A hover action is fine for us as our clients are all desktop based.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants