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 helper top margin when used with RadioControl. #17677

Merged
merged 1 commit into from
Oct 10, 2019
Merged

Fix helper top margin when used with RadioControl. #17677

merged 1 commit into from
Oct 10, 2019

Conversation

desaiuditd
Copy link
Member

@desaiuditd desaiuditd commented Oct 1, 2019

Description

When help prop is used with RadioControl component to show the helper text for the settings field in the sidebar, the helper text looks very stitched up with the radio buttons above.

Ref: https://wordpress.slack.com/archives/C02QB2JS7/p1569910120382900

How has this been tested?

This PR fixes that issue by removing (overriding) the negative top margin applied to components-base-control__help class from BaseControl component, so that it gets some breathing space. Decided to override the styles in RadioControl so that other components stay unaffected.

Screenshots

Before
Screen Shot 2019-10-01 at 20 49 12
After
Screen Shot 2019-10-01 at 20 49 27

Types of changes

  • CSS style changes
  • Non-breaking change

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@gziolo gziolo added Needs Design Feedback Needs general design feedback. [Package] Components /packages/components [Type] Bug An existing feature does not function as intended labels Oct 1, 2019
@karmatosed karmatosed self-requested a review October 10, 2019 15:43
Copy link
Member

@karmatosed karmatosed left a comment

Choose a reason for hiding this comment

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

On surface this feels like a good idea as negative margins don't feel consistent. I would like to know the impact of this though so it needs testing to see if effects any other radio-control areas.

Copy link
Contributor

@enriquesanchez enriquesanchez left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@youknowriad youknowriad merged commit afc287c into WordPress:master Oct 10, 2019
@youknowriad youknowriad added this to the Gutenberg 6.7 milestone Oct 14, 2019
@desaiuditd desaiuditd deleted the fix/helper-margin-top-used-with-radio-control branch May 10, 2020 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Feedback Needs general design feedback. [Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants