-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Add setting to only show private messages and mentions in title bar/desktop application unread count. #12677
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
Conversation
76221f7
to
791b0f7
Compare
@davidtwco awesome, thanks for implementing this! I posted some small code-level comments above. I think the main thing I want changed is the string describing it; "unread counts" might be expected to refer to the left sidebar, and the current text is ambiguous about whether it does that. @rishig do you have any ideas for how to thread that needle? I think it'll be easier to explain with a dropdown of options (also convenient for future expansion of options) rather than a checkbox. Maybe something like this???
|
791b0f7
to
984fc4d
Compare
dde53ca
to
e885731
Compare
@timabbott @rishig is there anything I can do to move this along? |
@davidtwco I'm mainly waiting on feedback from @rishig on the wording stuff (also both of us were on vacation for the July 4 holiday weekend here in the USA). |
I think long and even medium term we'll want this to join visual, audible, mobile, and email notifications as a fifth column in the notification-preferences matrix. Besides general coherence, that would allow things like "pinned streams, topics I follow, and mentions are included". In the short term I guess this is fine, assuming the code is structured in a way where that transition will be easy. Suggested wording:
Where the |
This PR is probably 5% of the work of the long-term idea you describe, and I don't expect migrating to be a problem if/when we do that column approach, so we certainly shouldn't block this on that sort of thing. (Even just adding the logic to calculate things correctly as a 5th column would be a big project at the scale of the left sidebar unreads view project) |
@rishig for this:
I think it still makes sense to put this under the "Desktop" heading; I interpret that block as being about "Desktop/Web specific" notification settings, not "desktop notifications" specifically. Which makes sense, because the sound setting isn't a "desktop notification" in our categorization anyway. So that's why I was thinking this belongs in the "Desktop" group. |
cool, sounds good. And yeah, that logic makes sense for putting it under Desktop. |
e885731
to
e5eb66e
Compare
I've changed the dropdown as per your wording in this comment, except i have not included "and alerts" because this PR doesn't include those - I wasn't able to find any existing infrastructure to get an unread alert count. |
e5eb66e
to
6ffa300
Compare
@davidtwco this looks great. I pushed an additional (totally untested) code cleanup commit to this PR; can you review and re-test with that change? Once we've confirmed I didn't break anything, we can merge. |
This commit adds a new setting to the user's notification settings that will change the behaviour of the unread count in the title bar and desktop application. When enabled, the title bar will show the count of unread private messages and mentions. When disabled, the title bar will act as before, showing the total number of unread messages. Fixes zulip#1736.
Having a single copy of this logic will make it easier to ensure it stays correct over time.
6ffa300
to
b60bea0
Compare
@timabbott I've rebased this (so that database migrations aren't conflicting) and fixed any issues. |
Heads up @davidtwco, 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 |
Squashed the fixup commit in and merged, thanks @davidtwco! @akashnimare FYI -- you can close the similar issues for the desktop app since this is now implemented in the webapp. |
As a sidenote, thanks so much for implementing this @davidtwco! It's not often we get to close an issue number below 2000 :). |
Awesome, @davidtwco thanks for working on this. |
Maybe a little tweak would be (now you can get the count of private/mentions) to show a red dot in the tray icon when you have private msgs/mentions, this way, even if you show the count for all messages, you know someone explicitly addressed you. Thanks to Slack for showing us how useful that is ;-) |
@ewoutkramer we already show this on macOS. Gotta find a way to show the same on Windows. Can you attach a screenshot of how it looks on Slack? |
@ewoutkramer great and how does it look like in Slack? |
This PR adds a new setting to the user's notification settings that
will change the behaviour of the unread count in the title bar and
desktop application.
When enabled, the title bar will show the count of unread private messages
and mentions. When disabled, the title bar will act as before, showing
the total number of unread messages.
Testing Plan:
I've added a backend test. As there were no existing tests that checked the title
bar, I wasn't sure where or how best to do a frontend test, so at the time of
submitting this PR, there isn't one.
GIFs or Screenshots:
