DRAFT: fix(NcRichText): don't hide descriptions < 450px#8545
Conversation
Signed-off-by: Tyler Hawkins <3319104+tyzbit@users.noreply.github.com>
ac3e81f to
95d5dea
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8545 +/- ##
==========================================
+ Coverage 54.60% 54.63% +0.03%
==========================================
Files 106 106
Lines 3443 3441 -2
Branches 1005 1004 -1
==========================================
Hits 1880 1880
+ Misses 1322 1321 -1
+ Partials 241 240 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi Tyler, and my special greetings to a Vivaldi user. Thanks for your contribution. Though this change fixes the problem for Talk, it does so by removing a feature rather than the root cause. We definitely can improve the reference widget rendering, for example:
But the problem comes from the width determination here... In Talk, the bubble message tries to be as small as possible ( When there is an image OR the link is long, initial width is wide enough to stretch the bubble. Widget is wide and it renders the long description. When there is no image, it fits the narrow bubble. It stays narrow, and widget content tries to fit in. Narrow message bubble --> narrow widget block --> minimal fitting content Instead of fitting into a narrow bubble, the widget should have stretched it. IMO, we may have to solutions here:
|
|
@Antreesy What do you think? |
|
@ShGKme Thank you for taking the time to provide that informed analysis and info. I have converted this PR to a draft since more discussion will probably produce a better fix. I like the solutions you proposed. I would like to ponder if they would behave in the best manner in these scenarios:
|
This change works for me to allow take the space without an image and keep an ellipsis: &--details {
- width: 60%;
+ width: 0;
+ flex-grow: 1;
}
If we're working with hardcoded values, I would just decrease the lower border. 250px is approx. the width of the widget in the Talk during the call (in the narrow chat in sidebar) - const lineCountOffsets = [450, 550, 650, Infinity]
+ const lineCountOffsets = [250, 550, 650, Infinity]With no image and no 60% limit there's plenty space to render a description. Even with a small thumbnail, something still fits Another thing I discovered, that there is a
Talk is limit max width to ~80-90%. But I wouldn't span a widget at all. |

☑️ Resolves
🖼️ Screenshots
🚧 Tasks
🏁 Checklist
stable8for maintained Vue 2 version or not applicable