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: Switch trigger motion #24254

Merged
merged 7 commits into from May 18, 2020
Merged

fix: Switch trigger motion #24254

merged 7 commits into from May 18, 2020

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented May 18, 2020

[中文版模板 / Chinese template]

🤔 This is a ...

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

🔗 Related issue link

resolve #19915
resolve #24087

💡 Background and solution

把 Switch 的 handle 做成一个元素,让 loadingIcon 放里面免得还要额外处理对齐问题。现在实际元素总是和容器尺寸对齐,点击宽度变化通过内部渲染元素改变。

Preview

https://preview-24254-ant-design.surge.sh/components/switch-cn/

📝 Changelog

Language Changelog
🇺🇸 English Fix Switch autoFocus trigger when disabled removed. Adjust style to avoid switch shaking. Remove blur logic when onMouseUp to improve acessibility.
🇨🇳 Chinese 修复 Switch autoFocusdisabled 移除后会触发的问题。调整样式以避免切换时额外的抖动。移除鼠标点击失焦逻辑以提升无障碍体验。

☑️ 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

@ant-design-bot
Copy link
Contributor

@ant-design-bot ant-design-bot commented May 18, 2020

@zombieJ zombieJ marked this pull request as ready for review May 18, 2020
@zombieJ zombieJ requested a review from afc163 May 18, 2020
@codecov
Copy link

@codecov codecov bot commented May 18, 2020

Codecov Report

Merging #24254 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24254   +/-   ##
=======================================
  Coverage   98.81%   98.81%           
=======================================
  Files         363      363           
  Lines        7280     7281    +1     
  Branches     2006     2015    +9     
=======================================
+ Hits         7194     7195    +1     
  Misses         86       86           
Impacted Files Coverage Δ
components/switch/index.tsx 100.00% <100.00%> (ø)

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 32ee08c...9ea0891. Read the comment docs.

afc163
afc163 approved these changes May 18, 2020
@zombieJ zombieJ merged commit 75b090a into master May 18, 2020
34 checks passed
@zombieJ zombieJ deleted the fix-switch branch May 18, 2020
@zombieJ zombieJ mentioned this pull request May 18, 2020
17 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.

3 participants