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.
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
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.
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.
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.
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.
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
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.
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.