-
Notifications
You must be signed in to change notification settings - Fork 700
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
Improve inline previews for links and images #524
Conversation
@astorije: you asked how they looked before, there: |
client/css/style.css
Outdated
} | ||
|
||
#chat .toggle-content.show { | ||
display: inline-block !important; | ||
display: block !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're at it, did you look if it was possible/a good idea to get rid of the !important
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I tested this and it works just with without the !important
.
However, this rule is redundant with this Bootstrap one anyway so I think we should remove it.
👍 |
a7a0d64
to
e4ddc1b
Compare
@astorije: just fixed the images. As for the links overflowing, this is unfortunately not possible because of the table layout (which is why I didn't notice it at first, it works beautifully with my non-broken chat layout. Table cells aren't supposed to contain block elements in them) |
Huh, really? I still have this after pulling your branch and rebasing with master (and also when pulling your branch as is with
The second issue is pretty bad as content is missing, and does not exist in master. Maybe we should get #523 reviewed and merged first then? Too bad, this current PR seemed like a no-brainer at first 😞 (#523 is a bit harder to jump in). |
Marking this as |
@maxpoulin64, do you think we should close this in favor of #701? |
Okay, closing this for now since @MaxLeiter wants to work on #701 that supersedes it. If for some reason #701 cannot make it (but I hope it will!) then we can re-open this. |
I suggest reopening this since #701 isn't gonna happen anytime soon. I can try to revive it tomorrow |
e4ddc1b
to
6a273d8
Compare
So, I have revived this and while the first issue I mentioned in my earlier comment was fixed, the other 2 were not: It's not obvious but the first preview does not show ellipsis and goes behind the user list. You can tell with the lack of margin on the right. @maxpoulin64, I know you have been out of the game for a bit now, but since your flexbox layout got merged, I'm hoping you could help us with this pleeeease? It would be super sweet to merge this! :) |
Bootstrap was taking over these declarations because they use `!important`.
Also fix the preview description not respecting the ellipsis, and update the image size and margin to nicely align with text.
649c34e
to
dce42df
Compare
Alriiiight thanks to some efforts and help from @maxpoulin64, all issues are fixed, including 2 I discovered along the way, yay! 🎉 Who wants to test this? :) |
@@ -1,5 +1,5 @@ | |||
{{#toggle}} | |||
<div class="toggle-content"> | |||
<div class="toggle-content toggle-type-{{type}}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is necessary anymore @maxpoulin64, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be useful for themes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
@@ -1,5 +1,5 @@ | |||
{{#toggle}} | |||
<div class="toggle-content"> | |||
<div class="toggle-content toggle-type-{{type}}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be useful for themes.
} | ||
|
||
#chat .toggle-content .thumb { | ||
max-height: 110px; | ||
max-width: 210px; | ||
float: left; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried flex instead of float?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not. Floats are very much designed for this kind of usage, and it works just fine like this sooo I'm tempted to call it good enough and go on with my life :) (also it was like this initially, I did not try to be creative)
All I missing a clear issue that flexbox addresses here?
There are 2 types of previews: images & documents.
I am sure you mean well, but don't forget that this is an open source project: no one is working for money (it's 2:30am here as I type, and I spend time most nights on this), nor for you specifically. Also, don't forget that the coldness of the screen vs. live discussion can make it look like you feel entitled to a service and requests, and I have noticed people are less inclined to help in these situations. What you expose here is a personal opinion and as such unlikely to reflect in code changes. That PR was approved and desired by multiple people, and deemed the best approach UX-wise for a largest audience.
Makes sense? 😃 |
Definitely, but there are also other sites on the internet aside for GitHub.
By ruining a nice functionality? It's really simple: before this change I could use this preview to save time, now I can't.
Alright, it's 5:20 am here (don't break this combo now 😄), and it's the second night I spent improving this project. I'm not doing this just for you too 😸.
And how do we decide is it better or not? By making a poll? Anyway I plan to redesign this previews (a bit more in irccloud style) and I almost sure it will work well with #701 in future (no, I have no intention to help with it, sorry). |
@bews if you have a fix (or when you do), feel free to open a PR for discussion from other maintainers and users. @astorije meant this PR was merged with a fair amount of support, but that doesn't mean it's perfect. IIRC from IRC you have a large screen - maybe no one's tested on that yet and that's where all this confusion is coming from. And I disagree that most people believe it's a bug - otherwise there would be an open issue for it. |
Improve inline previews for links and images
This is a CSS mod I have had for a little while that improves the readability and space efficiency of the link and image previews, so I thought it would be time to finally share it.
For me, this makes it viable to have them all expand by default and you don't get extra huge images in your face all the time. You can see on the first screenshot I have hidden the toggle button entirely, as I don't feel like I need it anymore.