This should now happen at the same time it did prior to this change,
without requiring the show_all_message_view wrapper to have any
business logic.
This fixes a potential scroll position bug in the event that
narrow.deactivate in fact calls itself recursively after a timeout.
We already do a very parallel construction in narrow.activate, so this
moves us towards being able to unify those code paths, while also just
being more readable by avoiding a small-but-important wrapper function
in hashchange.js.
I believe this fixes a bug where we were not saving scroll position in
browser history when navigating to "All messages" from another view.
Since at least 6ef0753a51, it's been the
case that narrow.activate already hides the inbox/recent views if
open, and the same is true for all messages.
Fixing the duplicate call is important in show_home_view, because
show_all_message_view relies on having an accurate value for whether the
recent/inbox views were already open in order to correctly update the
left sidebar.
Testing experimentally, removing the setTimeout seems to fix a visible
flicker when using Esc to navigate to "All messages" from the Inbox
view. That setTimeout has been moved around without real examination
since 5d79bb6a20 from early 2013; I
don't see any good reason why it would make be necessary only in the
"All messages" code path, and not when narrowing to any other view.
There's no good reason to have the caller of deactivate pass this
parameter in.
This effectively reverts a18b1662cb,
which did this as part of trying to avoid an import cycle, with a more
appropriate solution using the existing message_scroll_state module.
Importantly, it also means that we again wait for scrolls longer than
50ms to finish before opening All messages; I think this might fix a
regression.
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.
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).
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.