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: text wrapping boundary cases #1879

Merged
merged 2 commits into from
Dec 26, 2024
Merged

fix: text wrapping boundary cases #1879

merged 2 commits into from
Dec 26, 2024

Conversation

wang1212
Copy link
Member

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / Document optimization
  • TypeScript definition update
  • Refactoring
  • Performance improvement
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#1876

💡 Background and solution

#1876

📝 Changelog

Language Changelog
🇺🇸 English fix: text wrapping boundary cases
🇨🇳 Chinese fix: 文本换行边界条件

☑️ Self Check before Merge

  • 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

Walkthrough

This pull request addresses a bug fix related to text wrapping boundary cases. The changes ensure that text does not overflow by default and corrects the logic for appending ellipses and calculating character indices when text exceeds the width threshold.

Changes

Files Summary
.changeset/ten-impalas-type.md Added a changeset file to document the patch for text wrapping boundary cases.
packages/g-lite/src/services/TextService.ts Adjusted logic to prevent text overflow and correct character index handling when appending ellipses. Added a console log for debugging font settings.

@wang1212 wang1212 merged commit d5e7a9f into release Dec 26, 2024
2 checks passed
@wang1212 wang1212 deleted the fix-1833 branch December 26, 2024 12:52
wang1212 added a commit that referenced this pull request Dec 26, 2024
* fix: text wrapping boundary cases (#1879)

* fix: text wrapping boundary cases

* chore: remove log

* Version Packages (#1880)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

2 participants