-
-
Notifications
You must be signed in to change notification settings - Fork 278
Displays unread message counts of muted streams and topics. #802
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
base: main
Are you sure you want to change the base?
Conversation
@neiljp Can you review this PR |
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.
@manojkestur Hey! Thanks for taking an interest in the project!
You're addressing part of quite an old issue, so the scope of what to do is perhaps less clear than it was, making this more challenging than it might be!
Your git commit text matches our current style 👍 However, it would be useful to separate each change to the muted stream/topic text and counts (UI) into separate commits, and definitely keep that work separate from any change to the logic. That will aid in assessing which of these aspects to go forward with, and understanding more clearly what changes you're making in each case.
I've tried the PR:
- This is how I noticed the varying unread counts values; having it in a separate commit it might be clearer what is intended there
- Indicating the muted elements with the text styling is definitely an improvement 👍 Though, I think it might need tuning in some themes since we likely want to have the text faded slightly, but not as unreadable as it seems in eg. the light theme?
- I'm less clear on just showing the counts of muted streams, as it looks like they are contributing towards the unread totals being in the same style. I know this was suggested in the original issue, so we should discuss that - we could style the muted counts differently, or maybe use a different character than
M
? I'm not personally completely convinced it's important to show a count when it's muted though.
I'm going to start a conversation at chat.zulip.org in #zulip-terminal regarding this - you're welcome to join in and comment :)
zulipterminal/config/themes.py
Outdated
('muted_stream', 'light gray', 'black', | ||
None, DEF['light_gray'], DEF['black']), |
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.
Please align these so they look like the surrounding layout - similarly in the other locations you added.
zulipterminal/helper.py
Outdated
stream_topic = (stream_id, stream['topic']) | ||
unread_counts['unread_topics'][stream_topic] = count | ||
if not unread_counts['streams'].get(stream_id): | ||
unread_counts['streams'][stream_id] = count | ||
else: | ||
unread_counts['streams'][stream_id] += count | ||
if stream_id not in model.muted_streams: | ||
if stream_id not in model.muted_streams and not topic_muted: |
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.
This and the other associated changes (in this file and elsewhere) appear to be a separate bugfix - is that correct? If so, it would be good to place these changes in a separate commit.
If this is intended as a bugfix, I'm a little concerned this correct, since the unread counts appear very different to running the current git version.
zulipterminal/config/themes.py
Outdated
@@ -242,6 +245,8 @@ | |||
None, YELLOW, BLACK), | |||
('edit_time', 'light blue', 'black', | |||
None, LIGHTBLUE, BLACK), | |||
('muted_stream', 'yellow', 'black', |
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.
You're applying this to both streams and topics, and specifically only the text names, so it'd be good to use a more general name - perhaps muted_name
?
@neiljp Thanks for the review. I will make the suggested changes. |
I have to do 2 separate commits for dimming muted streams and displaying counts right? |
@manojkestur That would be preferable, as we can always then pick just one commit to apply easily, separate from the other. If commits are earlier in a branch then they are less likely to have dependencies upon your other commits and easier to 'cherry pick' separately. |
3bddcf9
to
c34a72d
Compare
558b460
to
5692847
Compare
@manojkestur I'm not sure if you're ready for a review of this yet, but from a quick scan I can see you have a few unrelated changes in commits, and you replaced the Re the mute symbol, it looks a little strange here, particularly with a smaller font, though I've not found a better unicode symbol. Did you look at many? Are you available to discuss on chat.zulip.org some time? |
@neiljp I thought only dimming of muted streams and topic without M was needed. Now i will change that to M. |
78475a4
to
83bf54b
Compare
9ed95ef
to
78f9e5d
Compare
@neiljp I have done the suggested changes.Let me know if any changes required. |
9d977d6
to
68b0b52
Compare
68b0b52
to
9005f9d
Compare
70bb31e
to
cab45e9
Compare
cab45e9
to
e64c216
Compare
@neiljp I have resolved the conflicts and have done the required changes. |
@manojkestur Thanks for rebasing and updating the last commit 👍 I do like the possibility of this remaining change, though as I indicated when we discussed it in the stream, I also like the idea of not being distracted by whatever the counts are in those muted streams. Having the option of being like the webapp does appear useful in any case, though I've started a discussion in #general to better understand the motivation in the webapp. This commit does seem to render OK at first glance, but doesn't respond to muting events properly? I also don't understand at first reading why you are adjusting the helper code. The internal data should be being updated properly, but please let us know if you've found a bug in the logic there - though we should keep that different from changing how the UI is styled. The key methods - at least for streams - are |
e64c216
to
5ee9755
Compare
5ee9755
to
a2621db
Compare
@neiljp I have checked the muted events multiple times it is working fine. |
Heads up @manojkestur, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the |
This PR displays unread message count of muted streams and topics.
Names of muted streams and topics are displayed in a different color instead of 'M'.
Fixes #209