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: uniformly set height and border on inputs #43548

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

bbb169
Copy link
Contributor

@bbb169 bbb169 commented Jul 14, 2023

[中文版模板 / Chinese template]

🤔 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
  • Workflow
  • Other (about what?)

🔗 Related issue link

close #43528

💡 Background and solution

uniformly set height and border on inputs

📝 Changelog

Language Changelog
🇺🇸 English Fix Input and InputNumber align issue.
🇨🇳 Chinese 修复 Input 和 InputNumber 行内对齐问题。

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • 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

🚀 Summary

🤖 Generated by Copilot at e0722c8

This pull request enhances the style and consistency of the InputNumber and Input components. It removes the redundant border from the InputNumber wrapper and adjusts the height calculation of the Input component.

🔍 Walkthrough

🤖 Generated by Copilot at e0722c8

  • Remove border from input number wrapper to fix overlap with buttons (link)
  • Add border to input number input to match basic input style and improve consistency (link)
  • Adjust height of basic input to account for border width instead of hard-coding 1px (link)

@stackblitz
Copy link

stackblitz bot commented Jul 14, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 14, 2023

@@ -139,6 +139,7 @@ export const genBasicInputStyle = (token: InputToken): CSSObject => ({
position: 'relative',
display: 'inline-block',
width: '100%',
height: token.controlHeight - 2 * token.lineWidth,
Copy link
Member

Choose a reason for hiding this comment

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

建议改 InputNumber 成 Input 这种实现方式,因为 Input 用的比较多,之前 InputNumber 也是这样的。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (3f92966) 100.00% compared to head (8fdbd94) 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##            master    #43548    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          648       657     +9     
  Lines        10957     11064   +107     
  Branches      2975      2999    +24     
==========================================
+ Hits         10957     11064   +107     
Impacted Files Coverage Δ
components/input-number/style/index.ts 100.00% <100.00%> (ø)

... and 192 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bbb169
Copy link
Contributor Author

bbb169 commented Jul 19, 2023

@argos-ci
Copy link

argos-ci bot commented Jul 19, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Jul 19, 2023, 8:50 AM

@afc163
Copy link
Member

afc163 commented Jul 19, 2023

看下 argos ci,还有不少问题。

图片

@afc163 afc163 merged commit 8a4621c into ant-design:master Jul 19, 2023
@zombieJ zombieJ mentioned this pull request Jul 20, 2023
16 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.

Input 和 InputNumber 底部基线有 1px 偏差
2 participants