redivis / meta

Tracking meta issues and general development.
6 stars 1 forks source link

Improve UX for handling conflicting variable names in transforms #244

Open imathews opened 2 months ago

imathews commented 2 months ago

Originally posted by Josh Grab in the PHS users slack:

Hi, I have a suggestion for improvement. Referring to the same variable selection area as in this thread from June 2024 (https://phs-data-users.slack.com/archives/C937JHJAF/p1718390169756439), when doing a Join, there's a very helpful tip that appears when conflicts arise (e.g. same var name in both tables to be joined), but (a) it only tells you about one conflict at a time and (b) after each conflict is resolved, it goes back to the top of the list (the issue Jayme mentioned), which may or may not be helpful depending on where your each conflict is in the list.

My first thought is “make the Output variables list sortable by Varname (alphabetical) and then all conflict pairs will be adjacent” but further thought suggests that is a can of worms. (It might require actually re-ordering the rows in the underlying tables when the transform runs, and that’s probably an expensive operation, and assumes the user actually meant for the resulting table to have re-ordered fields).

So, what is a hopefully simple to implement helpful solution? Here are two suggestions: Highlight or add the exclamation point to the conflict pairs in the “Output variables” column. With the current functionality of these columns (where it resets to top of list after every insertion/removal operation), having color-coded or flagged problem rows would go a long way to easing the pain of having to scroll through hundreds of vars looking for the right variable name. I don’t know if it’s just as easy to identify all conflict pairs at once as it is to just find the ‘first’ conflict, but even if it’s only highlighting one conflict pair at a time, that would be a help. (highlighting all conflict pairs might actually make it more confusing than one pair at a time? I don't know, I'm not a UX designer.)

Alternatively, an option that wouldn’t need highlighting and would solve/eliminate the searching through the list for the one you want to remove would be to temporarily insert a “Conflict variables” table just above the “Output variables” column (example in screenshot) whenever a conflict is identified. If linked to the same left/right buttons for removing variables from the Output list, this would make it really easy to deal with conflicts. My example shows two conflict pairs, but again, maybe one conflict pair at a time is a better UX design, and even if it can only handle one conflict pair at a time, it would be so much faster than clicking on the exclamation point to find out which var is the problem and then scrolling through the list each time to find the one of the pair I want to remove.

Screenshot 2024-08-06 101959