You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
What might work better is not use a table, but simulate it by having 4 columns that get filled with the items. Then they can be easier collapsed/resized with flexbox.
If there is a long word, it might could get truncated programmatically. And not at the end, but in the middle. That would have the benefit that you could see the end of long words that start the same.
// instead of
veryVeryVeryVeryVeryVeryVeryVery...
veryVeryVeryVeryVeryVeryVeryVery...
// truncate in the middle
veryVeryVeryVe...eryVeryLongWord1
veryVeryVeryVe...eryVeryLongWord2
@benogle With this change, is there any way to see the untruncated strings? (ie. by hovering with the mouse, selecting with the keyboard, and showing a tooltip or something)
The nice thing would be that if everything is too long, it favors the "word" column and gives it more space (1 + 3). But if the words are all short and the labels long (2 + 4), then it doesn't truncate the labels and shows them in full.
But it requires a lot of changes, so maybe for now we can keep as is and look into it at a later point again.
But it requires a lot of changes, so maybe for now we can keep as is and look into it at a later point again.
Can you rough out a list of the changes required? I'm not averse to tackling this, but need someone like you who actually knows their way around the DOM and CSS to make it happen.
So a "line" would be split up and put into the 4 horizontal containers. I guess the whole template, JS and specs would need to change.. so not sure. Maybe it's better to not hold up the integration into core with this, and we can look at it again later.
Activity
benogle commentedon Apr 20, 2015
What theme are you using?
Qusic commentedon Apr 20, 2015
I tried One Dark, One Light, Atom Dark, Atom Light.
Qusic commentedon Apr 20, 2015
Sorry. I don't realize the UI Theme option and just changed the Syntax Theme.
The problem is gone with another UI Theme. The culprit theme is Unity.
[-]broken popover style[/-][+]Suggestion List Styling Issues With Some Themes[/+][-]Suggestion List Styling Issues With Some Themes[/-][+]Suggestion List Styling Issues[/+]ctolkien commentedon Apr 23, 2015
Typescript and C# packages also impacted:
Issue is when we have max-width and an element overflows.
Here's a codepen demonstrating the issue:
http://codepen.io/anon/pen/BNaGwN
simurai commentedon May 8, 2015
Tried to look into this and it's pretty tricky.
Fixed width
Branch: https://github.com/simurai/autocomplete-plus/tree/sm-overflow-flexbox
Changed from
floattoflexboxandtable-layout: fixed. Works with truncating, but it always stays at the max-width:Overflow scroll
Branch: https://github.com/simurai/autocomplete-plus/tree/sm-overflow-scrolling
Another option would be to not use
table-layout: fixedso it takes up the width of the content, just prevent wrapping. When it overflows you have to scroll to see the right labels:Colums
What might work better is not use a table, but simulate it by having 4 columns that get filled with the items. Then they can be easier collapsed/resized with flexbox.
Programmatic truncation
If there is a long word, it might could get truncated programmatically. And not at the end, but in the middle. That would have the benefit that you could see the end of long words that start the same.
benogle commentedon May 8, 2015
Now it truncates let label, word, and right label based on a max width for each:
benogle commentedon May 8, 2015
This would be cool. Though, I like the simplicity of the CSS approach.
mnquintana commentedon May 8, 2015
@benogle With this change, is there any way to see the untruncated strings? (ie. by hovering with the mouse, selecting with the keyboard, and showing a tooltip or something)
benogle commentedon May 8, 2015
Not at this time, but definitely willing to do that
simurai commentedon May 9, 2015
👍
I tried out the flexbox Colums in this CodePen
The nice thing would be that if everything is too long, it favors the "word" column and gives it more space (1 + 3). But if the words are all short and the labels long (2 + 4), then it doesn't truncate the labels and shows them in full.
But it requires a lot of changes, so maybe for now we can keep as is and look into it at a later point again.
joefitzgerald commentedon May 9, 2015
Can you rough out a list of the changes required? I'm not averse to tackling this, but need someone like you who actually knows their way around the DOM and CSS to make it happen.
benogle commentedon May 11, 2015
Nice @simurai Looks like a better, more elegant solution than mine.
simurai commentedon May 12, 2015
Well, it's just an "out of context" demo.. there might still be issues once it would be in Atom.
The main difference is that instead of vertical rows with items,
there would be horizontal columns with items:
So a "line" would be split up and put into the 4 horizontal containers. I guess the whole template, JS and specs would need to change.. so not sure. Maybe it's better to not hold up the integration into core with this, and we can look at it again later.
Set max width of each individual span