Closed asutula closed 7 months ago
This PR is being deployed to Railway 🚅
web: ◻️ REMOVED
Doesn't look like this fixes the issue
Also, it feels confusing that there is a dash in the name, but the dash character is not allowed in tablenames.
Yea @joewagner that's why I was saying the fix isn't ideal. It's better than before, but still work to do. I'd say we should go with the incremental improvement for now and keep thinking/working on it. Someone with more css skills than me can dive in.
Oh, just to clarify, the -
is used to break the line, but the tooltip shows the accurate table name.
Oh, just to clarify, the
-
is used to break the line, but the tooltip shows the accurate table name.
The tooltip works great, definitely a good addition. If I directly copy and paste the name the hyphen is magically removed. Not sure how that works, but it feels like unexpected behavior. As far as css, what about using overflow hidden for the card boundary and breaking with an ellipsis, a hard break, or no break and just let it be hidden? CSS can also shrink the text to fit the card, but that ususally ends up looking unaesthetic.
I realize this is a nit, but it bugs me to look at the text overflowing...
Yea @joewagner that's why I was saying the fix isn't ideal. It's better than before, but still work to do. I'd say we should go with the incremental improvement for now and keep thinking/working on it. Someone with more css skills than me can dive in.
This should just require one or two added classes, I'm happy to implement whatever we decide looks and works best.
@joewagner I tried all the css fixes you mentioned, but they don't work because it is a single word and there are no white spaces to break on. Also, wrapping the text in the tooltip complicates things because it is implemented with a <button>
element that wraps the text. For sure there is some permutation of css I missed, and I'm no expert, though. You are welcome to give it a try.
The tooltip text is set as a prop on the component with the actual table name, that's why it doesn't display the -
.
@joewagner I tried all the css fixes you mentioned, but they don't work because it is a single word and there are no white spaces to break on. Also, wrapping the text in the tooltip complicates things because it is implemented with a
<button>
element that wraps the text. For sure there is some permutation of css I missed, and I'm no expert, though. You are welcome to give it a try.
I think I know how to accomplish all the stuff I mentioned, but I can work on that separately and we can call this good for now.
Now our use of cards is consistent everywhere. This results in fixing the display issue with long table names in the card. The fix is pretty good, but still not ideal. It's a tricky one. The solution in
MetricCard
useshyphen-auto
combined with a tooltip: