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

fix(ChoiceGroup): add better guidance for image + text strings, and update the example #19758

Merged
merged 3 commits into from
Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ const options: IChoiceGroupOption[] = [
{
key: 'bar',
imageSrc: TestImages.choiceGroupBarUnselected,
imageAlt: 'Bar chart icon',
imageAlt: 'Bar chart',
selectedImageSrc: TestImages.choiceGroupBarSelected,
imageSize: { width: 32, height: 32 },
text: 'Clustered bar chart', // This text is long to show text wrapping.
text: 'Bar', // This text is long to show text wrapping.
Copy link
Member

Choose a reason for hiding this comment

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

Should the comment after be removed now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, yup, fixed! 😄

},
{
key: 'pie',
imageSrc: TestImages.choiceGroupBarUnselected,
selectedImageSrc: TestImages.choiceGroupBarSelected,
imageSrc: TestImages.choiceGroupPieUnselected,
imageAlt: 'Pie chart',
selectedImageSrc: TestImages.choiceGroupPieSelected,
imageSize: { width: 32, height: 32 },
text: 'Pie chart',
text: 'Pie',
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
- Select the safest (to prevent loss of data or system access), most secure, and most private option as the default. If safety and security aren't factors, select the most likely or convenient option.
- Use a phrase for the label, rather than a full sentence.
- Make sure to give people the option to not make a choice. For example, include a "None" option.
- When using ChoiceGroup with images, keep text short (ideally one or two words), since overflowing text will be cut off. Translation to other languages and user-applied text styles can often cause label text to end up longer than the English label with author styles.