Commit Graph

102 Commits

Author SHA1 Message Date
Kislay Verma 245357c868 stream_settings_ui: Go to newly created stream.
- On creating a stream, the user is redirected to the
 "stream events" topic of the newly created stream.
- If this is the first time the user has created a stream,
an explanatory modal is shown.

test_hotspots.py is modified to account for the new addition
of the first_stream_created_banner.

stream_create.test.ts is also modified accordingly.

Fixes #29375.
2024-04-17 15:35:19 -07:00
Prakhar Pratyush 6484532830 help: Migrate configure-notification-bot help page to a new URL.
This commit migrates the 'help/configure-notification-bot' help
page to a new URL i.e. 'help/configure-automated-notices'.
2024-03-20 11:48:06 -07:00
sujal 29ca4ba662 stream_settings: Convert name to pills.
Convert anchor tag to pills containing an image/avatar
and username within both existing and new stream
subscriber member lists and group member lists
using the new user_display_only_pill.hbs template.
If user has long username that breaks the UI,
overflow is handled with ellipsis.
add a context class (panel_subscriber_member_list)
to add 'padding 5px'to 'pill_value' for stream
subscriber member list and group member list.

To retrieve  an avatar of a user add a
'img_src: people.small_avatar_url_for_person(user/person)'
field in 'stream_editsubscriber.js', 'user_group_edit_members.js',
'stream_create_subscribers.js' and 'user_group_create_members.js'.

Fixes: #25724.
2024-03-08 17:33:14 -08:00
Sahil Batra e965ed2eb8 stream_settings: Show banner on successful stream creation.
This commit adds banner which is shown on successful stream
creation which contains a link to stream narrow. This banner
makes it more clear that stream was created successfully and
also makes it easy to navigate to the new stream.

Fixes #29171.
2024-03-05 10:56:30 -08:00
Prakhar Pratyush ab453fbe20 settings: Rename notifications_stream to new_stream_announce..._stream.
This commit renames the realm-level setting 'notifications_stream'
to 'new_stream_announcements_stream'.

The new name reflects better what the setting does.
2024-02-21 09:04:23 -08:00
somudas f00f4f95be stream_settings: Make stream name in right panel header a link.
The stream name in right side header is now a link to the stream
narrow.

Fixes #25171.
2024-02-14 11:27:41 -08:00
Vector73 144c2c2f11 stream_settings: Add confirmation modal for changing privacy.
Fixes: #27916
2024-02-13 17:56:44 -08:00
vighneshbhat9945 f9ba4da012 stream-settings: Show indicator on notification settings.
In the Personal settings stream management panel,
when notification settings are changed, Saving/Saved
indicator are shown on personal settings heading instead
of notification settings heading.

Fix this issue by showing indicator on
notification settings heading.

Fixes: zulip#28728.
2024-02-13 14:47:42 -08:00
vighneshbhat9945 ab927cbb2a templates: Remove unwanted div. 2024-02-13 14:47:42 -08:00
Pratik Chanda f4260cf40d stream_settings: Add stream "reset to default notifications" button.
This commit introduces a "reset to default notifications" button to
the personal panel in stream settings. On clicking, it unmutes the
current stream and resets all its notification configurations to
default user settings.

Fixes zulip#27624.
2024-01-28 14:32:45 -08:00
Sayam Samal 68ccb022ca push_notifications: Add help links to mobile notifications options.
Fixes #27830.
2023-12-04 16:38:19 -08:00
Sayam Samal 14bb8708c6 stream_settings: Move tooltip from help icon to label and checkbox. 2023-12-04 16:38:19 -08:00
Sayam Samal 31cc47cbd7 settings: Migrate mobile notification tooltips to a common template. 2023-12-04 16:38:19 -08:00
Sahil Batra d8b3c5581c settings: Fix "Actions" column width for subscribers and members list.
We reduced the width of "Actions" column too much in stream subscribers
and group members list when there were no users matching the text in
search input and it did not look good because of "Actions" heading
being shifted to extreme right.

This commit fixes it by removing the "actions" class on the heading,
which was used to set the width to "1%" which is needed for tables
with only icons in buttons to avoid unused space but not here.

As a result of removing this class, the CSS of "min-width: 100px"
is being applied to the column, but that's fine atleast for stream
subscribers list as it did not look good before due to scrollbar
overlapping the buttons and it looks better now.

For the group members list, we set min-width to 80px, as we do
not require 100px width and it is enough to avoid overlapping
scrollbars to an extent.

The overlapping scrollbars problem is still not fixed completely
but that will handled in a separate commit. This commit was
just to make the heading row look better when there are no users
in the list.
2023-11-30 12:33:44 -08:00
Sahil Batra 5ece914377 settings: Update empty message for subscribers and members list.
This commit updates the message shown for empty group members
list to use "members" instead of "subscribers" and also updates
the wording of messages in both stream subscribers and group
members list to match with the one shown in right sidebar users
list.

We also show different message when there are no subscribers or
members matching the filter text.
2023-11-29 10:58:04 -08:00
Sahil Batra 4fc547cfdc user_groups: Rename "Unsubscribe" to "Remove" in members list.
This commit renames "Unsubscribe" button in group members list
to "Remove".
2023-11-29 10:58:04 -08:00
Sahil Batra db0476622a user_groups: Disable "Add" button for members list if input is empty.
This commit adds code to disable "Add" button in the members list
if the input is empty by adding a common class to "Add" button
for stream subscribers in group members and using the existing
code in add_subscribers_pill.js.
2023-11-29 10:58:04 -08:00
evykassirer 87e824d43e stream subscribers: Name the tabs with a single word, removing _settings.
This is preparation for #27637, where it will be nice to be able
to be able to parse a url such as `/#streams/1/announce/general`
and use the `general` string to directly open a stream subscription
tab without converting it to `general_settings`.
2023-11-20 15:32:29 -08:00
Sahil Batra 3c8701ee36 streams: Add API endpoint to get stream email.
This commit adds new API endpoint to get stream email which is
used by the web-app as well to get the email when a user tries
to open the stream email modal.

The stream email is returned only to the users who have access
to it. Specifically for private streams only subscribed users
have access to its email. And for public streams, all non-guest
users and only subscribed guests have access to its email.
All users can access email of web-public streams.
2023-11-16 13:25:33 -05:00
Sayam Samal 0c04246723 stream_settings: Remove muted notice string for muted streams.
The muted notice string "Muted streams don't show up in "All messages"
or generate notifications unless you are mentioned." doesn't properly
explain the behavior of muted streams.

A user can still get notifications for muted streams if they follow a
topic in the stream. This is because the followed topics global
settings will override the stream notifications settings.

Fixes #27274.
2023-11-02 14:07:44 -07:00
Sayam Samal 67fd391e3d stream_settings: Add a `?` link to "/help/mute-a-stream".
Fixes part of #27274.
2023-11-02 14:07:44 -07:00
Pratik daa34685c3 stream_edit: Enable notification settings for muted streams.
This commit allows the user to change notification settings even though
the stream is muted and adds a line of text in stream settings and
notification settings.

Fixes #27272.
2023-11-02 13:57:56 -07:00
Sahil Batra 0c146d21e3 overlays: Rename "modal-bg" class to "overlay-container".
This commit renames "modal-bg" class to "overlay-container"
since we use this class only for overlays and this seems a
better name.
2023-10-17 10:28:50 -07:00
Sahil Batra eeb3b5715f settings: Rename modal-footer class.
We only use "modal-footer" class in stream and user group
creation forms which is actually not a modal, so this commit
renames the class to a better name "settings-sticky-footer".
2023-10-17 10:28:50 -07:00
m-e-l-u-h-a-n 69b2c1143a stream settings: Fix tooltip for sub_unsub_button on right pane.
There was no tooltip shown for toggle subscription button
when it was disabled.

A tooltip with appropriate message is added to this button
when it is disabled in case of private streams and user
cannot use it to toggle subscription.
2023-10-13 11:08:54 -07:00
m-e-l-u-h-a-n 2585fe5c41 streams: Improve subscription toggle buttons on stream rows.
This commit changes the UI for subscribing to streams on stream rows
to be more like the mobile version (zulip/zulip-mobile#5333).
The current design made it hard to discover how to subscribe to
streams via left panel and is not very clear on the fact that
its not possible to subscribe to private streams.

To address this the following changes have been made:
- For unsubscribed streams, the on hover-checkmark is replaced by
a "+" which is always displayed and has on-hover highlighting.

- For unsubscribed private streams, the "+" is disabled.

- Tooltips with appropriate messages are added on the "+" sign for the
above 2 cases.

- A tooltip has also been for the on-hover checkmark for subscribed
streams.

Fixes: #22217.
Co-authored-by: Raghav Luthra <rluthra2002@gmail.com>
2023-10-13 11:08:54 -07:00
Sahil Batra 00424748f4 settings: Disable submit button when no input is changed.
We now disable the submit button if no input is changed
in modals used for editing name and descriptions of
stream and user groups. The button is enabled if any
value is changed.
2023-09-20 15:40:11 -07:00
Sahil Batra a3124ddcb3 settings: Rename search-container class.
This commit renames search-container class used in stream and
user group settings overlay to list-toggler-container since
the element does not contain search UI and instead contains
the toggler for "Subscribed" and "All streams" and similarly
for "Your groups" and "All groups".
2023-09-20 15:40:11 -07:00
evykassirer 4c2995c613 stream settings: Warn users before locking them out of a stream.
Organization owners can make streams private even if they're not
subscribed to them, but cannot access private streams they're not
subscribed to. This means they're able to lock themself out of streams.

This change warns users of this and give them a chance to subscribe.

Fixes #26437.
2023-08-11 16:46:41 -07:00
Hemant Umre 63173ce1bc stream_settings: Add 'Default stream' option in create stream UI.
In this commit, we introduce a new option in the stream creation
UI - a 'Default stream for new users' checkbox. By default, the
checkbox is set to 'off' and is only visible to admins. This
allow admins to easily designate a stream as the default stream
for new users during stream creation.

Fixes #24048.
2023-08-09 15:20:09 -07:00
Hemant Umre a81715786c stream_settings: Add 'Default stream' option in edit stream UI.
This commit adds a 'Default stream for new users' checkbox in
the stream editing UI to allow admins to easily add or remove
a stream as the default stream for new users. Previously, this
functionality required navigating to separate menu.

Fixes a part of #24048.
2023-08-09 14:38:52 -07:00
Aman Agrawal 875d564f2d stream_settings: Migrate to new DropdownWidget.
Also, remove old DropdownListWidget since it is no longer used.
2023-07-27 14:10:08 -07:00
Ujjawal Modi c8bcb422f5 streams: Rename `can_remove_subscribers_group_id` parameter.
Earlier the API endpoints related to streams accepts and returns a
field `can_remove_subscribers_group_id` which represents the ID
of user_group whose members can remove subscribers from stream.

This commit renames this field to `can_remove_subscribers_group`.
2023-07-25 18:33:04 -07:00
Sahil Batra 5442bfb07c templates: Add filter_text_input class to inputs used for filtering.
This commit adds filter_text_input class to various search inputs
used across the app. This new class is used to re-add the bootstrap
CSS rules such that we can remove the CSS from bootstrap.css.
2023-07-07 10:10:28 -07:00
Alexander Colloredo-Mansfeld 437b2747b1 settings: Remove id column from tables in stream and group settings.
Fixes part of #25483.
2023-06-07 12:01:26 -07:00
acolloredo 66bc0c95cb settings: Remove id column from subscriber list.
Fixes part of #25483.
2023-06-07 12:01:08 -07:00
Josh Yap 6b77499286 settings: Link to user card in new stream/group tables.
When creating new streams or groups, open up user card when
a user's name is clicked on. This behavior now matches
other settings tables elsewhere.

Fixes #25725.
2023-05-26 09:55:01 -07:00
Ujjawal Modi fc22b86eb6 streams: Correctly disable adding subscribers while creating streams.
This commit disables the field used for adding other subscribers
in stream creation box for users who are not allowed to add
other users to streams because of realm level setting
"Who can add users to  streams".

Fixes #24900.
2023-05-14 11:19:41 -07:00
Hardik Dharmani ede1e547ee stream_settings: Fix bugs with #stream-creation .modal-footer.
This commit addresses `#stream-creation .modal-footer` becoming
transparent after an error in creating a stream due to overlapping
with `.stream-creation-body`. Instead of adding data-simplebar on
.stream-creation-body, added it to a new div
`stream-creation-simplebar-container` which contains 3 divs:
stream_create_info,stream_creating_indicator and stream-creation-body.

Additionally, fixed the border-radius of the modal footer on the
bottom left side for device width > $md_min.

Fixes #25526
2023-05-11 15:50:56 -07:00
Hardik Dharmani 3a358a9a11 tooltips: Shift all tooltip templates to tooltip_templates.hbs.
Refactored all tooltip templates with static content to be in
tooltip_templates.hbs to avoid duplicate IDs and DOM element.

Fixes #25324
2023-05-09 11:10:58 -07:00
Tim Abbott 0b7dd46530 stream settings: Improve label for stream edit modal.
"Change stream info" was very ambigious about what types of
information can be changed in the modal in question.
2023-05-01 17:04:17 -07:00
Tim Abbott 2dd1ff7bfd stream settings: Use tippy-zulip-delayed-tooltip more.
This fixes an issue where the "Change stream info" button would
display a tooltip immediately upon closing the modal to edit the
stream name and description.
2023-05-01 17:04:17 -07:00
Hardik Dharmani 15a15240da tooltips: Add tippy tooltips in manage stream settings.
Added tippy tooltips for create_stream_plus_button and
preview-stream-button in manage stream settings by adding
class `.tippy-zulip-delayed-tooltip` which add tooltips
with LONG_HOVER_DELAY. Added data-tippy-placement="bottom"
to match with 'Archive stream' tooltip.

Created a new tooltip for sub_unsub_button in tippyjs with
class .toggle-subscription-tooltip that has
EXTRA_LONG_HOVER_DELAY, placement equals to bottom
and appended to body.

Fixes part of #24311.
2023-04-27 18:12:32 -07:00
Ujjawal Modi 449febf036 streams: Make stream settings and create stream UI more consistent.
This commit make changes in create stream panel by moving
announce stream option below stream description and adds a
"Stream permissions" section heading just above
"Who can access the stream?" and also rewords the text
"Announce stream".

Also now announce stream option is only shown if the user creating
stream have access to the announcement stream name. When option
is not shown, default behaviour is to announce public and
web-public streams.

Fixes #23327.
2023-04-24 17:02:33 -07:00
Aman Agrawal 8c744752ed stream_privacy: Use new lock and hashtag icons.
This commit doesn't modify the lock and hashtag icon in settings.
2023-04-10 23:41:30 -07:00
brijsiyag 95f2ead33d streams: Add an explanatory notice when left panel is empty.
This commit adds a message and link to view or create streams on
empty streams panel. It conditionally renders the message when
there is no stream to show and also when any stream
event (delete,create,subscribe) occurs.

Co-authored-by: Tim Abbott <tabbott@zulip.com>

Fixes #21870.
2023-04-06 19:33:13 -07:00
Sahil Batra e1877ce57e settings: Add settings_text_input class to text inputs.
This commit adds settings_text_input class to text inputs in
settings, stream settings and user group settings pages. This
class is used to set the width of inputs to 206px, as we will
be removing the boostrap rule which sets width of the input
in further commits.
2023-03-27 22:34:30 -07:00
Sahil Batra 1c6bed55e4 modals: Add modal_text_input class to text inputs.
This commit adds modal_text_input class to text inputs
in modals to set width of them as set by bootstrap.
This class is used to set the width of inputs to 206px,
as we will be removing the boostrap rule which sets width
of the input in further commits.
2023-03-27 22:34:30 -07:00
Anders Kaseorg 36475daba7 templates: Remove references to undefined fields.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-22 17:10:28 -07:00
Anders Kaseorg 83b6866018 templates: Replace unnecessary {{#tr}} blocks with {{t}} helper.
`{{#tr}}` supports HTML and allows translators to accidentally
introduce HTML, so it’s safer to use the `{{t}}` helper unless HTML is
needed.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-16 11:26:45 -07:00
Ujjawal Modi 5cf98d8653 streams: Allow sorting of stream members.
Stream members table in Create stream and stream subscribers UI
can now be sorted.
Fixes #21341
2023-03-01 17:29:01 -08:00
Anders Kaseorg c1675913a2 web: Move web app to ‘web’ directory.
Ever since we started bundling the app with webpack, there’s been less
and less overlap between our ‘static’ directory (files belonging to
the frontend app) and Django’s interpretation of the ‘static’
directory (files served directly to the web).

Split the app out to its own ‘web’ directory outside of ‘static’, and
remove all the custom collectstatic --ignore rules.  This makes it
much clearer what’s actually being served to the web, and what’s being
bundled by webpack.  It also shrinks the release tarball by 3%.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00