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

Do not truncate link previews if viewport can fit more text #1293

Merged
merged 1 commit into from
Jul 4, 2017

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Jul 3, 2017

Fixes #1084. float: left on the thumbnail image pushed text, but did not increase container width.

Before:
03-114187307

After:
03-114120932

@xPaw xPaw added the Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors. label Jul 3, 2017
@xPaw xPaw added this to the 2.3.3 milestone Jul 3, 2017
@astorije
Copy link
Member

astorije commented Jul 3, 2017

You had me super excited, but unfortunately it doesn't work correctly when reaching the end of the screen :(

screen shot 2017-07-03 at 11 00 39

^ No ellipsis + text on second line instead of next to thumbnail.

@xPaw
Copy link
Member Author

xPaw commented Jul 3, 2017

Damn it.

@xPaw xPaw force-pushed the xpaw/fix-preview-truncate branch 2 times, most recently from 635d934 to ff6b22d Compare July 3, 2017 17:16
@xPaw
Copy link
Member Author

xPaw commented Jul 3, 2017

@astorije fixed with flexbox.

@@ -1129,15 +1129,21 @@ kbd {
}

#chat .toggle-content .thumb {
float: left;
display: flex;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary at all?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How else would you do it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant, this would only apply to its children, which .thumb doesn't have any, no?

@@ -8,11 +8,15 @@
{{else}}
{{#if thumb}}
<img src="{{thumb}}" class="thumb">
<div class="toggle-text">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth rendering this div whether or not the thumb appears for consistency sake.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

@xPaw xPaw force-pushed the xpaw/fix-preview-truncate branch from ff6b22d to 40bd949 Compare July 4, 2017 06:24
@xPaw xPaw force-pushed the xpaw/fix-preview-truncate branch from 40bd949 to c62bc2f Compare July 4, 2017 06:51
Copy link
Member

@astorije astorije left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG this works so well, you are making me so super happy!

Using the examples given across the issues/PRs:

screen shot 2017-07-04 at 12 51 31

@astorije astorije merged commit 72ca990 into master Jul 4, 2017
@astorije astorije deleted the xpaw/fix-preview-truncate branch July 4, 2017 16:54
matburnham pushed a commit to matburnham/lounge that referenced this pull request Sep 6, 2017
…ncate

Do not truncate link previews if viewport can fit more text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants