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: fix the ellipsis bug for pre element #48968

Closed
wants to merge 22 commits into from

Conversation

nova1751
Copy link
Contributor

@nova1751 nova1751 commented May 18, 2024

中文版模板 / 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 #48953

💡 Background and solution

The css property white-space: normal will cause the \n to not work in pre tag when the text is used as MeasureText. Removing it may be a good solution.🤔

📝 Changelog

Language Changelog
🇺🇸 English Fix the bug where the ellipsis option of Typography component doesn't work normally in pre tag
🇨🇳 Chinese 修复 Typography 组件的 ellipsis选项在 pre 标签中没有正常工作的问题

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

Copy link

stackblitz bot commented May 18, 2024

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

Copy link
Contributor

github-actions bot commented May 18, 2024

👁 Visual Regression Report for PR #48968 Failed ❌

🎯 Target branch: master (9d13485)
📖 View Full Report ↗︎

Expected (Branch master) Actual (Current PR) Diff
typography-ellipsis-debug.compact.png typography-ellipsis-debug.compact.png typography-ellipsis-debug.compact.png typography-ellipsis-debug.compact.png
typography-ellipsis-debug.compact.png typography-ellipsis-debug.compact.png typography-ellipsis-debug.compact.css-var.png typography-ellipsis-debug.compact.css-var.png
typography-ellipsis-debug.dark.png typography-ellipsis-debug.dark.png typography-ellipsis-debug.dark.png typography-ellipsis-debug.dark.png
typography-ellipsis-debug.dark.png typography-ellipsis-debug.dark.png typography-ellipsis-debug.dark.css-var.png typography-ellipsis-debug.dark.css-var.png
typography-ellipsis-debug.default.png typography-ellipsis-debug.default.png typography-ellipsis-debug.default.png typography-ellipsis-debug.default.png
typography-ellipsis-debug.default.png typography-ellipsis-debug.default.png typography-ellipsis-debug.default.css-var.png typography-ellipsis-debug.default.css-var.png
typography-ellipsis-middle.compact.png typography-ellipsis-middle.compact.png typography-ellipsis-middle.compact.png typography-ellipsis-middle.compact.png
typography-ellipsis-middle.compact.png typography-ellipsis-middle.compact.png typography-ellipsis-middle.compact.css-var.png typography-ellipsis-middle.compact.css-var.png
typography-ellipsis-middle.dark.png typography-ellipsis-middle.dark.png typography-ellipsis-middle.dark.png typography-ellipsis-middle.dark.png
typography-ellipsis-middle.dark.png typography-ellipsis-middle.dark.png typography-ellipsis-middle.dark.css-var.png typography-ellipsis-middle.dark.css-var.png

Check Full Report for details


If you think the visual diff is acceptable, please check:

  • Visual diff is acceptable

Copy link
Contributor

github-actions bot commented May 18, 2024

Preview is ready

Copy link

codesandbox-ci bot commented May 18, 2024

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.

Copy link

codecov bot commented May 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2e011a3) to head (2d0f507).
Report is 15 commits behind head on master.

Current head 2d0f507 differs from pull request most recent head b1ee035

Please upload reports for the commit b1ee035 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #48968   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          745       745           
  Lines        12976     12976           
  Branches      3400      3400           
=========================================
  Hits         12976     12976           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nova1751
Copy link
Contributor Author

After fixed:

Typography.-.Ant.Design.2.-.-.Microsoft.Edge.2024-05-19.01-01-32.mp4

@nova1751
Copy link
Contributor Author

Any progress in this PR? @zombieJ @afc163

@zombieJ zombieJ self-requested a review May 27, 2024 09:17
@zombieJ zombieJ self-assigned this May 31, 2024
@zombieJ
Copy link
Member

zombieJ commented May 31, 2024

This broken the debug demo:
截屏2024-05-31 10 43 16

zombieJ and others added 16 commits May 31, 2024 11:20
* fix: fix Checkbox.Group type

* fix: fix Checkbox.Group type

* fix: fix Checkbox.Group type

* fix: remove type

* fix: any
* docs: 5.17.4 changelog

* docs: more
Co-authored-by: liangchaofei <liangchaofei@liangchaofeideMacBook-Pro.local>
* docs: add getValueProps demo

* feat: normalize

* feat: normalize

* feat: name

* feat: name

* feat: doc

* feat: date

* feat: tz

* feat: tz
* docs(FAQ): Remove expired links

* chore: adjusting update

* chore: adjusting update
Signed-off-by: JeevaRamanathan <64531160+JeevaRamanathan@users.noreply.github.com>
Co-authored-by: afc163 <507615+afc163@users.noreply.github.com>
* fix: Tour onClose wrong current argument

* test: add test case

* Update components/tour/panelRender.tsx

Signed-off-by: afc163 <afc163@gmail.com>

---------

Signed-off-by: afc163 <afc163@gmail.com>
* chore: rollback ci

* test: one day
Co-authored-by: 吴必炫 <wubixuan@rlink.com>
…0.0 (ant-design#49142)

Bumps [@types/react-highlight-words](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-highlight-words) from 0.16.7 to 0.20.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-highlight-words)

---
updated-dependencies:
- dependency-name: "@types/react-highlight-words"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
coding-ice and others added 2 commits May 31, 2024 13:18
* Update index.zh-CN.md

Signed-off-by: LemonTency <120943952@qq.com>

* Update index.zh-CN.md

Signed-off-by: LemonTency <120943952@qq.com>

---------

Signed-off-by: LemonTency <120943952@qq.com>
Copy link
Contributor

Hi @nova1751. Thanks for your contribution. The path .github/ or scripts/ and CHANGELOG is only maintained by team members. This current PR will be closed and team members will help on this.

@nova1751
Copy link
Contributor Author

Oops, I rebase the master branch, which cause the PR to be closed forcely. ☹️

@zombieJ
Copy link
Member

zombieJ commented Jun 3, 2024

Seems the branch has been removed? I can not reopen the PR.

@nova1751
Copy link
Contributor Author

nova1751 commented Jun 3, 2024

Seems the branch has been removed? I can not reopen the PR.

Sorry for the misoperation, I opened a new one. See #49168.

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.

Typography.Paragraph ellipsis is not expandable if used inside <pre> for multiline text