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

Correct width of checkboxes with drop down select #3212

Merged

Conversation

balibirchlee
Copy link
Contributor

@balibirchlee balibirchlee commented May 22, 2024

What is the context of this PR?

Fixes: #3181

Details of changes:

  • Standardises widths of checkboxes & radios with revealed selects.

Reasoning for decisions:

  • Moves CSS from Radio to Checkboxes as this is where radio extends its CSS from.
  • Uses min-width rather than width to prevent it restricting the size of the feedback patterns which are wider than 25rem.
  • Uses :has(select) to identify when a radio/checkbox has a hidden select component, then uses :first-child to ensure it's only set on one parent element of that select, rather than all of them (which creates visual errors).

Relevant issues/discussions:

  • I will add a note to the tech session agenda to say that the mutually exclusive component needs reconsidering (personally I think it's a pattern - and one that needs a refactor probably).

How to review this PR

Visual inspection:
Components/Patterns to Check

  • Checkboxes & Radios examples with 'revealed-select'
  • Feedback: Form & Form-Errors

Actions

  • Make sure to click the select!

Desired Behaviour

  • Width should stay stable for all options including on click (no jumping in size, no size differences between different options).

Relevant tests:

  • VR test!

Special attention:

  • Double check the changes to the vr snapshots.

Checklist

This needs to be completed by the person raising the PR.

  • I have selected the correct Assignee
  • I have linked the correct Issue

@balibirchlee balibirchlee added the Bug Something isn't working label May 22, 2024
@balibirchlee balibirchlee requested a review from a team May 22, 2024 11:34
@balibirchlee balibirchlee self-assigned this May 22, 2024
@balibirchlee balibirchlee linked an issue May 22, 2024 that may be closed by this pull request
Copy link

netlify bot commented May 22, 2024

Deploy Preview for ons-design-system-preview ready!

Name Link
🔨 Latest commit 82ceedb
🔍 Latest deploy log https://app.netlify.com/sites/ons-design-system-preview/deploys/665dbb6f0611c20008881d3d
😎 Deploy Preview https://deploy-preview-3212--ons-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@balibirchlee balibirchlee marked this pull request as ready for review May 22, 2024 11:53
@rmccar rmccar changed the title correct width of checkboxes with drop down select Correct width of checkboxes with drop down select May 24, 2024
@alessioventuriniAND alessioventuriniAND merged commit a04b235 into main Jun 3, 2024
9 checks passed
@alessioventuriniAND alessioventuriniAND deleted the fix/3181/aligns-checkbox-widths-for-revealed-selects branch June 3, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Widths aren't aligned with checkboxes with revealed selects
4 participants