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

refactor: Simplify and improve description radio layout #3729

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

ianjon3s
Copy link
Contributor

@ianjon3s ianjon3s commented Sep 24, 2024

What does this PR do?

An overdue change — simplifies questions/radios so that they are no longer placed in a 3 column-grid with border when a description is present. Follows the GOV.UK pattern: https://design-system.service.gov.uk/components/radios/#radio-items-with-hints

Image radios are still gridded for now (to be explored as a further design challenge as we are not following a GOV.UK content pattern).

Preview:
https://3729.planx.pizza/testing/question-layouts/preview

Before:
image

After:
image

Copy link

github-actions bot commented Sep 24, 2024

Removed vultr server and associated DNS entries

@ianjon3s ianjon3s marked this pull request as ready for review September 24, 2024 15:29
@ianjon3s ianjon3s requested a review from a team September 24, 2024 15:29
sx={(theme) => ({
mb: variant === "default" ? 1 : 0,
alignItems: "flex-start",
".MuiFormControlLabel-label": {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can also use import { formLabelClasses } from "@mui/material/FormControlLabel" to get this in a more reliable way.

Suggested change
".MuiFormControlLabel-label": {
[`& .${formControlLabelClasses.label}`]: {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for this @DafyddLlyr , updated.

@ianjon3s ianjon3s merged commit 53f213b into main Sep 24, 2024
12 checks passed
@ianjon3s ianjon3s deleted the ian/simplify-improve-description-radios branch September 24, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants