Closed hoorayimhelping closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
click-ui | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 12, 2024 4:44pm |
@hoorayimhelping I don't think we should allow the Ludicrously long content example, perhaps we can add a limit? 64 chars?
@hoorayimhelping Maybe a maxChars
prop?
@gjones this would allow us to make the service selector wider as well
@gjones I set the max-width
to 64ch
and replaced the outdated screenshots. What do you think?
@hoorayimhelping Yeah I think that's a good default limit, (I still think a prop to override it would provide really useful flexibility though)
@gjones alright, I'll add that limit as a prop (was hoping I could be lazy, but alas 😉)
ha ha, sorry 😄
@gjones alright, added itemCharacterLimit
and a couple more screenshots showing it in use. What do you think?
I looked into writing unit tests for this logic, but it's not possible (or is very difficult and brittle) to test text truncation using react-testing-library
Helps with https://github.com/ClickHouse/control-plane/issues/10057
useFullWidthItems
toSelect
props64ch
, which is approximately 64 charactersitemCharacterLimit
which is only applied whenuseFullWidtthItems
to allow overriding the default max widtth of64ch
Example from the Database selector in Sql Console
Reasonable length content
Very long content
Ludicrously long content (clipped at 64 characters)
Minimum width of the dropdown selector
itemCharacterLimit="32ch"
itemCharacterLimit="200ch" (can break things if not careful)