-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
left_sidebar: Add option to hide summary unread counters. #29257
base: main
Are you sure you want to change the base?
Conversation
6c51305
to
520a6c7
Compare
520a6c7
to
6b855ed
Compare
@akarsh-jain-790 Has this PR been updated with the latest #design suggestions? If so, please update the screenshots in the PR description, and post a summary comment here about the PR's status. |
@alya Yeah, I have update the PR description and is now ready for the initial review. |
Things go wrong when views are collapsed: Please try to test your changes more thoroughly; https://zulip.readthedocs.io/en/latest/contributing/code-reviewing.html#manual-testing has some tips. |
f41b23d
to
c9bf798
Compare
@alya I have updated the PR and description, can you please re-review. |
const {instance} = event.data; | ||
const data = {}; | ||
const home_view_unread_msg_count = user_settings.web_left_sidebar_unreads_count_summary; | ||
data.web_left_sidebar_unreads_count_summary = JSON.stringify(!home_view_unread_msg_count); |
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 is a weird way to construct data
; and worse than the similar blocks just above; can you follow those better conventions?
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.
Thank you for your review. I appreciate your feedback. Regarding the construction of data
I took reference from a similar block below:
$popper.one("click", "#toggle_display_starred_msg_count", () => {
const data = {};
const starred_msg_counts = user_settings.starred_message_counts;
data.starred_message_counts = JSON.stringify(!starred_msg_counts);
channel.patch({
url: "/json/settings",
data,
});
instance.hide();
});
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.
Hmm, maybe the right plan is to refactor those as well; the ones above this seem more sensible.
display: none; | ||
} | ||
} | ||
} | ||
} |
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 CSS refactoring is quite hard to understand; can you use some preparatory commits with proper commit messages to explain it?
c9bf798
to
36de37b
Compare
52ddac4
to
c06bae5
Compare
c06bae5
to
2fbcdbf
Compare
2fbcdbf
to
576bb68
Compare
b61cc7b
to
ce6f2ff
Compare
@timabbott Thanks for the detailed feedback! I've addressed your comments and made the necessary updates to the PR. Let me know if you have any further suggestions. |
7fa7f61
to
6e1ff2e
Compare
@timabbott Marking for integration review, since you seem to be reviewing this one? Please feel free to re-delegate. |
6e1ff2e
to
10a439a
Compare
10a439a
to
cad1ceb
Compare
cad1ceb
to
b8deb19
Compare
This commit adds a user-configurable option to hide unread counters in the left sidebar. Users now have the flexibility to choose whether they want these counters displayed or hidden, reducing distraction for those who find them disruptive. Fixes: zulip#28759
Moved the CSS rules from .input-append related to hiding and showing unread counts into a common container style.
In this commit, the .hide-unread-count-summary class is introduced to manage the visibility of unread counts within the selected-home-view section of the left-sidebar-navigation-list.
b8deb19
to
df0cf4d
Compare
Adds a user-configurable option to hide unread counters in the left sidebar. Users now have the flexibility to choose whether they want these counters displayed or hidden, reducing distraction for those who find them disruptive.
Fixes: #28759
Screenshots and screen captures:
Show/Hide Unread Counter Option:
Added a "Show unread counter" / "Hide unread counter" option as the second item in the home view menu.
Preferences Setting:
Added a "Show unread message totals on home view and streams" checkbox under SETTINGS / PREFERENCES > Advanced, just below the "Show unread counts for" setting.
When "Show Unread Counter" is selected for "No streams":
more Screenshots
Unread counters will not be visible in the left sidebar for streams.When "Hide Unread Counter" is selected:
The counter will be displayed as a dot on both the home view and the STREAMS line.
The actual number will be revealed on hover.
Adjusted the logic to ensure consistency in displaying summary counters in the default left sidebar view and in "more topics"/"more conversations" views.
When "Show unread message totals on home view and streams" is enable:
More Conversations View:
More Topics View:
When "Show unread message totals on home view and streams" is not enable:
More Conversations View:
More Topics View:
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: