Commit Graph

58615 Commits

Author SHA1 Message Date
Alex Vandiver 46a57e37aa push_notifications: Support test notifications from old servers.
4430ab9cbe changed this, assuming that all servers would send
`realm_url` -- however, only servers running that commit do.  Update
to accept either `realm_url` or `realm_uri` payload properties.
2024-06-04 23:07:39 -07:00
Sayam Samal 94627196df popovers: Fix popovers force closing on topic visibility change.
When a topic is muted, it is removed from the view in some cases.
This can lead to the popover being force closed since the popover is
anchored to the reference element.

We add a delay to all the methods that contribute to hiding the topic,
on mute, to allow the relevant animations to be completed before the
topic is hidden from view and the popover is closed.
2024-06-04 15:56:44 -07:00
Sayam Samal 56be95a1c8 topic_popover: Remove redundant code from previous visibility options.
Commit 3f2ab44f94 removed the 'development' guard and cleaned the
older UI of the previous topic visibility options implementation,
but it missed the related JS logic.

This commit removes this redundant code, which was now present in
`web/src/topic_popover.js`.
2024-06-04 15:56:44 -07:00
Sayam Samal d93a3bb175 topic_sidebar_actions: Use sliding animation in the visibility switcher.
This commit updates the sidebar topic actions popover to use the new
sliding tab switcher for the topics visibility policy switcher.

This also includes changes such as hiding the popover only on
successful request completion, and adds error feedback by indicating
it via the sliding animation.
2024-06-04 15:56:44 -07:00
Sayam Samal 8877833603 visibility_policy_popover: Add feedback via switcher when request fails. 2024-06-04 15:56:44 -07:00
Sayam Samal a3d60c9f09 visibility_policy_popover: Hide popover only when request is successful.
This hides the visibility policy popover only when the request to
change the topic visibility policy is successful.

This allows a user to retry changing the policy in case of a request
failure, without having to open the popover again from the start.
2024-06-04 15:56:44 -07:00
Sayam Samal db4c5cdfc6 visibility_policy_popover: Use sliding animation in the switcher.
This commit updates the topic visibility popover to use the new
sliding tab switcher, which was introduced in personal menu >
theme switcher.
2024-06-04 15:56:44 -07:00
Tim Abbott 6c67f92656 docs: Update changelog with changes since 8.x. 2024-06-04 15:37:05 -07:00
Kislay Verma 2c98263d4c left_sidebar: Rename "more topics" to "all topics".
This commit renames the occurrences of "more topics"
to "all topics" in comments and documentation.

Fixes #30014
2024-06-04 10:18:54 -07:00
Sahil Batra c8b8b836fd test_events: Update code to test for only allowed system groups.
This commit updates do_set_realm_permission_group_setting_test
to test for only allowed system groups.
2024-06-04 09:55:27 -07:00
Sahil Batra aac6d6cddb user_groups: Move get_group_setting_value_for_audit_log_data.
This commit moves get_group_setting_value_for_audit_log_data
to zerver.lib.user_groups.
2024-06-04 09:55:27 -07:00
Lauryn Menard c4f1d44dd7 i18n: Fix translated strings for delete profile field option.
Fixes how the confirmation modal title is generated for translation
for deleting an option or multiple options from a customer profile
field that's a list of options.
2024-06-04 09:54:35 -07:00
sujal shah d793cc0f54 tooltip: Render tooltips for `Not subscribed` and `All channels` tabs.
Render tooltips for both the tabs if the user is guest user.

Fixes #21869.
2024-06-04 09:49:50 -07:00
sujal shah 26ae173a2c left_sidebar: Change redirect link for Browse channels.
This commit changes the redirect links for "Browse channels" and
"Browse 1 more stream" to the Not subscribed(#streams/notsubscribed)
tab.
2024-06-04 09:49:50 -07:00
sujal shah 6c437eda77 stream_settings: Display No channel text when no channel present.
In the "not-subscribed" tab, when there are no channels to show, we
display a text message saying "No channels to show. View all channels"
along with a link that redirects the user to the "All channels" tab
(All channels(#channels/all)).

Updated the update_empty_left_panel_message function in
stream_settings_ui.js to modify and determine which banner to display
when no channels are available to show, modified that function to also
display the banner of the "not-subscribed" tab using a new classname
called 'not_subscribed_streams_tab_empty_text'.
2024-06-04 09:49:50 -07:00
sujal shah 619e234100 stream_settings: Change the if-else with switch statement. 2024-06-04 09:49:50 -07:00
sujal shah 6deb165ef6 stream_settings: Add Not subscribed tab to stream settings.
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.
2024-06-04 09:49:50 -07:00
sujal shah d7936fe576 stream_overlay: Change the subscribed_only to show_subscribed.
This commit changes the variable and function name from
"subscribed_only" to "show_subscribed" and
"set_subscribed_only" to "set_show_subscribed"
so that in the next commit, when the "not subscribed" tab is added,
we can use a similar variable named "show_unsubscribed" and function
named "set_show_unsubscribed".
2024-06-04 09:49:50 -07:00
Aman Agrawal c6c8e831f8 portico_error_page: Apply `error` class to all the error pages.
This helps us control the CSS applied to the elements outside the
content scope of `portico_error_page.html`.
2024-06-04 09:41:34 -07:00
Aman Agrawal b2f0677c25 portico: Remove `container` and `row-fluild` bootstrap classes.
Fixes #28526

* Removed `container` and `row-fluid` class from error pages.
* Use a variable for footer height.
* Made header sticky instead of fixed allowing us to position
  page content without adding arbitrary padding or margin at top.
  Header is around 60px in height, so reduced that much top padding
  or margin.
2024-06-04 09:41:34 -07:00
Aman Agrawal b3a5b2b9aa 5xx: Fix header colors. 2024-06-04 09:41:34 -07:00
Aman Agrawal dd70110166 templates: Use a common template for error pages. 2024-06-04 09:41:34 -07:00
Aman Agrawal 27d2b89412 unsupported_browser: Remove not required extra bottom padding. 2024-06-04 09:41:34 -07:00
Varun Singh 6b42c18220 settings_preferences: Convert module to TypeScript. 2024-06-04 08:50:07 -07:00
Varun Singh 3c79b07a56 dependencies: Add @types/js-cookie to devDependencies. 2024-06-04 08:50:07 -07:00
Varun Singh b1943f560a settings_preferences: Refactor initialize function.
Before this commit the `user_settings_panel` object was declared as
a `const` and assigned an initial value of `{}`. Later, inside the
initialize function the object was mutated with three fields (`container`,
`settings_object`, `for_realm_settings`).

TypeScript does not allow this.Hence,we have removed the initial
value(`{}`) and changed the object to be a `let` var. This means,
when the `initialize` function is called `user_settings_panel` object is
undefined and hence `user_settings_panel.foo` will throw an exception.
To avoid this we have refactored the function by changing the way
`user_settings_panel` object is assigned value.
2024-06-04 08:50:07 -07:00
Varun Singh 796cc038c4 page_params: Add property to zod object. 2024-06-04 08:50:07 -07:00
Varun Singh be91b41236 settings_preferences: Don't store 'success_msg_html' if undefined.
Although both 'sticky' and 'success_msg_html' parameters
are passed optionally, the conditional took into account
only the former.
2024-06-04 08:50:07 -07:00
Lauryn Menard 448b574c65 billing: Update help center links for Cloud or self-hosted.
Updates the links about license management to the help center on
the billing and upgrade pages to go to the section about the type
of license management, and to go to either the Zulip Cloud billing
article or the self-hosted billing article.
2024-06-04 08:49:43 -07:00
Lauryn Menard 2f4bdddd53 upgrade: Simplify logic for descriptive text about license management. 2024-06-04 08:49:43 -07:00
Lauryn Menard 6f7e288b1f billing-css: Remove out-of-date rule for input styling.
These were removed in commits ebc7cbaf3, 6cadf333f and e9a0c8a03.
2024-06-04 08:49:43 -07:00
Lauryn Menard d911e9b43f i18n-tools: Write a newline when unescaping json data contents.
Updates `tools/i18n/unescape-contents` to write a newline at the end
of the file when updating the json data.
2024-06-04 08:20:24 -07:00
Lauryn Menard 593a1f12b7 i18n-tools: Print locale that's being checked for legacy translations.
Adds a print statement to `tools/i18n/update-for-legacy-translations`
to help with debugging to know what locale was being checked if an
error is raised.
2024-06-04 08:20:24 -07:00
evykassirer 9a3263ec5d messages: Rename convert_raw_message_to_message_with_booleans. 2024-06-03 15:42:41 -07:00
Alex Vandiver b557297dd2 zilencer: Drop data which is no longer sent by remote servers. 2024-06-03 12:35:35 -07:00
Alex Vandiver 7792b12f05 test_push_notifications: Fix a typo. 2024-06-03 12:35:35 -07:00
Alex Vandiver 6c17cca208 zilencer: Drop unwanted data that old servers might still send. 2024-06-03 12:35:35 -07:00
Alex Vandiver 09e9c75ec6 analytics: Remove `active_users` and `active_users_log` metrics.
Both of these are inaccurate, not currently used anywhere, and have
been superseded by the `active_users_audit` metric.
2024-06-03 12:35:35 -07:00
Alex Vandiver 0100440a86 analytics: Make active_users_audit into a RealmCount.
With `realm_active_humans` no longer dependent on the per-user rows,
there is no reason to preserve them -- any measure of "was a user
active" should look directly at the much richer RealmAuditLog.  This
removes the bulk of the UserCount table, since the remaining rows all
require user interaction of some sort to produce rows.
2024-06-03 12:35:35 -07:00
Alex Vandiver 195defb031 analytics: Rewrite realm_active_humans::day query.
This makes it no longer dependent on active_users_audit:is_bot:day,
which subsequent commits will make a RealmCount, not UserCount, query.
This folds the same behaviour of `active_users_audit` directly into
the query; however, only running over active users, using the index
from the earlier commit, and using the new `DISTINCT ON` formulation
make this a fast query compared to `active_users_audit:is_bot:day` +
the old `realm_active_humans::day`.
2024-06-03 12:35:35 -07:00
Alex Vandiver e638ae44a8 analytics: Use a DISTINCT ON rather than a self-join.
This produces a query which is more comprehensible, is 2x faster when
limited to a realm, and has equivalent speed when performing the full
table scan.
2024-06-03 12:35:35 -07:00
Alex Vandiver 7ad967ebc7 test_counts: Create audit log entries when creating users. 2024-06-03 12:35:35 -07:00
Alex Vandiver 3ea0d73182 zerver: Add a partial audit log index for counting active users.
This index is used by `active_users_audit:is_bot:day`, and provides
roughly a 2x speedup.  The existing
`zerver_realmauditlog_realm__event_type__event_time` is used if there
is a realm limit, but the standard statistics fill runs for all realms
at once, and thus cannot use it.
2024-06-03 12:35:35 -07:00
Anders Kaseorg 48d3601649 echo: Use newly created MessageWithBooleans in insert_local_message.
Commit 50f5cf9ad8 (#30227) changed
message_helper.process_new_message (called by
message_events.insert_new_messages) to return a newly created message
object rather than mutating the object it was passed.  So
echo.insert_local_message needs to use this new object, fixing a
regression where we’d fail to replace a locally echoed message when
the server-rendered message came in.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-03 12:25:08 -07:00
afeefuddin 394e8fc856 navbar_alerts: Convert module to TypeScript. 2024-06-03 12:19:58 -07:00
afeefuddin 7025d409c3 navbar_alerts: Use UNIX timestamp consistently. 2024-06-03 12:19:58 -07:00
afeefuddin b3809a33b5 state_data: Update realm_schema.
Add demo_organization_scheduled_deletion_date and realm_date_created
to realm_schema.
2024-06-03 12:19:58 -07:00
Karl Stolley 0f6072d2d6 left_sidebar: Condense nav rows to standard size. 2024-06-03 10:32:29 -07:00
Karl Stolley 5dafaf9deb left_sidebar: Expand topic rows to prominent size. 2024-06-03 10:32:29 -07:00
Vector73 61d7689520 capitalization: Allow `realm_url` in user-facing strings. 2024-06-03 10:07:10 -07:00