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

feat: add disabled items support in multiselect #319

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

omertuc
Copy link

@omertuc omertuc commented Jan 29, 2025

Sometimes it's nice to show a user a list of options, some of which the user cannot interact with.

e.g. A list of linux users on this machine to import to a new machine, I would like to show root but without allowing the user to deselect it.

Current implementation limitations:

  • No theme support - there's no indication that an item is disabled until the user attempts to interact with it. Would adding such visual indication be a good idea from a compatibility perspective? Are themes all built-in or possibly user defined?

  • Cannot dynamically add items with a different disabled state. This would require modifying the signature of e.g. item_checked which would be a breaking change. I could also add a new method but I wasn't sure if it's worth it.

  • No tests

  • No documentation

Do you think this is a desired feature? If so, I can work on improving the limitations. Should this maybe be a separate widget altogether?

Sometimes it's nice to show a user a list of options, some of which the
user cannot interact with.

e.g. A list of linux users on this machine to import to a new machine, I
would like to show root but without allowing the user to deselect it.

Current implementation limitations:

- No theme support - there's no indication that an item is disabled
  until the user attempts to interact with it. Would adding such visual
  indication be a good idea from a compatibility perspective? Are themes
  all built-in or possibly user defined?

- Cannot dynamically add items with a different disabled state. This
  would require modifying the signature of e.g. `item_checked` which
  would be a breaking change. I could also add a new method but I wasn't
  sure if it's worth it.

- No tests

- No documentation

Do you think this is a desired feature? If so, I can work on improving
the limitations. Should this maybe be a separate widget altogether?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant