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

[DxcDropdown] new props "disabled" & "mode" for the options #1747

Open
AlanPadi95 opened this issue Dec 11, 2023 · 6 comments
Open

[DxcDropdown] new props "disabled" & "mode" for the options #1747

AlanPadi95 opened this issue Dec 11, 2023 · 6 comments
Labels
enhancement New feature or request non-closable This task is exempt from becoming stale or automatically closed.

Comments

@AlanPadi95
Copy link

Is your feature request related to a problem? Please describe.
First, we need a way to disable an option without disabling the entire dropdown. Some of the options in the dropdown could be disabled because a user does not have permission to click on them.

Also, we need to show priorities between the different options. In most of our cases, some options are more relevant than others and we need a way to show this importance in an understandable way for the users.

Describe the solution you'd like
The solution to disable options is to add a prop disabled and make them unable to interact.

To implement different priorities for each option in the dropdown, we can use the current implementation of the mode prop that we have in the DxcButton, including the new one suggested on [DxcButton] "danger" mode.
By default, this mode should be "text" to not change the current approach.
The danger mode should show the action on a red background such as in the DxcButton.

Describe alternatives you've considered
N/A

Additional context
An example use case:

image

The first option should have primary as the value of the mode prop and the last option should have danger as the value of that prop.
The options in the image could be disabled if, for example, a user has permission to edit the resource but not to delete it.

Add Labels
SaaSOps Automation, CSAM Applications, DxcDropdown.

@AlanPadi95
Copy link
Author

Another suggestion to use the dropdown with the modes and priorities is to set the primary option as a button and the other options in the dropdown when is expanded. Example in Outlook:

image

Copy link

github-actions bot commented Feb 7, 2024

This issue is stale because it has been open for 15 days with no activity. If there are no further updates or modifications within the next 15 days, it will be automatically closed.

@github-actions github-actions bot added the stale This task has no activity and will be closed within 15 days. label Feb 7, 2024
@AlanPadi95
Copy link
Author

Hey, guys!

Could you please share any updates on this issue?

The GitHub bot would close the issue if there are not any updates on it.

Thank you all in advance! 🥰

@Mil4n0r
Copy link
Collaborator

Mil4n0r commented Feb 12, 2024

Both this issue and #1746 are pending to be reviewed by the design team.

For now, I am removing the stale label to prevent it from closing.

Sorry for the inconvenience.

@Mil4n0r Mil4n0r added enhancement New feature or request and removed stale This task has no activity and will be closed within 15 days. labels Feb 12, 2024
Copy link

This issue is stale because it has been open for 15 days with no activity. If there are no further updates or modifications within the next 15 days, it will be automatically closed.

@github-actions github-actions bot added the stale This task has no activity and will be closed within 15 days. label Feb 28, 2024
@Mil4n0r Mil4n0r added non-closable This task is exempt from becoming stale or automatically closed. and removed stale This task has no activity and will be closed within 15 days. labels Feb 28, 2024
@GomezIvann
Copy link
Collaborator

Hello again @AlanPadi95!

I'm going to answer both requests:

  1. Disable option. We consider that this option does not make sense as it is not user-friendly to show an option in the menu when the user cannot interact with it. If this is the case, we recommend that it not be shown.
  2. Prioritised options. At the moment we consider all the options in a dropdown menu at the same level, with no degrees of priority between them. It is more of a navigational or action group in which every option has the same importance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request non-closable This task is exempt from becoming stale or automatically closed.
Projects
None yet
Development

No branches or pull requests

3 participants