-
Notifications
You must be signed in to change notification settings - Fork 687
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
A proper unread marker #332
Conversation
Looks good to me. My only comment is that I think the unread bar could be a bit more subtle and thicker. I liked the one from #169 better for that, because it doesn't constantly grab your attention. Also probably should have one per theme. I'm going to guess yours is based on morning considering the blue color :) |
I didn't really mess with the styling just yet, I wanted to get a working prototype out. I still don't know how to deal with unread marker not showing up for hidden messages (joins etc). |
Regarding hidden messages: Using :after for the implementation is something that I like and I think is rather elegant. Unfortunately it's probably not directly possible with hidden elements. (http://stackoverflow.com/questions/14049423/in-css-use-displaynone-on-the-element-but-keep-its-after) If a pseudo element is required I would suggest hiding child elements with something like this: Just my 2 cents. And thanks for all the work you guys have put in to this project, love it! 👍 |
Your |
I tried using |
f221212
to
414d803
Compare
I've updated the PR to create a separate marker line in DOM, the solution ends up being cleaner over all using this method. |
if (data.firstUnread > 0) { | ||
var first = $("#msg-" + data.firstUnread); | ||
|
||
// TODO: If the message is far off in the history, we still need to append the marker into DOM |
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.
Is this TODO still relevant? Seems you do append the marker (well, prepend) to the DOM? I think you just need to move it to the right place in the on("more",
handler right?
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.
Yes it's still relevant. To move it on more
handler, firstUnread needs to be persisted then, the unread marker has to remain in DOM and hidden. But as we consider channel read as soon as we open it (not when we load the unread message), this becomes slightly more trickier.
Okay, been using it for the day. Just dumping some notes for now, I will truely investigate later probably tomorrow.
|
|
@williamboman Are you hiding joins or anything like that? I assume that would break the |
Yeah I hide join/parts etc.
|
Yep, I can confirm both issues are fixed. I think the only issue left with this is the hiding of joins and parts. I honestly have no idea how this one can be fixed short of tracking the visibility state in JS :/ |
There's still an annoyance with it. When you open a channel and write a message, it shows the unread marker above your message. This isn't exactly the desired behaviour. Also, the line is quite an eyesore, need to design something for each theme that doesn't look ass. |
More fixes!
I think this is stable enough to make it into 2.0. /cc @thelounge/maintainers |
Seems much smoother now, nice. One thing, when joining a channel with a lot of unread messages the marker is (naturally) placed at the top, but when loading more messages it stays on-top of the previously top-most message. edit: The issue with it being displayed at the bottom still remains though |
@williamboman It's mentioned in the OP, and it's not entirely easy to solve due to new bugs it can introduce. |
@astorije What I mean is, the messages are going to have to move down when the unread marker is moved down, to compensate for lost space. If you want to tweak styles, feel free to commit it yourself. |
7e26d68
to
a8d647a
Compare
I see now, and I got to play with it when there is said padding/margin, it didn't shock me. Yes, messages are moved a tiny bit, but I don't see that as an issue.
I did actually, in a separate commit. I'm pretty happy of the result: it's eye-catchy so you can't miss it, and yet it integrates with the current design (designs actually, tweaked per theme to look even better). Here are the results:
I got inspired from a few apps out there, that got me into specifying the "New messages" text. A few thing:
I hope you'll like it 😄 |
a8d647a
to
80419cb
Compare
At first glance, it does seem much better than the default colour. I've even removed my colour override, and it seems much more obvious. I'll keep this on for hte day and see how it works. It does seem to have a lot more space around it, and I'm not sure how I feel about that. We'll see how it goes over the day. But absolutely a much better colour (on zenburn). |
e595ea2
to
3c3736f
Compare
Just to put it here, there was a slight issue with @astorije's changes. If someone had a very long name and you are using zenburn, you would get some really weird formatting issues because the name field was different lengths at different points. It has now been fixed. |
Also, it was mentioned on the irc that it might be nice to have the unread marker only disappear on channel change, because the jumping when you send a message is a bit odd. I am not decided what I think about this, yet. I'm kinda of the opinion that it might be better to do that. What do others think? |
I think the way the messages jumps when removing the unread marker is bad UX, so I'm def in favor of this. |
fcf3ca5
to
221e0d6
Compare
221e0d6
to
3cddbbc
Compare
To illustrate what I'm used to as far as unread marker behavior goes, I'll point at Textual. It does the following:
I don't think removing the unread marker when the user sends a message looks good. Textual provides a keyboard shortcut and menu option to move the marker to the current position, but that might not be practical/necessary for The Lounge to implement. As much as possible, I think the marker should move while the channel is not visible, to avoid sudden changes in the positions of lines. |
Thanks for the feedback, @dgw, that's helpful!
How is that bad UX?! Debatable UI, maybe, improvable feature, for sure, but bad UX, definitely not. The alternative offered here means that when sending a message, therefore acknowledging unread messages, the unread messages marker stays, losing its meaning. Assigning different behavior to a component than what it actually is, that becomes bad UX. That being said, I'm not saying the current behavior/UI/whatever is final, but thousand times better than nothing. As a matter of fact, I can find at least 4 minor things that need improvement. And that's key, here, I think: the feature works very well as is, and apart from the issues reported by @YaManicKill, others are nitpickings that can be resolved later. Well, I know I'll be opening issues on the things that bug me, at least :-) So, in a nutshell, @YaManicKill, @maxpoulin64, are you still 👍 on this, as a very decent first version? |
I meant that the unread marker disappearing itself is not bad UX, but the way an entire chunk of messages repositions themselves while doing so. Creates a momentary disconnect with the content of the chat. |
A proper unread marker
This re-adds the table layout in CSS removed in 3cddbbc, thelounge#332.
This PR has two issues:
This PR however has proper server state tracking, so the marker isn't lost between page loads.