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

feat: Make border of Radio thicker when hovering #1696

Merged
merged 12 commits into from
Nov 20, 2024

Conversation

VincentSmedinga
Copy link
Contributor

@VincentSmedinga VincentSmedinga commented Oct 23, 2024

Describe the pull request

What

This makes the stroke of the circle of a Radio button a bit thicker when hovering over it.

Why

Because it has been designed as such.

How

The hover indicator is implemented as a separate circle to ensure it thickens to the inside only. Increasing the stroke width of one circle makes it grow to both the inside and outside.

I’ve added a token to make the background of the icon explicitly white – or else a background would shine through.

I’ve also changed the values to use pixels instead of rems to prevent the border from becoming overly thick when the text size is increased.

Checklist

Before submitting your pull request, please ensure you have done the following. Check each checkmark if you have done so or if it wasn't necessary:

  • Add or update unit tests
  • Add or update documentation
  • Add or update stories
  • Add or update exports in index.* files
  • Start the PR title with a Conventional Commit prefix, as explained here.

Additional notes

RubenSibon
RubenSibon previously approved these changes Nov 1, 2024
Copy link
Contributor

@RubenSibon RubenSibon left a comment

Choose a reason for hiding this comment

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

LGTM, slightly off position is acceptable imo.

@alimpens
Copy link
Contributor

alimpens commented Nov 4, 2024

The position of the thicker border is not entirely correct. It divides is growth over the outside and inside, while the design shows it should grow to the inside only.

I think this looks a little weird, especially since all components with border width changes on hover currently grow to the inside only.

I left this hover effect out because it looks weird with a checked radio, that hasn't been designed yet I think.

Seeing as a Radio always has a label, and that has a very obvious underline on hover, maybe we don't need a hover effect on the radio icon at all? We should probably align that with the Checkbox though.

@github-actions github-actions bot temporarily deployed to demo-DES-981-radio-button-hover-border November 12, 2024 08:30 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-981-radio-button-hover-border November 12, 2024 10:25 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-981-radio-button-hover-border November 12, 2024 10:28 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-981-radio-button-hover-border November 12, 2024 12:20 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-981-radio-button-hover-border November 12, 2024 13:50 Destroyed
@VincentSmedinga
Copy link
Contributor Author

The hover effect has been changed. This required redrawing the icon.

Copy link
Contributor

@dlnr dlnr left a comment

Choose a reason for hiding this comment

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

The hover border now appears inside the radio. Is that supposed to happen?

proprietary/assets/icons/Radio.svg Outdated Show resolved Hide resolved
@VincentSmedinga
Copy link
Contributor Author

The hover border now appears inside the radio. Is that supposed to happen?

Yes, the PR description says so: “The hover indicator is implemented as a separate circle to ensure it thickens to the inside only.”

All our borders thicken to the inside: Checkbox, Link, Input.

@github-actions github-actions bot temporarily deployed to demo-DES-981-radio-button-hover-border November 19, 2024 21:22 Destroyed
@github-actions github-actions bot temporarily deployed to demo-DES-981-radio-button-hover-border November 19, 2024 21:43 Destroyed
@VincentSmedinga VincentSmedinga requested a review from dlnr November 19, 2024 21:43
Copy link
Contributor

@dlnr dlnr left a comment

Choose a reason for hiding this comment

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

The only thing I think is left is a size reduction in the compact theme. We can do this in another PR.

@github-actions github-actions bot temporarily deployed to demo-DES-981-radio-button-hover-border November 20, 2024 08:49 Destroyed
@VincentSmedinga VincentSmedinga merged commit 8839012 into develop Nov 20, 2024
6 checks passed
@VincentSmedinga VincentSmedinga deleted the feature/DES-981-radio-button-hover-border branch November 20, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants