Commit Graph

3660 Commits

Author SHA1 Message Date
Sahil Batra 79975ae27e group_settings: Refactor code to handle tabs in right section.
We now use "data-group-section" attribute to set the "key" for
toggler in right section of groups overlay.

This change is preparatory work for showing the section opened
in right side in the url hash as we would use the "key" value
in url hash as well and the existing "group_general_settings"
and "group_member_settings" toggler key values were too long to
be used in the url. We previously used toggler key value as
class name and then used that class as selector to show the
relevant section but we now use "data-group-setting" section
to avoid using common class names like "general" and "members".
2024-02-22 13:09:33 -08:00
Sahil Batra e40846ef4e user_group_edit: Do not pass unused parameter to function.
There is no need to pass group as parameter to
update_toggler_for_group_setting.
2024-02-22 13:09:33 -08:00
Anders Kaseorg ac166dcfd4 dependencies: Upgrade JavaScript dependencies.
Fixes #26969.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-22 12:46:40 -08:00
Sayam Samal 9a12d1798e read_receipts: Fix duplication bug when opening menu repeatedly.
The (1) delay in fetching the read receipts data from the api call to
`/json/messages/${message_id}/read_receipts`; followed by the execution
of the success callback function, and the (2) use of `.append()` to
render the modal and user list, together lead to duplication of the read
receipts modal and also the user list inside the read receipts menu.

This commit adds a check to set the read receipts menu contents only if
the read receipts modal for the selected message ID is open by the time
the network request is resolved.

In addition, this commit also uses the `on_shown` hook instead of the
`on_show` hook in the read receipts modal logic, to add a delay in the
calling of the read receipts API, which prevents the stacking of the
requests.
2024-02-22 10:49:29 -08:00
Sayam Samal ece115c22d hotkey: Reorder "Edit selected message or view source" in ? and /help. 2024-02-22 10:49:29 -08:00
Sayam Samal eae148b67a hotkey: Add `Shift` + `V` shortcut to toggle read receipts modal.
The read receipts option, resides under the triple-dot message actions
menu. This made the process of viewing the read receipts take up
multiple steps, even via a keyboard-driven workflow.

Via this commit, now while focused on any message in a message feed,
and pressing `Shift` + `V`, efficiently brings up the read receipts
for that message.

Fixes part of #24716.

Co-Authored-by: SameepAher <sameepaher@gmail.com>
2024-02-22 10:49:29 -08:00
evykassirer b30f6bb705 user_search: Convert module to typescript. 2024-02-21 19:14:02 -08:00
evykassirer 860150525c sidebar_ui: Convert module to typescript. 2024-02-21 18:50:51 -08:00
evykassirer 134c5a8315 sidebar_ui: Add missing param to should_mask_unread_count. 2024-02-21 18:50:51 -08:00
evykassirer b609d3d88e base_page_params: Add realm_rendered_description. 2024-02-21 18:50:51 -08:00
Karl Stolley ecbfd61e6a left_sidebar: Remove padding from bot icon.
This is no longer necessary for vertical alignment, and by
removing the 6px of padding it represents, bot DM rows will have
the same 22px height as other DM rows.
2024-02-21 13:14:02 -08:00
Tim Abbott 2598596ad2 vdom: Eliminate undefined type declaration for impossible case.
This was just debugging logic working around the fact that vdom.ts was
not originally implemented in TypeScript, and should not be polluting
our types.
2024-02-21 10:49:24 -08:00
evykassirer aab25fae6a pm_list: Convert module to typescript. 2024-02-21 10:49:24 -08:00
Karl Stolley 1093ff841f left_sidebar: Remove unnecessary padding on bot icon. 2024-02-21 10:32:02 -08:00
Lauryn Menard 16135fbac6 support: Clean up class names in support views.
Updates the class name used for the sponsorship form container in
the remote support views to be more specific.

Adds a shared "support-form" class for the different forms in the
realm_details template.

Use the same CSS rule for current and next plan information sections.
2024-02-21 10:28:08 -08:00
Prakhar Pratyush ee612dafac settings: Rename signup_notifications_stream realm setting.
This commit renames the realm-level setting
'signup_notifications_stream' to 'signup_announcements_stream'.

The new name reflects better what the setting does.
2024-02-21 09:04:23 -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
shashank-23002 d6219e93a8 popover: Rename user-card-status-text. 2024-02-20 18:10:38 -08:00
shashank-23002 6caacbcd07 tooltips: Fix status-emoji tooltip for user-card popover.
This tooltip seems to have been broken when #user_info_popover was
renamed to the user card popover.
2024-02-20 18:10:38 -08:00
shashank-23002 865f886f56 tooltips: Add a dedicated tooltip for status-emoji.
Fixes: #26772
2024-02-20 18:10:38 -08:00
Lauryn Menard b9c4a8a811 support: Add CSS formatting for form areas on support views. 2024-02-20 15:46:55 -08:00
Lauryn Menard b6d50c158d support: Add CSS grid for confirmation objects in query results. 2024-02-20 15:46:55 -08:00
Lauryn Menard b74a8a5ff5 support: Add CSS grid for user and user realm. 2024-02-20 15:46:55 -08:00
Lauryn Menard 8c5325fc2c remote-support: Add CSS grid for remote server and remote realms. 2024-02-20 15:46:55 -08:00
Lauryn Menard 439e88e251 support: Remove relative positioning for form elements.
Prep commit for adding a grid layout for some query response data.
2024-02-20 15:46:55 -08:00
Aman Agrawal e6718369d6 css: Apply fa-chevron-down CSS to zulip-icon-chevron-down.
This was missed as part of #27577 migration.
2024-02-20 15:16:56 -08:00
N-Shar-ma 8002f0db8f compose: Fix bug where sometimes message draft remained post sending it.
Now whenever we initiate sending a message, we save / update its draft,
which is deleted on a successful send. Earlier, we did this only for
locally echoed messages. Hence a non locally echoed message's draft
would remain, if created in the timeframe between initiating send and
receiving the same message from the server, which can be significant
for slow connections.
2024-02-20 11:59:46 -08:00
Aman Agrawal 90e67f7d75 upgrade: Fix spacing issue for fixed plan upgrade page. 2024-02-20 11:51:32 -08:00
Aman Agrawal 949379581e billing: Add separate entry point for billing login pages.
We just exclude upgrade.ts from the imports to avoid page_params
being imported which results in an error.

s
2024-02-20 11:51:32 -08:00
shashank-23002 5803d4afec clipboard: Align click to copy button inside spoiler tag.
Fixes: #20712
2024-02-20 10:18:43 -08:00
Aman Agrawal 0c6dfd1e5e message_actions_popover: Select message being moved.
This helps keep the content of this message in the move messages
modal relevant.
2024-02-20 09:29:26 -08:00
Aman Agrawal 4d1bb762be css: Add 25px to content width on right for chevron-down icon.
This fixes chevron-down icon overlapping with content when content
occupies full width of the select element.
2024-02-20 09:29:26 -08:00
Varun Singh c91ca3eca8 message_live_update: Convert module to TypeScript. 2024-02-20 08:30:04 -08:00
Varun Singh 5fd6a819d4 message_lists: Add 'rerender_messages' function to type. 2024-02-20 08:30:04 -08:00
Varun Singh d432b5e36a message_lists: Add 'rerender_view' function to type. 2024-02-20 08:30:04 -08:00
evykassirer 23795ca153 message_edit_history: Convert module to typescript. 2024-02-19 21:39:40 -08:00
evykassirer a8be874f70 state_data: Add realm_allow_edit_history. 2024-02-19 21:39:40 -08:00
Anders Kaseorg cc8a4636ba namespace: Prevent direct mutation of ES modules in tests.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-19 21:20:35 -05:00
Anders Kaseorg 10892f1d60 tests: Fix direct mutation of ES modules again, again.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-19 21:20:35 -05:00
Karl Stolley 29dd61c20c bootstrap: Remove pre styles.
Happily, every last CSS property in these styles is already
described for the places <pre> appears in the Zulip UI:

1. In rendered message markdown
2. In the compose preview
3. In the information overlay (Message formatting)
2024-02-19 18:15:26 -08:00
Anders Kaseorg 2c799125ea bundles: Remove unnecessary imports of effect-free modules.
Some of these may have once been necessary to enforce an ordering on
cyclic imports, but we’ve fixed all of those now.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-19 17:55:40 -08:00
Karl Stolley 384e28c8e2 bootstrap: Remove li style.
The `line-height` value is set to `inherit` in zulip.css, rendering
this line moot. `inherit` will always force list items to take
their line height from the nearest ancestor that sets one.
2024-02-19 17:53:50 -08:00
Karl Stolley 6073507230 bootstrap: Remove q styles.
There is no evidence of the <q> (quote) element in use in the
Zulip UI, nor that any of the Python-Markdown syntax generates them
either.
2024-02-19 17:51:10 -08:00
Anders Kaseorg 976987f9a3 webpack: Remove extraneous inclusions of page_params.
Commit a4938d3760 (#28971) fixed the
order-sensitivity of these modules, so it suffices to just import them
where they are used.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-19 15:10:02 -05:00
Aman Agrawal f6b1fe9f36 billing: Remove unused page_params on event_status page.
a4938d3760 introduced assertions
for page_params for which they were used. This caused the
assertion to fail on event_status page making the page not work.
Removed the page_params from running on event_status page to fix it.
2024-02-19 08:41:34 -08:00
Anders Kaseorg e568064f4e page_params: Set and expect state_data = null for spectators.
Fix a ZodError when spectators load the app, introduced by commit
a4938d3760 (#28971).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-19 03:03:58 -05:00
Anders Kaseorg a5c055ae82 state_data: Rename Term type to NarrowTerm.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-17 00:02:38 -08:00
Anders Kaseorg a4938d3760 page_params: Parse page_params and state_data with Zod.
This establishes a runtime check that their types continue to reflect
reality going forward.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-17 00:02:38 -08:00
Sayyed Arib Hussain 8e39123839 message_view_header: Manage no description in message_view_header.
This commit modifies the behavior of the message view header
when a stream's description is empty. Previously, it displayed
"(no description)". With this change, if the user is an admin
or owner (i.e., has permission to update the description), it
will now display a "Add description" link to the settings. If
the user does not have these permissions, it will display nothing.

Fixes #28851

Signed-off-by: Sayyed Arib Hussain <sayyedaribhussain4321@gmail.com>
2024-02-16 15:41:27 -08:00
Anders Kaseorg ac68996ac3 sentry: Avoid early reads from state data.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-16 15:12:42 -08:00
Aman Agrawal 176c15f74b billing: Redirect user to login page if session expires.
If user makes an AJAX request but their session is expired, we
redirect user to the login page.
2024-02-16 14:56:26 -08:00
Anders Kaseorg a68c96231f stats: Fix types for upload_space_used, guest_users parameters.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-16 17:39:45 -05:00
Anders Kaseorg b5702422ed page_params: Remove max_message_id from type.
As of commit fd2ad130f9 (#28930) this is
popped in ui_init.initialize_everything now.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-16 17:35:11 -05:00
Sohaib-Ahmed21 d2bc94a724 invitations: Improve text in resend confirmation modal.
Importantly, this clarifies that this is useless for expired invites.

Fixes: #28829
2024-02-15 17:31:31 -08:00
Pratik 4f89a0f605 user_profile: Add "copy link to profile" button in user_profile_modal.
This commit adds a "copy link to profile" button in user_profile_modal.
Clicking on this button copies the user's profile link and displays a
"Copied!" tooltip.
2024-02-15 17:17:38 -08:00
Pratik cad051e5a6 user_profile: Enable dynamic URL generation for "View profile" option.
Clicking on "View profile" option now dynamically generates a URL,
allowing the user profile modal to open. Upon closing the modal,
the URL is reverted back to one that was active before the modal
was opened.

Additionally, It displays a profile access error modal when a user
attempts to either view an inaccessible profile or when an invalid
user id is present in the URL.

Fixes #28445.
2024-02-15 17:17:38 -08:00
Tim Abbott 76e86bc8fa team: Update for zulip-android-legacy repository rename. 2024-02-15 16:52:23 -08:00
afeefuddin a41c39db26 portico-team: Rework repository on team page
Fixes: #28504
2024-02-15 16:52:23 -08:00
Aman Agrawal 16868c39a5 navbar: Restructure navbar items. 2024-02-15 16:18:34 -08:00
sayyedarib 5c993f0479 direct_message: Allow DMs to bots and self regardless of policy.
Previously, in DM disabled org messaging to bot was not working when
starting new conversation and adding bot as recipient because of not
updating on recipient change. And secondly, self messaging was not
allowed.
This commit ensures that the DM to bot and self are allowed irrespective
of dm restrictions.

tests: Verify DMs adhere to DM restriction policy.

Fixes #28412

Signed-off-by: sayyedarib <sayyedaribhussain4321@gmail.com>
2024-02-15 16:13:36 -08:00
Karl Stolley 22b4ec09fa css: Extract CSS variables into own file. 2024-02-15 15:50:25 -08:00
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
Varun Singh 0ec622c5f4 typing_events: Refactor 'get_key' function.
The function body contains only two conditionals, so the
'switch' statements can be replaced with simple 'if's that
return immediately, thus making the code block cleaner.
2024-02-12 09:49:54 -08:00
Varun Singh c8f135b97a page_params: Add typing notifications constant to type. 2024-02-12 09:49:54 -08:00
evykassirer d3b5a76a67 stream bar: Convert module to typescript. 2024-02-10 07:07:08 -08:00
evykassirer 49d79730b8 resize: Convert module to typescript. 2024-02-09 21:17:16 -08:00
evykassirer 4d6cfcb0ff resize: Remove unused return value of resize_sidebars. 2024-02-09 21:17:16 -08:00
evykassirer 781387781b resize: Don't pass unused value to resize_bottom_whitespace. 2024-02-09 21:17:16 -08:00
evykassirer d913ab1e3c resize: Fix buggy check for #stream_settings element. 2024-02-09 21:17:16 -08:00
Tim Abbott 3f7b26d8bd message_notifications: Shorten other users string.
This makes it more likely to not be truncated.
2024-02-09 18:03:29 -08:00
Aman Agrawal 7bab31068a message_notification: Set title based on length of title.
Including content length in this calculation doesn't make sense.
2024-02-09 18:03:29 -08:00
Aman Agrawal 192306f9ee notification: Use display_recipient to get other_recipient length. 2024-02-09 18:03:29 -08:00
Aman Agrawal 2d2e2f8882 message_notifications: Translate private message content. 2024-02-09 18:03:29 -08:00
Tim Abbott b975301e84 notifications: Remove custom truncation logic.
This logic was part of the original desktop notifications
implementation in 4cb0c6225e.

There's no apparent standard for the number of characters allowed to
be shown in a desktop notification, so truncating at 150 characters
arbitrarily seems wrong.

Further, we've decided it's no longer a priority to truncate at word
boundaries, we can rely on the browser to take responsibility for
truncation.

Fixes #25260.
2024-02-09 17:27:59 -08:00
Tim Abbott 27deebe45b click_handlers: Remove dead code for Bootstrap popovers. 2024-02-09 17:06:03 -08:00
Tim Abbott e17e231b2a stream_popover: Remove dead unsub code.
This seems to have been dead since it was introduced in
64079b382f.
2024-02-09 17:06:03 -08:00
sanchi-t edf8b13430 stream_popover: Hide popover when clicked on `unsubscribe`. 2024-02-09 17:06:03 -08:00
Rinwaoluwa fbe7285af8 left_sidebar: Remove export in deselect_top_left_corner_items.
It is safe to remove the export, because
deselect_top_left_corner_items isn't called anywhere else outside the
file.
2024-02-09 15:53:05 -08:00
Rinwaoluwa afe3bcd6c5 left_sidebar: Simplify deselection with deselect_top_left_corner_item.
Refactoring to avoid duplication, improve readability, and standardize
deselection logic by converting calls to remove to
deselect_top_left_corner_items.
2024-02-09 15:51:57 -08:00
Anders Kaseorg 497bd740e9 web: Replace Zod z.union with z.discriminatedUnion or .nullable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-09 18:48:20 -05:00
Tim Abbott d5281292d5 compose_ui: Clean up placeholder logic.
This removes messy indirection through email addresses in passing a
set of users between two modules.
2024-02-09 15:11:17 -08:00
Joydeep Bhattacharjee 264a9a1057 compose_ui: Convert module to typescript. 2024-02-09 15:11:17 -08:00
Tim Abbott 91bdcc9596 compose_ui: Use startsWith/endsWith helpers.
Suggested by @joydeep2001 in #28725.
2024-02-09 15:11:17 -08:00
Karl Stolley 0290642f1d plans: Use IntersectionObserver to handle subheaders. 2024-02-09 09:20:34 -08:00
Karl Stolley 7ea313c658 plans: Ensure linked comparison tables scroll into view. 2024-02-09 09:20:34 -08:00
Karl Stolley 960e29dc5a plans: Handle table widths in CSS. 2024-02-09 09:20:34 -08:00
Karl Stolley 5aa3615f4b plans: Add comparison-switcher logic and styles. 2024-02-09 09:20:34 -08:00
Karl Stolley 0e3699c3dc plans: Open up spacing around feature-cell text. 2024-02-09 09:20:34 -08:00
Karl Stolley 33fd82ead3 plans: Add comparison-tab buttons and icons. 2024-02-09 09:20:34 -08:00
Karl Stolley 7d2adda31c plans: Filter table based on active plans tab. 2024-02-09 09:20:34 -08:00
Karl Stolley 5031d7a06c plans: Avoid hover effect on header row. 2024-02-09 09:20:34 -08:00
Sahil Batra 0d25efd4a0 settings: Fix check_property_changed code for user access setting.
The proposed_val for "realm_can_access_all_users_group" setting
was always returning NaN value which resulted in the value
being included in request even when it was not changed or disabled
due to org not being on "Plus" plan. This resulted in a bug where
user was not allowed to change the "guest" indicator setting
on orgs without "Plus" plan.

For orgs with "Plus" plan there was no problem in changing the
setting but the save button was visible incorrectly if the setting
was set to the initial value.

This commit fixes both the bugs.
2024-02-08 11:03:47 -08:00
Sahil Batra 1d5a083869 admin: Remove unnecessary development_environment check.
The "Who can access all users" setting is not disabled for
organizations not on "Plus" plans in production because of
the "page_params.development_environment" check.

We do not need that check anymore as the feature is now
enabled in production.
2024-02-08 11:03:47 -08:00
Tim Abbott 20d90a6df6 portico: Fix subdomain check flickering with arrow keys.
The previous logic would treat navigating with the arrow keys, or
alt-tab, as a reason to clear the subdomain unavailable warning, and
would not necessarily check again immediately. Now just trigger off
changes in the input.

Instead, just trigger off actual changes in the value of the input.
2024-02-07 12:10:00 -08:00
Tim Abbott ea89a4c6f7 puppeteer: Disable flaky administrative UI test. 2024-02-07 09:45:27 -08:00
Tim Abbott d015a8ca52 typing: Pass the type parameter in typing requests.
Not passing this parameter is a deprecated way to do things.
2024-02-07 09:12:49 -08:00
Varun Singh e213d9505b typing: Convert module to TypeScript. 2024-02-07 09:12:49 -08:00
Varun Singh 391e2a8e01 typing_status: Use TypeScript unions for 'Recipient' type.
Typing 'Recipient' as union of 'stream' and 'direct' message type will help with upcoming type inference.
2024-02-07 09:12:49 -08:00
Varun Singh b64a9d6ae0 page_params: Add typing notifications constants to type. 2024-02-07 09:12:49 -08:00
Varun Singh 94558478df scheduled_messages_feed_ui: Convert module to TypeScript. 2024-02-06 22:25:55 -08:00
Varun Singh f0b8cc7865 scheduled_messages_feed_ui: Refactor to avoid duplicate function calls.
While this logic might seem to be different,
util.same_stream_and_topic would always return false when passed a
topic of undefined.
2024-02-06 22:25:55 -08:00