helpscout / hsds-react

Help Scout Design System (HSDS) — React Component Library
MIT License
86 stars 17 forks source link

HSDS-256: Microsurveys: MultipleChoiceSurvey Component #1064

Closed jakubjanczyk closed 2 years ago

jakubjanczyk commented 2 years ago

Problem/Feature

This PR adds new variant for Messages Microsurveys type: Multiple Choice. This component is quite simple, it takes list of choices as input prop and renders as many Radio buttons as there are choices. Other standard mechanisms from previous microsurvey components are used without any modifications.

This can be checked in by going to Storybook - there is new Story under MessageCard added with some example data.

Screenshot from 2022-05-16 17-40-37

Screenshot from 2022-05-16 17-40-52

Write to your heart's content, include:

Guidelines

Make sure the pull request:

jakubjanczyk commented 2 years ago

@alexestrada As mentioned in the spec file - having Radio button color be the same as Beacon color is tricky for light colors - I have not changed the default Radio color yet, waiting on your opinion :)

Other thing that is different than in design is the spacing around Radio buttons. In figma they have more margin between options, but what you can see here is just the default we have in HSDS. Let me know if I should change it!

cloudflare-pages[bot] commented 2 years ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 990609e
Status:⚡️  Build in progress...

View logs

alexestrada commented 2 years ago

@jakubjanczyk thanks! A few things on this one:

jakubjanczyk commented 2 years ago

@alexestrada Just one thing - we are not using SF Pro font anywhere in our code (neither HSDS, hs-app or beacon, and the last time we've added some font was 2 years ago :smile:). Do we want to start using it here? If so, we'll need to start loading it everywhere :)

I'll wait for the decision about the blue radio :)

alexestrada commented 2 years ago

@jakubjanczyk just to capture what we've chatted about: