cytoscape / cytoscape-explore

Network visualization webapp.
MIT License
12 stars 4 forks source link

Discrete mapper improvements #105

Closed mikekucera closed 2 years ago

mikekucera commented 2 years ago

Discussed in https://github.com/cytoscape/cytoscape-explore/discussions/99

Originally posted by **maxkfranz** November 17, 2021 Here's an idea to improve the discrete mapper UI. Currently, there are two issues: - (A) The mapper UI shows a lot of options when the the set of values for the selected attribute is high. - (B) The issue re. 'defaults'. The idea is to make the list of values editable: - (1) Each line in the discrete mapper UI shows an 'x' beside it so it can be removed. - (2) There's a plus button to add a new line. - (3) Whenever not all of the values each have a line, there is an 'other' entry at the end. The 'other' entry is not shown to the user otherwise, since it would have no net effect to change it when all the real values have mappings set. - (4) The initial set of discrete mappings is smart, based on the size of the set of values. If large, then you start off with just the plus button and 'other'. If small, then you start off with all the entries listed with lines. - (5) When clicking the plus button, you just use a dropdown to select the attribute you want. It would look something like this: ``` x [ red ] Some value x [ blue ] Another value x [ green ] Other (Add a entry) ``` The main benefits are: - You always see the full list when it's a reasonable size to map. You shouldn't be using a discrete mapper to set individual colours for 200 distinct score values, for instance. But if you have just 6 score values, then it's reasonable. - You don't get overwhelmed by a huge, difficult to edit list. - The 'defaults' issue is resolved by 'other', yet the user doesn't get the added complexity of 'defaults' semantics. The mental model for users is 'all the other values', not a hierarchical set of rules with defaults. - This is more in line with the legends idea. The discrete mapper UI looks pretty well like a legend would, which means it would fit well with future legend UIs and it would fit naturally with the user's mental model. - In terms of conversion to CX etc., the 'default' value doesn't matter unless the user hasn't set all the values. - If the user has set all values: The default doesn't matter. You could send a random value if you really want. - If the user has set only some values: Send 'other' as the default value. @mikekucera @chrtannus @d2fong