Commit Graph

3499 Commits

Author SHA1 Message Date
Alex Vandiver fc41d6085b tornado: Split server restart events from web client reload events. 2024-02-15 15:42:50 -08:00
Anders Kaseorg 823e8d8716 state_data: Fix custom_profile_fields type for CHOICE → SELECT rename.
Commit bd6471f0e3 (#28691) added this
reference to the old name, even though it had already been renamed in
commit b220d29fed (#17775), presumably
because that had failed to update the OpenAPI description.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 16:00:25 -05:00
evykassirer 07b2ad27fa topic edit: Warn when renaming a topic to an existing topic name.
Fixes #27369.

When editing a topic name via the topic header bar, it's easy to
accidentally move messages into an existing topic, which is
difficult to undo. This commit adds a confirmation modal for when
this is about to happen.
2024-02-15 11:58:23 -08:00
evykassirer 42122b851c message edit: Remove unused message_id assignment. 2024-02-15 11:58:23 -08:00
evykassirer c86558521f message edit: Remove redundant if clause.
`topic_changed` must be true by this point, because
of the earlier return statement.
2024-02-15 11:58:23 -08:00
evykassirer 47560d0b8b confirm dialog: Allow conf to override defaults. 2024-02-15 11:58:23 -08:00
Karl Stolley 9c77300c5a bootstrap: Remove body selectors, zero margin/padding explicitly. 2024-02-15 10:31:29 -08:00
Karl Stolley 79959573bd bootstrap: Remove unnecessary root properties.
* `font-size: 100%` is unnecessary, as `font-size: 16px` is set on
  the `body` selector.
* `text-size-adjust` is unnecessary, as supporting browsers appear
  to use `100%` as a default value anyway.
2024-02-15 10:31:29 -08:00
Anders Kaseorg bf6978185d home: Send state_data in a separate object.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08: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 <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Anders Kaseorg e96ede0ef6 page_params: Split out state data for current user.
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 first step, split
out the subset of fields that pertain to the current user.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Anders Kaseorg fd2ad130f9 page_params: Move max_message_id to local_message.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Anders Kaseorg 2d575ae576 page_params: Move queue parameters to server_events.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Anders Kaseorg 26df98a2fb echo: Remove unnecessary page_params.queue_id reference.
The web app never gets a new queue ID.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Anders Kaseorg e4bbd04f5d page_params: Remove muted_users from type.
ui_init.initialize_everything removes this from page_params with
pop_fields("muted_users").

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-15 10:22:52 -08:00
Anders Kaseorg 80a6b12690 docs: Optimize /api links to skip trailing slash redirect.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-14 21:06:03 -05:00
Varun-Kolanu e0339715cc skip_navigation: Add skip navigation link to /help and /api sites.
Skip navigation links added in /help and /api sites for accessibility
Fixes #28564.
2024-02-14 15:08:45 -06:00
Vector73 6801ea33ba message_move: Disable stream select dropdown for unprivileged users.
This commit disables the stream-select dropdown in the "Move message"
modal if the user is not allowed to move messages between streams, and
adds a tooltip for clarification when the dropdown is disabled.

 Fixes #28345.
2024-02-14 12:46:13 -08:00
Sahil Batra 30fc4f7832 groups: Disable "Add" button in members list if input is empty.
We previously had code to disable the "Add" button initially but
then we re-enabled it again if user had permission to add members.

We do not need that code to enable/disable the button based on
permission since the button is disabled initially and it is
only enabled when user updates the input which is not allowed
if users is not allowed to add members.
2024-02-14 12:26:07 -08:00
Sahil Batra e6e806f656 groups: Do not allow user to type when not allowed to add members.
Previously, we allowed user to type in the input even when user
was not allowed to add members to the group. This commit fixes that.
2024-02-14 12:26:07 -08:00
Sahil Batra ed1bc84566 group-members: Remove the error/success message on typing in input.
Previously, when there is no valid pill in the members list and
user clicks on "Add" button, then "No user to add" error is shown
but the error message is visible until successful user is added
and the same goes for success messages too.

This commit updates the code to remove both error and success
messages when user types in the input.
2024-02-14 12:26:07 -08:00
cherish2003 f4016eb3bf stream-subscribers: Remove the error/success message on typing in input.
Previously, when there is no valid pill in the members list and user
clicks on "Add" button, then "No user to subscribe" error is shown
but the error message is visible until successful user is added and
the same goes for success messages too.

This commit updates the code to remove both error and success messages
when user types in the input.

Fixes #27438.
2024-02-14 12:26:07 -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
qx24680 86e306a679 settings: Improve placeholder text for empty settings tables.
Fixes: #27250.
2024-02-14 08:52:52 -08:00
Vector73 144c2c2f11 stream_settings: Add confirmation modal for changing privacy.
Fixes: #27916
2024-02-13 17:56:44 -08:00
evykassirer 925f5e8b67 drafts: Move some functions from draft_overlay_ui.
Preparation for an upcoming commit.
2024-02-13 15:20:48 -08:00
Karl Stolley 76220fdc2c features: Suppress plan-comparison subheadings. 2024-02-13 15:11:02 -08:00
Karl Stolley 43ee8b2ce1 features: Adjust table columns for Cloud default. 2024-02-13 15:11:02 -08:00
Karl Stolley 04b94f6ad5 features: Swap in redesigned feature-comparison table. 2024-02-13 15:11:02 -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
vighneshbhat9945 4903870ec3 stream_settings: Remove duplication logic.
This commit addresses code duplication issue in
'stream_is_muted_changed()' which was redundantly
present in 'stream_setting_changed()'.

The changes ensure that the functionality is now centralized
and can be easily updated or extended in the future.
2024-02-13 14:47:42 -08:00
Lauryn Menard b275e9c4d6 stripe: Add billing portal for customer name and address.
Adds a link on the upgrade and billing pages that opens a stripe
billing portal for the customer to update their name and address
that will appear on invoices and receipts.

On the billing page, updating the credit card information will
no longer update the customer billing address, since they can
now do this directly through the billing portal. To be consistent
with the credit card form on the upgrade page, we still require
inputting a billing address for the card.

Note that, once an invoice is paid/complete, then changes to the
customer's name and address will not be applied to those invoices.
2024-02-13 14:18:38 -08:00
Varun Singh e246db6709 playground_links_popover: Return if 'playground_info' is undefined.
We need fields like 'url_template' to do the code extraction.
Those are absent if 'playground_info' is undefined, thus we should
return immediately in those cases.
2024-02-13 11:44:01 -08:00
Varun Singh 3fa308369d playground_links_popover: Convert module to TypeScript. 2024-02-13 11:44:01 -08:00
Varun Singh 44e4a90ab8 playground_links_popover: Don't mutate global playground object.
The 'playground_url' field is specialized to the 'else' block ,
but is being written into global 'playground' object thus mutating
it.

To avoid this , we create a Map, with its values being objects
that contain all the fields (including playground_url) neccessary
to be passed into the template for rendering.
2024-02-13 11:44:01 -08:00
Varun Singh 1af9fa4263 realm_playground: Remove redundant omit utility.
Omitting 'pygments_language' property adds extra unnecessary complexity.
2024-02-13 11:44:01 -08:00
ayush amawate 071e93277f stream_settings: Fix overlapping Unsubscribe button with side scroll.
Fixes #26835.
2024-02-13 10:59:28 -08:00
Aman Agrawal 8cba101e05 support: Add button to delete configured fixed next plan.
This will help us modify the configured plan if we need to.
2024-02-13 09:40:53 -08:00
Aman Agrawal 68c3c6b872 stream_popover: Remove stale code.
We don't show a cancel button with stream color picker and
`.popover` and `.popover-inner` classes don't exist for
stream popover.
2024-02-13 08:53:57 -08:00
Karl Stolley 35098f4959 Revert "plans: Handle table widths in CSS."
This reverts commit 960e29dc5a.

An earlier draft of the comparison table made this CSS necessary;
it should have been removed before merging.
2024-02-12 15:18:01 -08:00
Karl Stolley 5f509f5b0c plans: Remove unnecessary comparison-table conditional. 2024-02-12 15:18:01 -08:00
Karl Stolley 5be2e8fa64 portico: Beef up IntersectionObserver on comparison table. 2024-02-12 15:18:01 -08:00
Aman Agrawal 7ca85bed71 stripe: Fix $0 invoices being generated on upgrade.
Instead of charging the customer using the attached payment
method and then creating the invoice, we create an invoice and
force an immediate payment for the invoice via the attached
payment method.
2024-02-12 15:15:56 -08:00
Lauryn Menard 831381f160 email-log: Update CSS styles for dev environment email log.
Removes reliance on bootstrap alert and label rules/styles that
were used or expected for this email log page.
2024-02-12 11:35:36 -08:00
roanster007 07ccd29a9b typing_status: Add an extra notification_event_type to Recipients.
This is a preparatory commit. It adds an extra notification_event_type
to the Recipient type. This can be used to differentiate between
typing notifications and message edit typing notifications since
they send different events.
2024-02-12 10:51:12 -08:00
roanster007 ea2b659314 message_edit_notice: Change edited notice computation logic location.
This commit extracts the edited notice computation logic of
edited_in_left_col, edited_alongside_sender and edited_status_message
to a new function - set_edited_notice_locations and calls it right
after the method merge_message_groups.

This is a preparatory commit, and is done since theses three variables
were previously wrongly initialized in the beginning for live messages
received.

We also introduce a modified flag to decide whether to display the
edited notice or not. This is useful since now we are computing
the edited notice values even when messages are not edited, and
hence we show the notices only when the modified flag is true.
2024-02-12 10:51:12 -08:00
Varun Singh e4c6476c57 ts: Update extension of recently migrated '.js' files. 2024-02-12 09:49:54 -08:00
Varun Singh 5f9b6d82a4 typing_events: Convert module to TypeScript. 2024-02-12 09:49:54 -08:00
Varun Singh bec806db18 typing_events: Refactor 'narrowed_by_topic_reply' conditional.
Fetching narrow 'stream_id' and 'topic' into variables will
help with upcoming type assertion.
2024-02-12 09:49:54 -08:00