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

website: Switch to likert style labeling #872

Merged
merged 2 commits into from Jan 23, 2023

Conversation

othrayte
Copy link
Collaborator

@othrayte othrayte commented Jan 21, 2023

This PR proposes to change the labeling task and messaging labeling to use a likert style scale of 5 options instead of a slider. The advantages include:

  • it's clearer what to do
  • the user has to think less about the value they are entering (i.e. 41% vs 44%)
  • the labels are at the ends of the scale that they represent
  • the interface is more friendly to touch screens and small screens
  • there is consistency between the labeling task and the user initiated message flagging.

Things to note:

  • This PR doesn't yet update the valid labels API to return the new format for labeling data and as such it is just in the website at the moment.
  • We still in another PR need to reduce the options and make them specific to the type of message being labelled (backend).
  • I still need to figure out how to write the cypress E2E test that clicks on one of the radio buttons for each label.
  • We should review the content, the "opposite" labels are just the ones I came up with and have not really been reviewed.

image
image
image
image
image

Copy link
Collaborator

@AbdBarho AbdBarho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

One final thing which I would like to discuss is using a standard radio group with toggles (like this) instead of buttons with <<, <, etc...

The former is well known and I think it signifies the intention with much less room for misinterpretation.

.last()
.click();
// TODO: Reimplement to click on a aria-roledescription="radio" in each incomplete aria-roledescription="radiogroup"
cy.get('[aria-roledescription="radiogroup"]');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can assign custom data properties for testing only, similar to what we had previously data-cy="label-group-item"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than radio buttons or new radio group buttons, we could use a Chakra Slider with discrete options and custom tics

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fozziethebeat, would this still look similar or would it look like a slider again. I couldn't see a way that the custom ticks reproduce the same N options interface, Chakra's examples look like they don't change how the actual sliders work or appear.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's a great option but you can customize the slider appearance and option. It still ultimately would be a slider however.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can assign custom data properties for testing only, similar to what we had previously data-cy="label-group-item"

I've made an attempt at this, but it is a little odd as you can't use data-cy on components that don't render to the dom and expect cypress to find them so I had to pass it down. For finding the options in the radio group I'm still using the aria role as that should work regardless of how we implement the actual radio buttons.

website/src/components/Buttons/LikertButtons.tsx Outdated Show resolved Hide resolved
website/src/components/Buttons/LikertButtons.tsx Outdated Show resolved Hide resolved
website/src/components/FlaggableElement.tsx Outdated Show resolved Hide resolved
website/src/components/FlaggableElement.tsx Outdated Show resolved Hide resolved
website/src/components/Survey/LabelInputGroup.tsx Outdated Show resolved Hide resolved
@othrayte
Copy link
Collaborator Author

Thank you!

One final thing which I would like to discuss is using a standard radio group with toggles (like this) instead of buttons with <<, <, etc...

The former is well known and I think it signifies the intention with much less room for misinterpretation.

@AbdBarho, Do you mean with " (*) name ( ) name2 ( ) name3 " or are you refering to custom radio options from that page? I think the former has significant clarity issues is we show it on narrow phone screens or in the report message modal popup. The latter is effectively what we have at the moment. Initially I thought the custom appearance support would do more but when I went back to read it again during development I couldn't see how it helped, maybe I missed something.

@othrayte
Copy link
Collaborator Author

othrayte commented Jan 22, 2023

@AbdBarho, FYI we are discussing radio option appearance in discord. https://discordapp.com/channels/1055935572465700980/1065268675357179924/1066626112521764884

@othrayte
Copy link
Collaborator Author

The latest change switches to radio buttons as per the vote in discord. The once caveat is for the case of very skinny windows and phones where we move the labels above the radio buttons due to space constraints.

The other change was some minor tweaks to the label text. I suspect there will be more of that coming even after we get this PR in.

Images:
image
image
image
image

@andreaskoepf
Copy link
Collaborator

Nice job! :-)

@AbdBarho AbdBarho merged commit 89f9e5a into LAION-AI:main Jan 23, 2023
@othrayte othrayte deleted the likert-like-labelling branch January 23, 2023 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants