Skip to content

Support for disabled list entries? #29

@blackbit42

Description

@blackbit42

I have a use-case for pick where i want to display say items 1..8, but two of them, 3 and 6 are not viable options, but 'known' to the underlying system. The user shouldn't be able to select the not viable items, as that would make them expect that action is taken, whereas that is not the case, because it's not possible to do so. I want to be able to visualize that fact that these items are 'known' and not simply leave them out as the user wouldn't be able to differentiate between unknown and disabled items.

I can imagine two different ways to visually represent that.
I think option 1 is preferable, considering lists can be longer than a screen is high, making option 2 non-straight-forward to grasp):

  1. Keep the list and its ordering as provided to the pick function, visually differentiating the disabled from the enabled options (different color, prefix, something like that).
    Disabled options are skipped when navigating the list

  2. Presenting enabled and disabled items in two separate lists.

A necessary implication is that items passed to pick() must be tuples, indicating for each item whether it is enabled or disabled.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions