hackworthltd / primer-app

Primer's React frontend application.
GNU Affero General Public License v3.0
3 stars 0 forks source link

Is `name : Type` the best way to represent choices in dialogs? #95

Open dhess opened 3 years ago

dhess commented 3 years ago

(This comes from @annedino4's User Research Report Round 2, issue number 18.)

In Vonnegut, when the student selects “Use a variable” or “Use a value”, we present them with a list of buttons, one per variable/value, whose labels are formatted as name : Type . However, early testing indicates that students are conflating the name and type. For example, for variable x : Direction , when asked to say which variable they're inserting, they will sometimes say "Direction”.

Can we help students differentiate via better labels? For one thing, we don’t format these labels very nicely — the names and types run together and they don’t line up vertically. We’ve discussed this at length and have so far come up with the following ideas:

dhess commented 3 years ago

Note to self: come back to this later and add my thoughts on why a generic "Use a variable" action might not be very useful in large programs. Sometimes you only want to see local vars and you know it, and sometimes you know you want to use a function and only want to see functions.

annedino4 commented 3 years ago

Please see design mock-ups below:

Vertical bar between name and type, and align them so they line up vertically across multiple buttons.

Design 1

Screenshot 2021-10-21 at 2 04 27 pm

Show the name as the main label and show the type as a “tag.”

Design 2

Screenshot 2021-10-21 at 2 03 22 pm

Use type names as headers to organize values/variables.

Design 3-1

Screenshot 2021-10-21 at 2 19 46 pm

Design 3-2

Screenshot 2021-10-21 at 2 20 55 pm

Other ideas

Design 4

Screenshot 2021-10-21 at 2 16 23 pm

See Figma file

georgefst commented 2 years ago

All of these are a significant improvement over what we have now. Unsurprisingly my preference is 3-1, as I think it makes the best use of the limited space on many students' screens. Though I actually prefer the simpler styling of the headers from https://github.com/hackworthltd/primer-app/issues/96#issuecomment-948735508, Design 5.

Could we also see a Design 1-2 which addresses the part about aligning the bars "so they line up vertically across multiple buttons"?

annedino4 commented 2 years ago

Could we also see a Design 1-2 which addresses the part about aligning the bars "so they line up vertically across multiple buttons"?

Sorry, missed that one, see below: Design 1-2

Screenshot 2021-10-26 at 3 32 59 pm
annedino4 commented 2 years ago

We should display list of variables similar to list of values, see #96 for when the design is finalised.