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: percent={(3 / 9) * 100} steps={9} shows 2 #28530

Merged
merged 5 commits into from
Dec 29, 2020
Merged

Conversation

gaoryrt
Copy link
Contributor

@gaoryrt gaoryrt commented Dec 24, 2020

[中文版模板 / 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
  • Other (about what?)

🔗 Related issue link

N/A

💡 Background and solution

image

<Progress percent={(3 / 9) * 100} steps={9} />

supposed to display 3 blocks, but there's only 2

📝 Changelog

Language Changelog
🇺🇸 English Fix Progress steps display accuracy.
🇨🇳 Chinese 修复 Progress steps 显示精度问题。

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

@gaoryrt gaoryrt changed the title 🐛 fix bug: percent={(3 / 9) * 100} steps={9} shows 2 fix: percent={(3 / 9) * 100} steps={9} shows 2 Dec 24, 2020
@ant-design-bot
Copy link
Contributor

ant-design-bot commented Dec 24, 2020

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 24, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 94414ac:

Sandbox Source
antd reproduction template Configuration

@github-actions
Copy link
Contributor

github-actions bot commented Dec 24, 2020

Size Change: +6 B (0%)

Total Size: 791 kB

Filename Size Change
./dist/antd-with-locales.min.js 313 kB +3 B (0%)
./dist/antd.min.js 276 kB +3 B (0%)
ℹ️ View Unchanged
Filename Size Change
./dist/antd.compact.min.css 66.7 kB 0 B
./dist/antd.dark.min.css 68 kB 0 B
./dist/antd.min.css 66.7 kB 0 B

compressed-size-action

@gaoryrt
Copy link
Contributor Author

gaoryrt commented Dec 24, 2020

本来想解决 33% 在 step 为 9 时不显示 3 的问题
好吧,现在问题变成了了 50% 在 step 为 3 的时候到底该显示几

@@ -1415,7 +1415,7 @@ Array [
style="width:14px;height:8px"
/>
<div
class="ant-progress-steps-item"
class="ant-progress-steps-item ant-progress-steps-item-active"
Copy link
Member

Choose a reason for hiding this comment

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

你改的应该不影响 这个啊

Copy link
Contributor Author

@gaoryrt gaoryrt Dec 25, 2020

Choose a reason for hiding this comment

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

不改过不了测试啊,原来 50% 在 step 为 3 的时候显示一个,现在该显示俩了

@xrkffgg xrkffgg removed the Inactive label Dec 26, 2020
@afc163 afc163 merged commit d769795 into ant-design:master Dec 29, 2020
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.

4 participants