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

feat(DrawerList): add overflowingTextOptions for CSS hyphens, overflow-wrap, word-break, overflow #4480

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

langz
Copy link
Contributor

@langz langz commented Jan 21, 2025

Copy link

vercel bot commented Jan 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eufemia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 9:10pm

@langz langz requested a review from tujoworker January 21, 2025 10:26
Copy link

codesandbox-ci bot commented Jan 21, 2025

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.

@haigol
Copy link
Contributor

haigol commented Jan 21, 2025

Thanks for checking this out!

Thought it made sense for long words without spaces, as my use case needs, but seeing that it also breaks sentences that simply could span several lines makes me unsure 🤔 I like the idea of being able to send it as prop

@langz
Copy link
Contributor Author

langz commented Jan 21, 2025

Thanks for checking this out!

Thought it made sense for long words without spaces, as my use case needs, but seeing that it also breaks sentences that simply could span several lines makes me unsure 🤔 I like the idea of being able to send it as prop

I can make a new optional property called something like itemHyphenation, which will have the possible values from the hyphens CSS property https://developer.mozilla.org/en-US/docs/Web/CSS/hyphens, and will default to the value none if not specified.

Or maybe just hyphenation?

@haigol
Copy link
Contributor

haigol commented Jan 21, 2025

I think this sounds like a good idea!
optionHyphens optionItemsHyphenation? always tricky...

Thank you!

@langz langz force-pushed the feat/add-hyphens-auto-to-drawer-list-item branch from c1443d5 to 9e85134 Compare January 21, 2025 20:55
@langz langz changed the title feat(DrawerList): add hyphens when text wraps across multiple lines feat(DrawerList): add hyphenation property to support hyphens when text wraps across multiple lines Jan 21, 2025
@langz langz changed the title feat(DrawerList): add hyphenation property to support hyphens when text wraps across multiple lines feat(DrawerList): add hyphenation prop supporting hyphens when text wraps across multiple lines Jan 21, 2025
@langz langz force-pushed the feat/add-hyphens-auto-to-drawer-list-item branch from 3b68b6e to c86ee8e Compare January 22, 2025 10:04
@langz langz force-pushed the feat/add-hyphens-auto-to-drawer-list-item branch 2 times, most recently from 9a55c2b to d2a1a1b Compare January 22, 2025 11:08
@langz langz force-pushed the feat/add-hyphens-auto-to-drawer-list-item branch from d2a1a1b to d9560d3 Compare January 22, 2025 11:43
@langz langz changed the title feat(DrawerList): add hyphenation prop supporting hyphens when text wraps across multiple lines feat(DrawerList): add hyphenation supporting hyphens when text wraps across multiple lines Jan 22, 2025
@langz langz force-pushed the feat/add-hyphens-auto-to-drawer-list-item branch from d9560d3 to 8b3022f Compare January 22, 2025 12:07
@langz langz changed the title feat(DrawerList): add hyphenation supporting hyphens when text wraps across multiple lines feat(DrawerList): add hyphenation supporting hyphens when item text wraps across multiple lines Jan 22, 2025
@langz langz changed the title feat(DrawerList): add hyphenation supporting hyphens when item text wraps across multiple lines feat(DrawerList): add overflowingTextOptions for CSS hyphens, overflow-wrap, word-break, overflow Jan 23, 2025
@langz langz changed the title feat(DrawerList): add overflowingTextOptions for CSS hyphens, overflow-wrap, word-break, overflow feat(DrawerList): add overflowingTextOptions for CSS hyphens, overflow-wrap, word-break, overflow Jan 23, 2025
@langz
Copy link
Contributor Author

langz commented Jan 23, 2025

In the latest commit, I've renamed from hyphenation to overflowingTextOptions which is an object, where you can set the following CSS properties:

  • overflow
  • overflow-wrap by setting overflowWrap
  • word-break by setting wordBreak
  • hyphens

FYI @tujoworker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants