-
Notifications
You must be signed in to change notification settings - Fork 365
[Radio] Fix height difference when displaying NOTA (none of the above) radio choice #3195
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@khanacademy/perseus": patch | ||
| --- | ||
|
|
||
| Fix height difference when displaying NOTA (none of the above) radio choice |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -191,9 +191,6 @@ const ChoiceListItems = (props: ChoiceListItemsProps): React.ReactElement => { | |
| ? "correct" | ||
| : "wrong" | ||
| : undefined; | ||
| const content = choice.isNoneOfTheAbove | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed the redundant NOTA content override that was replacing Renderer-wrapped content with a plain string
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this change is kept, then there needs to be a way to ensure that this string is included in the choice content. The current usage of the NOTA in the editor is that the text is not editable. If I recall correctly, the content for a NOTA choice is an empty string.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, this code is ensuring that the NOTA option has been translated in a consistent manner. If this text is managed elsewhere, then it will need to ensure the same results. |
||
| ? i18nStrings.noneOfTheAbove | ||
| : choice.content; | ||
| let rationale: React.ReactElement | undefined; | ||
| if (reviewMode && choice.hasRationale) { | ||
| const rationaleId = `${contentId}-rationale`; | ||
|
|
@@ -219,7 +216,7 @@ const ChoiceListItems = (props: ChoiceListItemsProps): React.ReactElement => { | |
| updateChecked={updateChecked} | ||
| > | ||
| <div className={styles.content}> | ||
| <div id={contentId}>{content}</div> | ||
| <div id={contentId}>{choice.content}</div> | ||
| {rationale} | ||
| </div> | ||
| </Choice> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that is the case, then this test is not needed since there is no logic to test.