Commit Graph

20 Commits

Author SHA1 Message Date
Alya Abbott
b892f8a7a8 notifications: Test notification should say that it's a test. 2024-06-25 17:28:17 -07:00
Sahil Batra
a530311646 settings: Fix user notification batching settings.
This commit solves the bug for user notification batching
setting which was introduced during the typescript migration
of settings_components.js due to assertion error in
get_input_element_value.
2024-05-21 21:20:50 -07:00
Anders Kaseorg
382af5f79f eslint: Fix no-jquery/no-append-html errors that need no test changes.
Signed-off-by: Anders Kaseorg <[email protected]>
2024-04-04 10:11:57 -07:00
Anders Kaseorg
b9e62c7af8 page_params: Split out state data for realm.
For spectators, the chunk of page_params that originates from
do_events_register isn’t assigned until ui_init.js.  That means the
TypeScript type of page_params is mostly a lie during module load
time: reading a parameter too early silently results in undefined
rather than the declared type, with unpredictable results later on.

We want to make such an early read into an immediate runtime error,
for both users and spectators consistently, and pave the way for
runtime validation of the page_params type.  As a second step, split
out the subset of fields that pertain to the entire realm.

Signed-off-by: Anders Kaseorg <[email protected]>
2024-02-15 10:22:52 -08:00
Pratik
137505e2ad settings_notifications: Enable muted stream notification settings.
This commit allow the users to modify notification settings for muted
streams through the 'notification' section located in the personal
settings.

Fixes #27272.
2023-11-07 13:46:19 -08:00
Anders Kaseorg
1c5321e57f stream_settings_api: Adjust set_stream_property usage.
Signed-off-by: Anders Kaseorg <[email protected]>
2023-11-02 08:36:44 -07:00
Anders Kaseorg
b9bb0d5aa8 settings_org: Cut import of settings_realm_user_settings_defaults.
Signed-off-by: Anders Kaseorg <[email protected]>
2023-10-10 09:06:28 -07:00
Anders Kaseorg
3cac29a8e1 settings_org: Extract settings_components module.
Signed-off-by: Anders Kaseorg <[email protected]>
2023-10-09 17:26:49 -07:00
Anders Kaseorg
db20fd12e0 notifications: Split out message_notifications module.
Signed-off-by: Anders Kaseorg <[email protected]>
2023-10-06 16:22:40 -07:00
Anders Kaseorg
69ceff4995 settings_notifications: Cut import of stream_edit.
Signed-off-by: Anders Kaseorg <[email protected]>
2023-10-05 08:22:56 -07:00
Anders Kaseorg
4c11f49627 settings_notifications: Fix stream_settings_api namespace import name.
Signed-off-by: Anders Kaseorg <[email protected]>
2023-10-04 23:57:16 -07:00
Anders Kaseorg
eb6ac7bd98 settings_ui: Fix type and $ prefix of status_element argument.
Signed-off-by: Anders Kaseorg <[email protected]>
2023-10-04 23:51:50 -07:00
Anders Kaseorg
b4878d4f0b stream_edit: Move set_stream_property to new stream_settings_api module.
Signed-off-by: Anders Kaseorg <[email protected]>
2023-10-04 13:04:50 -07:00
Prakhar Pratyush
28fb5ea24d settings: Add UI for automatically follow and unmute topics settings.
This commit adds two drop-down settings in 'SETTINGS / NOTIFICATIONS'
and 'SETTINGS / DEFAULT USER SETTINGS'.

The new settings lie in a new section named "Topic notifications",
just below the "Noification triggers" section.

Label: "Automatically follow topics"
Options: "Topics I participate in", "Topics I send a message to",
"Topics I start", and "Never".

Label: "Automatically unmute topics in muted streams"
Options: "Topics I participate in", "Topics I send a message to",
"Topics I start", and "Never".

Fixes #25914.
2023-10-04 13:04:29 -07:00
Anders Kaseorg
4595be29e8 stream_settings_ui: Remove set_muted wrapper.
stream_muting.update_is_muted will be called when the event comes back
from the server.

Signed-off-by: Anders Kaseorg <[email protected]>
2023-10-03 12:49:36 -07:00
Vector73
f384eb67a9 default-user-settings: Fix play button not playing selected sound.
Fixes #26598.
2023-09-13 13:07:10 -07:00
Ujjawal Modi
de8148bc9e notifications: Warn if all PM notifications will be disabled.
This PR adds a modal to warn when user unchecks a box on the "PMs,
mentions, and alerts" line of notifications panel that will result in
all notifications for private messages and mentions being disabled.

Fixes #24151.
2023-03-28 18:36:56 -07:00
Aman Agrawal
f5f79048fe notifications: Handle exception when trying to play audio.
Safari denies user from playing audio without an interactive
trigger like a button by default. So, when user received a
notification in Zulip via Safari, it triggers an error when
trying to play the notification sound.

Our goal for this commit is to simply handle the error.
2023-03-22 12:27:20 -07:00
Prakhar Pratyush
ae72777c77 user_settings: Automate 'Include realm name in message email subject'.
Currently, there is a checkbox setting for whether to
"Include realm name in subject of message notification emails".

This commit replaces the checkbox setting with a dropdown
having values: Automatic [default], Always, Never.

The Automatic option includes the realm name if, and only if,
there are multiple Zulip realms associated with the user's email.

Tests are added and(or) modified.

Fixes: #19905.
2023-03-14 17:48:57 -07: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 <[email protected]>
2023-02-23 16:04:17 -08:00