Commit Graph

54749 Commits

Author SHA1 Message Date
Anders Kaseorg 9552014047 models: Include explicit app name in ManyToManyField reference strings.
https://github.com/typeddjango/django-stubs/issues/1802

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-15 15:27:54 -08:00
Karl Stolley dd938911f7 compose_box: Set auto height on textarea in full screen. 2023-11-15 15:23:48 -08:00
Alya Abbott 681097fd43 docs: Update server roadmap documentation. 2023-11-15 12:46:10 -08:00
Karl Stolley 4493ee346d reactions: Set more explicit reaction-text setting. 2023-11-15 14:02:45 -06:00
Karl Stolley b374b21171 reactions: Set interactive hover delay on reaction Tippies.
This introduces a new INTERACTIVE_HOVER_DELAY of 425 milliseconds.
It's meant to be short enough that the tooltip's contents are
displayed without too much of a lag, but long enough that a quick
interaction--like +1'ing an existing emoji--happens without the
quick flash of the tooltip itself.
2023-11-15 14:02:45 -06:00
Karl Stolley 6fe49f93ad reactions: Redesign reaction button colors and style.
See CZO discussion:
https://chat.zulip.org/#narrow/stream/9-issues/topic/Reactions.20background.20color/near/1632171

Also:
https://github.com/zulip/zulip/pull/26580#issuecomment-1705734770

Co-Authored-By: Vlad Korobov <terpimost@gmail.com>
2023-11-15 14:02:45 -06:00
Karl Stolley ff9c931366 reactions: Nuke overwrought inherit declaration.
This is made unnecessary thanks to CSS variables.
2023-11-15 14:02:45 -06:00
Karl Stolley 534683a3ff reactions: Express reaction button colors as CSS vars. 2023-11-15 14:02:45 -06:00
Karl Stolley 474dcf60a2 reactions: Unify stream and DM colors, express as CSS vars. 2023-11-15 14:02:45 -06:00
Karl Stolley a929220d3c message_edit: Add styles for Save and Cancel buttons. 2023-11-15 10:41:51 -08:00
Karl Stolley 8bc12a4ee2 modal_buttons: Make exit button colors in to CSS variables. 2023-11-15 10:41:51 -08:00
Karl Stolley f1a79085eb message_edit: Build basic multi-line layout for message editing. 2023-11-15 10:41:51 -08:00
Karl Stolley 6890c9d171 left_sidebar: Place unread count right of All DMs icon.
Also set a CSS variable for header-icon widths in the left sidebar.

Fixes: #27559
2023-11-15 10:07:04 -08:00
Karl Stolley 614abd58be left_sidebar: Place unread count right of stream controls.
Fixes: #27380
2023-11-15 10:07:04 -08:00
Karl Stolley 335790dae8 left_sidebar: Add unread streams count to Streams header. 2023-11-15 10:07:04 -08:00
Tim Abbott 2e2997bd7d typing: Limit typing notifications in large streams. 2023-11-15 09:42:25 -08:00
Prakhar Pratyush f8a0035215 stripe: Move `make_end_of_cycle_updates_if_needed` to BillingSession.
Moves the 'make_end_of_cycle_updates_if_needed' function to
the 'BillingSession' abstract class.

This refactoring will help in minimizing duplicate code while
supporting both realm and remote_server customers.

Since the function is called from our main daily billing cron job
as well, we have changed 'RealmBillingSession' to accept 'user=None'
(our convention for automated system jobs).
2023-11-15 09:26:41 -08:00
Karl Stolley 5accf36115 recent_view: Correct icon alignment within rows. 2023-11-15 09:05:47 -08:00
Karl Stolley 17e87c9a20 compose_box: Fix regression on full-screen Preview areas. 2023-11-15 09:04:54 -08:00
Karl Stolley c5b7432cf2 compose_box: Maintain top alignment in Preview mode. 2023-11-15 09:04:54 -08:00
N-Shar-ma bdba280c3d typeahead: Include wildcard mentions in typeahead for small streams.
We refactor the code checking if wildcard mentions are allowed by
renaming the pre-existing function `wildcard_mention_allowed` to
`wildcard_mention_allowed_in_large_stream`, adding a new function
`is_recipient_large_stream`, then redefining `wildcard_mention_allowed`
to combine these two functions.

Fixes: #27248.
2023-11-15 09:02:34 -08:00
Aman Agrawal 27ffcc6576 bililng: Fix incorrect price per license on billing page.
There is a discrepancy between price per license shown on billing
and upgrade page for annual billing frequency due to difference
in methods used to calculate the amount.

To fix it, we use the same method on both the pages.

I didn't use the helpers.format_money directly here since that would
create a visual delay in showing the price per license which will
not be nice considering that will be the only thing on this page
being updated that way.

The stripe fixture used is same as
free_trial_upgrade_by_card--Customer.retrieve.3.json
2023-11-15 15:59:26 +05:30
Alex Vandiver 091e2f177b linkifiers: Match JS implementation to server implementation.
Since the server-side implementation no longer uses look-ahead
or (more importantly) look-behind, it is possible to exactly implement
in Javascript.  This removes a common class which would prevent local
echo.

This requires reworking the topic linking algorithm, to march the
server's as well.  The tests and behaviour are adjusted in so doing --
previously, the JS implementation would have linked `#foo` with a
`foo` regex on the linkifier, but the server implementation would not
have.
2023-11-14 20:43:39 -08:00
Alex Vandiver 70b20e9d2b markdown: Use \p{White_Space} equivalent for linkifier boundaries.
We do not use \p{White_Space} itself because re2 does not support it.
2023-11-14 20:43:39 -08:00
Alex Vandiver 549dd8a4c4 markdown: Expand prepare_linkifier_pattern to make it more legible. 2023-11-14 20:43:39 -08:00
Alya Abbott cc4c672773 docs: Improve Mobile push notification service documentation. 2023-11-14 17:16:31 -08:00
Alya Abbott ee8e792588 help: Add instructions for testing mobile push notifications. 2023-11-14 17:16:31 -08:00
Tim Abbott ffaa8b9ced changelog: Simplify mobile push notification service links. 2023-11-14 17:16:31 -08:00
Karl Stolley b2c2afe374 left_sidebar: Keep all DM container rows to same right margin. 2023-11-14 16:43:28 -08:00
N-Shar-ma 76a8c80b63 compose: Pass in stream_id to compose when editing scheduled message.
Earlier, we only passed in the stream name which isn't considered in
`compose_actions.start` when populating the recipient.

There was no visible bug since we first narrow to the correct stream and
then call `compose_actions.start`, but this was brittle since it would
not work if we open the compose box before narrowing.
2023-11-14 16:36:50 -08:00
Sayam Samal 06600028a5 send_later_popover: Use `.navigate-link-on-enter` for scheduled msgs.
We need to use the `navigate-link-on-enter` class for the scheduled
messages link in the popover, since it's a popover menu item with a
`href` attribute. The reason for using this class has been documented
in 246c1d7b4e.
2023-11-14 16:33:44 -08:00
Sayam Samal 0a487e4f92 popovers: Focus first option in send later popover when opened with kbd.
While opening the send later popover via the keyboard, we want to focus
the first text option, which is "Schedule message" at present. When the
popover is opened via mouse click, we want to keep the original behavior
of not focusing on any option.

Note: This is similar to the behavior of the message actions popover,
and hence this commit follows a similar pattern to add the focus.

Fixes: #27701.
2023-11-14 16:33:44 -08:00
Karl Stolley 6f8cac8077 compose_box: Better align and maintain alignment of topic marker. 2023-11-14 13:14:40 -08:00
Aman Agrawal d45a2bf35b stream_color: Increase contrast of stream icon color and background. 2023-11-14 12:23:10 -08:00
Aman Agrawal bbd49d4634 stream_color: Extract function to get corrected color. 2023-11-14 12:23:10 -08:00
kraktus 3de6ec0a59 sort_emojis: Prioritize perfect matches above all.
Currently we prioritize (even partial) realm emojis above all.
Including over perfect matches if the emoji is **not** a realm emoji.
The commit changes this behavior to prioritize perfect matches above all,
regardless of emoji category.

close https://github.com/zulip/zulip/issues/27545
2023-11-14 12:13:22 -08:00
Karl Stolley 5797381ea2 compose_box: Suppress send-area tooltips when vdots popover is open. 2023-11-14 12:10:38 -08:00
Karl Stolley fd8711023d compose_box: Move send-control-button Tippy logic to compose file. 2023-11-14 12:10:38 -08:00
Karl Stolley e82c875bc3 compose_box: Remove unreachable enter_sends cruft. 2023-11-14 12:10:38 -08:00
Prakhar Pratyush c76b3acce7 typeahead: Fix '@topic' not present when stream wildcard suggested.
Earlier, we suggested only the first matching wildcard mention,
irrespective of how many equivalent wildcard mentions match.

That logic leads to the exclusion of '@topic' suggestion whenever
a stream wildcard is suggested, which is not correct as
stream wildcards and topic wildcard are not equivalent.

This commit updates the logic to make the behavior of suggesting
only the first match valid for stream wildcard mentions only.
2023-11-14 12:09:16 -08:00
Prakhar Pratyush fb9e258a65 stripe: Add 'do_upgrade' method to the 'BillingSession' class.
This commit moves a major portion of the 'upgrade`
view to a new shared 'BillingSession.do_upgrade' method.

This refactoring will help in minimizing duplicate code
while supporting both realm and remote_server customers.
2023-11-14 12:07:26 -08:00
N-Shar-ma e18c180414 reload: Fix bug where stream input is unexpectedly cleared on reload.
Earlier, we preserved the stream name across reloads, and to restore the
compose state, passed that to `compose_actions.start`, which since
c3fe96a, considers the stream id, and not its name.

This caused a bug where on server initiated reload, the stream input
would not retain its value and be unexpectedly cleared.

This is fixed by preserving the stream id across reloads, instead of its
name, and passing that to `compose_actions.start` instead.
2023-11-14 12:05:14 -08:00
N-Shar-ma 4e35c78fd5 left-sidebar: Fix "New topic" button in stream popover.
Now we pass in the stream's id to `compose_actions.start()` (not its
name), so that the compose box opens with the correct stream selected.
2023-11-14 11:29:54 -08:00
Karl Stolley 994e29e1fc compose_box: Hide send icon when load spinner is showing. 2023-11-14 09:21:11 -08:00
Karl Stolley 0c95772f4e compose_box: Maximize clickable area on send-later vdots. 2023-11-14 09:21:11 -08:00
Karl Stolley 3201c7dfb5 compose_box: Extend use of send-control-button.
This uses `.send-control-button` to handle Tippies on those
elements (currently vdots and Drafts), and removes a confusing
compose-formatting class.
2023-11-14 09:21:11 -08:00
Karl Stolley 5bedbb14b4 compose_box: Rename message-control-button to send-control-button. 2023-11-14 09:21:11 -08:00
Alya Abbott acf5ba5432 help: Minor tweaks to Inbox and followed topics documentation. 2023-11-14 09:19:02 -08:00
Karl Stolley 41b61cfb3e compose_box: Don't fill Topic line on restored draft. 2023-11-13 12:45:13 -08:00
Karl Stolley 93d6bcef0e compose_box: Properly present Drafts button in all languages. 2023-11-13 12:45:13 -08:00