Skip to content
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

Add an "Unsubscribed" streams tab #21869

Open
2 tasks
alya opened this issue Apr 20, 2022 · 6 comments · May be fixed by #26049 or #30021
Open
2 tasks

Add an "Unsubscribed" streams tab #21869

alya opened this issue Apr 20, 2022 · 6 comments · May be fixed by #26049 or #30021

Comments

@alya
Copy link
Contributor

alya commented Apr 20, 2022

When browsing streams to potentially subscribe to, it would be helpful to just view streams to which you're not currently subscribed. We should:

  • Add an "Unsubscribed" tab to the streams UI.
  • Direct the "Browse streams" and "Subscribe to more streams" links in the left sidebar to that tab.

Notes:

  • If the user is subscribed to all streams they can view, we should show a "No streams to show. View all streams" message. (We can play with the wording.)
  • For guest users, this new tab should be disabled whenever the "All streams" tab is disabled.
@zulipbot
Copy link
Member

Hello @zulip/server-streams members, this issue was labeled with the "area: stream settings" label, so you may want to check it out!

@yashd26
Copy link
Collaborator

yashd26 commented Apr 21, 2022

That looks like a useful addition. I do sometimes feel the need to browse through all unsubscribed streams (when I don't have any specific filters) so that I can subscribe to any, if I want to. I think I will be working on this. We can work on any additions that will later be provided in the feedback.

@yashd26
Copy link
Collaborator

yashd26 commented Apr 22, 2022

Hey @alya, I have implemented the things that you have listed in the issue for now. I have also created a thread in the CZO for this. Also I am little confused about the order of the tabs in stream settings.

Uploading a gif describing the working of the unsubscribed tab:
23 04 2022_21 32 49_REC

@alya
Copy link
Contributor Author

alya commented Apr 22, 2022

Cool, thanks! Please post a PR when ready.

Let's try putting "Unsubscribed" on the right; I think that will work best.

@yashd26
Copy link
Collaborator

yashd26 commented Apr 23, 2022

Done! I have pushed the PR. There are still some node tests that have to be done but I think you can test the working for now.

yashd26 added a commit to yashd26/zulip that referenced this issue Jul 2, 2022
In stream-list, when there is no streams to show (In case of
`Subscribed` or `Not subscribed` tabs), the user will be presented with
a text message `No streams to show` and a link that redirects the user
to `All streams(#streams/all)` tab.

Fixes: zulip#21869
palashb01 added a commit to palashb01/zulip that referenced this issue Jun 17, 2023
This commit adds a new tab to the stream settings overlay called
"Not subscribed" which lists all the streams the user is not
subscribed to. This tab is disabled if the user is a guest.

Introduced a new variable called "not-subscribed" to replicate
a similar model to how the subscribed tab is working. Currently,
there are only two tabs: "subscribed" and "all streams" so we can
use an if-else condition. However, introducing a new tab requires
more conditions to check, so I replaced the if-else with
switch-case wherever required.

Fixed and added the node tests for these changes.

Fixes: zulip#21869
@palashb01 palashb01 linked a pull request Jun 17, 2023 that will close this issue
16 tasks
palashb01 added a commit to palashb01/zulip that referenced this issue Jun 17, 2023
This commit adds a new tab to the stream settings overlay called
"Not subscribed" which lists all the streams the user is not
subscribed to. This tab is disabled if the user is a guest.

Introduced a new variable called "not-subscribed" to replicate
a similar model to how the subscribed tab is working. Currently,
there are only two tabs: "subscribed" and "all streams" so we can
use an if-else condition. However, introducing a new tab requires
more conditions to check, so I replaced the if-else with
switch-case wherever required.

Fixed and added the node tests for these changes.

Fixes: zulip#21869
palashb01 added a commit to palashb01/zulip that referenced this issue Jun 22, 2023
This commit adds a new tab to the stream settings overlay called
"Not subscribed" which lists all the streams the user is not
subscribed to. This tab is disabled if the user is a guest.

Introduced a new variable called "not-subscribed" to replicate
a similar model to how the subscribed tab is working. Currently,
there are only two tabs: "subscribed" and "all streams" so we can
use an if-else condition. However, introducing a new tab requires
more conditions to check, so I replaced the if-else with
switch-case wherever required.

Refactored the 'update_stream_row_in_settings_tab' function inside
stream_ui_updates.js to include the case of a 'Not-subscribed' tab,
so that the tab is immediately updated in any add/remove subscription
event.

Fixed and added the node tests for these changes.

Fixes: zulip#21869
palashb01 added a commit to palashb01/zulip that referenced this issue Jun 30, 2023
This commit adds a new tab to the stream settings overlay called
"Not subscribed" which lists all the streams the user is not
subscribed to. This tab is disabled if the user is a guest.

Introduced a new variable called "show_not_subscribed" to replicate
a similar model to how the subscribed tab is working. Currently,
there are only two tabs: "subscribed" and "all streams" so we can
use an if-else condition. However, introducing a new tab requires
more conditions to check, so I replaced the if-else with
switch-case wherever required.

Refactored the 'update_stream_row_in_settings_tab' function inside
stream_ui_updates.js to include the case of a 'Not-subscribed' tab,
so that the tab is immediately updated in any add/remove subscription
event.

Fixed and added the node tests for these changes.

Fixes: zulip#21869
palashb01 added a commit to palashb01/zulip that referenced this issue Jun 30, 2023
This commit adds a new tab to the stream settings overlay called
"Not subscribed" which lists all the streams the user is not
subscribed to. This tab is disabled if the user is a guest.

Introduced a new variable called "show_not_subscribed" to replicate
a similar model to how the subscribed tab is working. Currently,
there are only two tabs: "subscribed" and "all streams" so we can
use an if-else condition. However, introducing a new tab requires
more conditions to check, so I replaced the if-else with
switch-case wherever required.

Refactored the 'update_stream_row_in_settings_tab' function inside
stream_ui_updates.js to include the case of a 'Not-subscribed' tab,
so that the tab is immediately updated in any add/remove subscription
event.

Fixed and added the node tests for these changes.

Fixes: zulip#21869
palashb01 added a commit to palashb01/zulip that referenced this issue Jul 12, 2023
This commit adds a new tab to the stream settings overlay called
"Not subscribed" which lists all the streams the user is not
subscribed to. This tab is disabled if the user is a guest.

Introduced a new variable called "show_not_subscribed" to replicate
a similar model to how the subscribed tab is working. Currently,
there are only two tabs: "subscribed" and "all streams" so we can
use an if-else condition. However, introducing a new tab requires
more conditions to check, so I replaced the if-else with
switch-case wherever required.

Refactored the 'update_stream_row_in_settings_tab' function inside
stream_ui_updates.js to include the case of a 'Not-subscribed' tab,
so that the tab is immediately updated in any add/remove subscription
event.

Fixed and added the node tests for these changes.

Fixes: zulip#21869
@shashank-23002
Copy link
Collaborator

Does this issue still need a PR or I think #26049 fixes this?

sujalshah-bit added a commit to sujalshah-bit/zulip that referenced this issue May 8, 2024
This commit adds a new tab to the stream settings overlay called
"Not subscribed" which lists all the streams the user is not
subscribed to. This tab is disabled if the user is a guest.

Introduced a new variable called "show_not_subscribed" to replicate
a similar model to how the subscribed tab is working. Currently,
there are only two tabs: "subscribed" and "all streams" so we can
use an if-else condition.

Refactored the 'update_stream_row_in_settings_tab' function inside
stream_ui_updates.js to include the case of a 'Not-subscribed' tab,
so that the tab is immediately updated in any add/remove subscription
event.

Fixed and added the node tests for these changes.

Fixes: zulip#21869.
@sujalshah-bit sujalshah-bit linked a pull request May 8, 2024 that will close this issue
17 tasks
sujalshah-bit added a commit to sujalshah-bit/zulip that referenced this issue May 9, 2024
This commit adds a new tab to the stream settings overlay called
"Not subscribed" which lists all the streams the user is not
subscribed to. This tab is disabled if the user is a guest.

Introduced a new variable called "show_not_subscribed" to replicate
a similar model to how the subscribed tab is working. Currently,
there are only two tabs: "subscribed" and "all streams" so we can
use an if-else condition.

Refactored the 'update_stream_row_in_settings_tab' function inside
stream_ui_updates.js to include the case of a 'Not-subscribed' tab,
so that the tab is immediately updated in any add/remove subscription
event.

Fixed and added the node tests for these changes.

Fixes: zulip#21869.
sujalshah-bit added a commit to sujalshah-bit/zulip that referenced this issue May 23, 2024
Render tooltips for both the tabs if the user is guest user.

Fixes zulip#21869.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment