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

Remove unnecessary line-height setting for Radio #31421

Merged
merged 1 commit into from Jul 16, 2021

Conversation

gtb104
Copy link
Contributor

@gtb104 gtb104 commented Jul 15, 2021

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

None

💡 Background and solution

When placing a few components inside of a <Space /> component, I noticed that they were not aligning properly. Here is the code in question

<Space>
  <Button><Icon name='cog' /></Button>
  <Divider type='vertical' style={{ height: '32px' }} />
  <Radio.Group
    optionType='button'
    options={ ['ON', 'OFF'] }
    defaultValue='ON'
    size='middle'
  / >
</Space>

This resulted in a slight vertical misalignment of UI elements

Screen Shot 2021-07-15 at 2 35 11 PM
Screen Shot 2021-07-15 at 2 33 59 PM

I did some digging and discovered the culprit to be an unnecessary line-height declaration in the <Radio /> component. Further investigation revealed that this was introduced in a RTL PR (#19380). I removed the extra line-height and verified layout in LTR and RTL.

Screen Shot 2021-07-15 at 2 34 44 PM
Screen Shot 2021-07-15 at 2 34 12 PM

📝 Changelog

Language Changelog
🇺🇸 English remove unnecessary line-height setting for Radio
🇨🇳 Chinese 删除 Radio 不必要的 line-height 设置

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link
Contributor

Prepare preview

@codecov
Copy link

codecov bot commented Jul 16, 2021

Codecov Report

Merging #31421 (e8ce046) into master (7f8e177) will not change coverage.
The diff coverage is n/a.

❗ Current head e8ce046 differs from pull request most recent head a7e8933. Consider uploading reports for the commit a7e8933 to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##            master    #31421   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          397       397           
  Lines         7568      7568           
  Branches      2135      2135           
=========================================
  Hits          7568      7568           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f8e177...a7e8933. Read the comment docs.

@afc163 afc163 merged commit 56a1bbb into ant-design:master Jul 16, 2021
@PeachScript PeachScript mentioned this pull request Jul 18, 2021
15 tasks
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.

None yet

3 participants