Commit Graph

48359 Commits

Author SHA1 Message Date
Aman Agrawal ef21f9107c urls: Move /hello files to the corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal 07f0104714 urls: Move /security files to the corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal 8da5368529 url: Move /self-hosting pages to the corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal c908c9b497 urls: Move /why-zulip pages to the corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal d15158e76b urls: Move /history files to the corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal c9ac233911 urls: Move /team files to the corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal 349bac4751 urls: Move /attribution files to the corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal 7cd8bcd004 urls: Move /development-community files to corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal 9ce7a784e7 urls: Move /apps files to corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal 4a9b4fb91b urls: Move /features files to corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal a5d7a334c4 urls: Move /plans files to corporate folder. 2022-08-22 15:53:43 -07:00
Aman Agrawal afd31b739d templates: Move case-studies and /for pages to corporate folder.
Since these pages don't belong in a self-hosted server.
2022-08-22 15:53:43 -07:00
Aman Agrawal 21a2fd482e portico: Move to corporate folder.
Since the URLs that use these function are present in corporate/urls,
this file belongs in the corporate folder.
2022-08-22 15:53:43 -07:00
Aman Agrawal 4b6df8a678 home: Only serve landing page at root domain on corporate servers. 2022-08-22 15:53:43 -07:00
Aman Agrawal e54ded49c4 urls: Move URLs that don't belong on self-hosted servers to corporate URLs.
Use absolute URLs for these links in files which will be served
to self-hosted servers.
2022-08-22 15:53:43 -07:00
Aman Agrawal f1a1868de8 urls: Remove duplicate developer-community redirect.
Exactly same call exists below this with a comment.
2022-08-22 15:53:43 -07:00
Zixuan James Li db92033b23 typing: Tighten type annotations for patch_queue_publish.
Since this decorator is only used for methods of
TestServiceBotEventTriggers, we can type the decorated method's
signature accurately without using ParamSpec.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-08-22 15:46:16 -07:00
Zixuan James Li 32a77fc0bf test_helpers: Move patch_queue_publish to test_service_bot_system.
This prepares us to tighten the type annotations for this helper.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-08-22 15:46:16 -07:00
Zixuan James Li 30536caa68 typing: Remove FuncT.
We can express the type of these decorators with Concatenate and ParamSpec
now for tighter type annotations.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-08-22 15:46:16 -07:00
Zixuan James Li 21fd62427d typing: Remove ViewFuncT.
This removes ViewFuncT and all the associated type casts with ParamSpec
and Concatenate. This provides more accurate type annotation for
decorators at the cost of making the concatenated parameters
positional-only. This change does not intend to introduce any other
behavioral difference. Note that we retype args in process_view as
List[object] because the view functions can not only be called with
arguments of type str.

Note that the first argument of rest_dispatch needs to be made
positional-only because of the presence of **kwargs.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-08-22 15:46:16 -07:00
Israel Ebonko 1f286ab283 integration: Add wekan integration.
Fixes #13086

Co-authored-by: Ganesh Pawar (ganpa3) <pawarg256@gmail.com>
2022-08-22 15:37:22 -07:00
Ganesh Pawar 544e472ec3 user profile modal: Don't close settings when opening modal.
Fixes #22572.
2022-08-22 15:32:18 -07:00
Zixuan James Li 965ed728e1 type_debug: Remove type_debug.
This module was originally introduced in 2016 to assist adding mypy
annotations to the project. Back then static type checking was not that
established throughout the codebase, so it was helpful to be able to
print out the types for type checking purposes.

This workflow is no longer helpful for improving type annotations right
now, and it has been unused for a while.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2022-08-22 13:19:09 -07:00
Sahil Batra cb15767df3 settings: Update label for realm-level default of send_read_receipts. 2022-08-20 15:38:34 -07:00
Anders Kaseorg 3e7d7ee86a integrations_dev_panel: Remove unused idempotent flag.
Followup to commit fde9b1d366 (#22753).

(This was a misuse of “idempotent”.  “Idempotent” means that
performing the request more than once in a row has the same effect as
performing it once; it says nothing about whether the response is
cacheable.)

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-19 16:45:09 -07:00
Anders Kaseorg d923096882 channel: Remove pending_requests list.
It’s been unused since commit 2eacc7317d
removed the only caller of abort_all and commit
ef815e9e79 removed abort_all itself.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-19 12:17:40 -07:00
Anders Kaseorg c84f35644d channel: Stop monkey-patching password change counts into XHR objects.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-19 12:17:40 -07:00
Anders Kaseorg fde9b1d366 channel: Remove idempotent retry loop.
This was added by commit 7f174213ed, and
appears to have been designed for responses that are *successful* but
falsy. Logically, these should not implicitly represent a failure to
be retried if it were.

Note from tabbott: The background is that this idempotent retry loop
was a hacky workaround for a bug we never understood but saw daily in
production. Especially during server restarts / client reloads,
something would result in 200 responses with no data being seen by the
frontend, despite the Django server not having received/processed the
request. Fortunately, this strange failure mode appears to have
stopped happening in late 2019, so we can delete this hack.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-19 12:14:41 -07:00
Anders Kaseorg 4391bc324b node_tests: Remove unused message_lists mock from dispatch test.
It became unused in commit b8661b6633
(#22452).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 22:27:24 -07:00
Tim Abbott bc0ca5f769 read_receipts: Fix rendering of avatars for some Gravatar users.
The previous logic was just using the `.avatar_url` field on objects
returned by `people.js`, which can be null/undefined.
2022-08-18 18:10:06 -07:00
Anders Kaseorg 89d22d143c message_edit: Repair incorrectly moved with_first_message_id function.
Commit 9aa5082d63 (#20673) incorrectly
changed the name of the error callback passed to channel.get.  This
prevented reporting of errors while moving a topic.  Fix it.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 17:39:25 -07:00
Anders Kaseorg 7200c9f8e4 zjsunit: Support asynchronous overrides.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 16:21:04 -07:00
Anders Kaseorg b0dba411d9 js: Skip redundant jQuery object reconstruction.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 16:11:13 -07:00
Julia Bichler 33c790e2fc message_edit: Return a bool in maybe_send_resolve_topic_notifications.
Whether we sent a resolve topic notification or not may be useful in
the caller. It was originally intended to be used in #21712, but may
only be relevant for future logging.

Part of #21712.
2022-08-18 15:39:23 -07:00
Julia Bichler 83254a3d79 message_edit: Check resolve topic notifications earlier.
This will have no real effect in most situations. However, a user
moves a topic to another stream while also adding/removing the
resolved-topic checkmark from the topic name, then the "This topic was
resolved" notificaiton will now appear just before the "This topic was
moved" notification rather than just after.

This is likely slightly less confusing to users, since the topic
having been moved from somewhere else is likely the most salient fact
to a reader.

We expect to change things to not send both notifications in an
upcoming commit.

This refactoring helps with #21712.
2022-08-18 15:39:17 -07:00
evykassirer 747ea8e84d copy-paste: Fix edge cases on message selection for copying.
When we detect that multiple messages are selected, copying will copy the
entirety of each message that is selected. [more conversation on that
here](https://chat.zulip.org/#narrow/stream/6-frontend/topic/triple.20click.20.2B.20copy.20paste.20bug/near/1398292).

This commit fixes a bug where we would select the entirety of a message
following a selection even when none of that last message's text was
selected (only some HTML element in the messages's container).

Fixes #18706.
2022-08-18 15:20:21 -07:00
evykassirer 96b2e18b0d copy-paste: Separate intial_end_tr logic into its own function.
Creates a new function get_end_tr_from_endc. This will make it
easier to add more logic to this function to fix a bug (#22350).
2022-08-18 15:20:21 -07:00
evykassirer 358416349e copy-paste: Stop treating selections with extra whitespace as multi-line.
A message selection that goes off the end of the last message in a topic
could still be a selection of only one message. We shouldn't assume that
it's multiple messages, and so there shouldn't be an assignment of
`skip_same_td_check = true`.
2022-08-18 15:20:21 -07:00
Tim Abbott 303bbee2a2 message_lists: Remove cases for table_name being undefined.
The table_name property was only ever undefined for the
special all_messages_list object.

In 6f764ce4b3, we downgraded that object
to only have a MessageListData; as a result, we now never construct a
MessageList or MessageListView without `table_name` set correctly.
2022-08-18 12:30:30 -07:00
Aman Agrawal b8661b6633 message_lists: Add a function to return rendered message_lists.
This function returns home message_list and the current narrowed
message_list if it is different than home.
2022-08-18 12:30:30 -07:00
Aman Agrawal 9a282ff9ad message_fetch: Refactor stub into the mocked `MessageListView`. 2022-08-18 12:30:30 -07:00
Aman Agrawal 5f127c85f7 recent_topics_ui: Set current msg_list to home when RT is visible.
`current` should ideally be `undefined` here to reflect the
correct narrow state but to make sure background updates of
message_list go smoothly, we set it to home.
2022-08-18 12:30:30 -07:00
Mateusz Mandera 2c693f3bd9 billing: Fix licenses amount check during user signup/invitation.
Our seat count calculation is different for guest user than normal users
(a number of initial guests are free, and additional marginal guests are
worth 1/5 of a seat) - so these checks we apply when a user is being
invited or signing up need to know whether it's a guest or non-guest
being added.
2022-08-18 11:56:54 -07:00
Mateusz Mandera a41cecb695 billing: Extract get_seat_count function.
This is a simple generalization of get_latest_seat_count and is useful
for calculating "what will be the realm's license count if this
number of (guest) users is added?" without duplicating any of the math
logic. Will be used in the next commits.
2022-08-18 11:56:54 -07:00
Mateusz Mandera 6582a002e7 billing: Add comment about the calculation in get_latest_seat_count.
Our billing FAQ says:
"For an organization with N other users, 5*N guest users are included at
no extra charge. After that, you will be charged at 1/5 of your regular
per-user pricing for each additional guest.".

It wasn't quite intuitive to me that
max(non_guests, math.ceil(guests / 5)) achieves that pricing, so it's
worth mentioning in a comment that it does and that that's why that
formula is used.
2022-08-18 11:56:54 -07:00
Sahil Batra 5cc5d15de1 settings_org: Reuse code to enable or disable delete limit setting.
This commit reuses set_delete_own_message_policy_dropdown to enable
or disable the time limit settings based on change in
delete_own_message_policy dropdown.
2022-08-18 11:50:50 -07:00
Sahil Batra 3a6de60fe0 settings_org: Pass value to set_delete_own_message_policy_dropdown.
This is a prep commit for deduplicating code and using this same
function set_delete_own_message_policy_dropdown for disabling or
enabling the limit setting while changing policy dropdown.
2022-08-18 11:50:50 -07:00
N-Shar-ma 87cb449d08 search_suggestions: Fix bug where space in stream names did not show.
For multi word stream names, searching for particular phrases, like
the entirety of any word in it, caused no space to show before and/or
after that word. For example, searching for `core` resulted in
`**core**team` (the space between `core` and `team` missing).

The cause of this bug was that the immediate container was `div` with
`display: flex` and so spaces at the ends of its immediate child
elements: text nodes and `strong`  elements - were not respected. This
is fixed now by wrapping all the `description_html` text in a `span`
element (while the optional user_pill_context stays in another `span`
as before).
2022-08-18 11:22:08 -07:00
Anders Kaseorg dad0d51ada node_tests: Reenable asynchronous event_status test.
Fixes #20180.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 08:55:31 -07:00
Anders Kaseorg a4a233b189 zjsunit: Support asynchronous tests.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-08-18 08:55:31 -07:00