Commit Graph

3446 Commits

Author SHA1 Message Date
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
Varun Singh fc86aca769 scheduled_messages: Make ScheduledMessage type more precise.
Typing 'ScheduledMessage' as union of 'private' and 'stream' scheduled
message types will help with upcoming type inference.
2024-02-06 22:25:55 -08:00
Varun Singh 3d23b39793 scheduled_messages_feed_ui: Fix false/empty array type confusion.
This looks to be a mistake resulting from moving this line out of the
filtering loop just below.
2024-02-06 22:25:55 -08:00
Prakhar Pratyush 2055dfa83e support: Add support to configure fixed-price plan with pay-by-invoice.
* Manually create & send invoice
* Configure a fixed-price plan with sent invoice-id.
* When customer pays, upgrade them to concerned plan.
2024-02-06 18:43:23 -08:00
Prakhar Pratyush 79a1b3b80e billing: Show annual data for fixed-price plan, by default.
On /upgrade page, we show annual schedule & price for a
fixed-price plan, by default.

This also acts as a prep commit for fixed-price plan
with pay-by-invoice collection method as we only offer
annual plan in such case. So, annual data is shown by default
on /upgrade page.
2024-02-06 18:43:23 -08:00
David Rosa 8e92b54df1 help: Update external links to "Bots overview" help center page.
The page was renamed and thus this will avoid an unnecessary redirect.
2024-02-06 18:22:57 -08:00
Tim Abbott f4ad102d39 narrow_state: Add pm_ids_set helper.
This provides a more easy to work with model of which users, if any,
are involved in the current DM conversation, if any.
2024-02-06 14:44:09 -08:00
Tim Abbott 772ed724c0 peer_data: Extend get_subscriber_count to allow excluding bots.
The new buddy list code path will want to be able to do this.
2024-02-06 14:44:09 -08:00
evykassirer a46c4f7b7e people: Gracefully fail for invalid users in user_is_bot.
Many of these code paths largely expect it to be a valid user ID, so
we could raise an exception if the user ID is invalid, but probably
gracefully proceeding is reasonable for the callers.
2024-02-06 14:44:09 -08:00
Tim Abbott f55ee266b7 message_list_view: Ensure render window IDs are integers.
The previous logic threw confusing exceptions if, during
testing/debugging, one picked an odd render window size.
2024-02-05 23:17:43 -08:00
Tim Abbott a8698c08ca navigate: Correct handling of limited fetched content.
This correctly avoids pageup/pagedown scrolling past already rendered
content, while also always making progress, which the previous logic
introduced in d8ec141de2 might do, at
least in degenerate cases with very small render windows.

I'm not sure this change has any effect in practice with current
render window values, but it does fix a bug if I set the maximum
render window size to 20.
2024-02-05 23:17:43 -08:00
Tim Abbott b9af5ce86e unread: Fix process_visible race with fetching.
The previous batch of improvements to this code path in
6562ea94e4 introduced a race bug where:

- You navigate to a narrowed view; Zulip renders cached data from
  `all_messages_data` that we know is current, but
  `fetch_status.has_found_newest` is initialized to `false`
  nonetheless.

- The bottom is visible, triggering the check for whether the view
  should be marked as read.

- `fetch_status.has_found_newest` is still `false`, and so we
  incorrectly refuse to mark as read.

- We finish fetching data from the server, do the background rerender
  for that (with no changes), but that doesn't trigger a re-check for
  whether the bottom is visible.

There's several ways to address this, but most correct to me is to not
check fetch_status in this particular code path.

The same reasoning applies to the navigate.js call sites.
2024-02-05 23:17:43 -08:00
roanster007 49e3e6da06 timerender: Fix get_timestamp_for_flatpickr when no parameter passed.
Previously, when no parameter was passed to the get_timestamp_for_
flatpickr method, it would result in an uncaught exception. This is
breaking the "Add global time" of compose bar.

This can be avoided by doing an early return of current time to hour
in case no string is passed.
2024-02-05 12:33:39 -08:00
roanster007 d971b36026 timerender: Extract get_current_time_to_hour helper.
We will reuse this in the next commit.
2024-02-05 12:33:13 -08:00
Aman Agrawal 37b0f59200 reactions: Rename `get_reaction_section`.
We pluralize it to indicate that it can return multiple row from
multiple lists / rows.
2024-02-05 11:06:46 -08:00