Commit Graph

57591 Commits

Author SHA1 Message Date
Alex Vandiver 30f71639f0 pg_backup_and_purge: Properly preserve needed base backups.
Without `FIND_FULL`, `wal_g delete before ...` will fail, rather than
delete a base backup which is needed by the delta backups after it.
By passing `FIND_FULL`[^1], we tell it explicitly that we're OK
preserving files before the specified one, as long as they are
necessary for the delta chain.

[^1]: https://github.com/wal-g/wal-g/blob/master/docs/README.md#delete
2024-04-12 11:39:54 -07:00
Alex Vandiver 936c2b54cb push_notifications: Use ignore_conflicts, over catching IntegrityError.
The IntegrityError shows up in the database logs, which looks
unnecessarily concerning.  Use `ON CONFLICT IGNORE` to mark this as
expected, especially since the return value is never used.
2024-04-12 11:36:40 -07:00
Alex Vandiver 9e28619727 zilencer: Fix typo in comment. 2024-04-12 11:36:40 -07:00
Alya Abbott ffdaf624f1 portico: Add quote to /for/research. 2024-04-12 11:34:58 -07:00
Alex Vandiver 9a682fb20a message_fetch: Take a REPEATABLE READ READ ONLY when fetching messages. 2024-04-12 09:35:10 -07:00
Pietro Albini 0f521fba41 video_calls: Add default password to zoom meetings.
The password will be included in the meeting link, so users won't have
to type it in manually. Example of the newly generated URLs:

https://DOMAIN.zoom.us/j/MEETING_NUMBER?pwd=ENCODED_PASSWORD

This improves the experience in Zoom organizations requiring
authentication for all meetings, as otherwise the waiting room is
forcibly enabled.
2024-04-12 08:49:08 -07:00
Kislay Verma 505d66afeb user_invite: Convert invite modal to tabbed format.
This commit converts the radio buttons (for
selecting email/link) to tab
components in the user invite modal.

The selected tab is in focus by default and arrow keys
can be used to toggle the selected tab.

Appropriate tooltips are shown when a tab is disabled.

Fixes #29392.
2024-04-12 08:23:00 -07:00
Jose Corte b41a116d42 onboarding: Fix formatting of registration page buttons.
This ensures that in the registration page the text does not overlap icons in any language.

Fixes #20563.
2024-04-12 08:15:24 -07:00
Aman Agrawal 402f589e76 user_topic_popover: Keep reference visible when popover is open.
In recent view and inbox view, we keep the topic visibility icon
visible when the topic visibility popover is visible.
2024-04-12 08:13:40 -07:00
Aman Agrawal 9a8ebf3a34 recent_view: Only normal show topic visibility indicator on focus.
This is now similar to how they behave in inbox view.
2024-04-12 08:13:40 -07:00
Aman Agrawal 8a807949df stripe: Disable free trial for customer with any plan in the past. 2024-04-11 21:57:33 -07:00
Aman Agrawal ed2de77895 stripe: Send invoice to customer at the start of free trial.
We send customer an invoice at the start of free trial, if customer
pays we upgrade them to the active plan at the end of free trial,
else we downgrade them and show a custom message on the upgrade
page regarding the current status.
2024-04-11 21:57:33 -07:00
Aman Agrawal 8715ead8bc stripe: Regenerate stripe fixtures with fixed tests.
Tests were broken since #29221 and #28875 didn't account for
other tests failing due to changed stripe data. Also, there
was a bug where we were not fetching the correct setup intent
and stripe session for the current test, it was fixed by narrowing
the fetch to the current customer.

Also, we now run `invoice_plans` in a `while` loop until
`next_invoice_date` is greater than the provided event_time. It
makes sense to generate all the invoices for a customer that
needs to paid by them when `invoice_plans_as_needed` is called
for a `event_time`.
2024-04-11 21:57:33 -07:00
Aman Agrawal 17c88de75d invoice_plans: Add comment to help with testing.
This will help us run invoice plans on a specific date. Having
this in comment here would save me time adding this every time.
2024-04-11 21:57:33 -07:00
Aman Agrawal a2e0c84a7e stripe: Remove unused parameter. 2024-04-11 21:57:33 -07:00
N-Shar-ma 633d814df9 upload: Rename variable `filename_url` to `syntax_to_insert`.
This variable holds the markdown syntax for a file that's to be inserted
into a message, hence the new name.
2024-04-11 16:52:33 -07:00
N-Shar-ma 7b7c52b7c9 copy_and_paste: Fix bug where an unlabelled image could be pasted twice.
This commit removes the unnecessary condition for a linked image to have
a label when checking whether to skip an image preview if its generating
link has already been copied.
2024-04-11 16:52:32 -07:00
N-Shar-ma 358bb6b342 message_view: For message sent by current user, always scroll into view.
Now whenever the bottom of the feed is visible, we always scroll to the
message/s just sent by the current user, updating the selected message
if necessary.

Scroll behaviour for messages sent by other users remains unchanged.

Fixes: #23298.
2024-04-11 16:39:58 -07:00
N-Shar-ma a7719184ad compose: Refactor code to combine 2 same if condition blocks into one.
The blocks were originally separated by some code for seemingly no
reason, so now the 2nd block is brought up and combined into the first.
An old irrelevant comment is also removed.
2024-04-11 16:34:33 -07:00
N-Shar-ma 94dc5723c6 compose: Scroll cursor at message's end into view when restoring draft.
When a long message is restored from a draft (or scheduled messages),
its end, and the cursor placed there, used to be out of view, giving the
impression that the message was not focused, when it actually was.

This is fixed by always scrolling the cursor into view.
2024-04-11 16:34:33 -07:00
Tim Abbott 1cd11a4c61 zulip_updates: Adjust formatting for initial updates. 2024-04-11 16:13:42 -07:00
Prakhar Pratyush bc0325922e commands: Add 'skip-delay' option to send_zulip_update_announcements.
This commit adds a 'skip-delay' option to the
'send_zulip_update_announcements' management command.

It will be useful for self-hosted servers after 9.0 upgrade to
avoid the 24 hour delay to receive update messages after group
DM is sent to the admins.

One can run the management command with the --skip-delay flag
to immediately send the update messages.
2024-04-11 16:13:42 -07:00
Prakhar Pratyush 30273403ea hooks: Add a send_zulip_update_announcements post deploy hook.
This commit adds a post upgrade hook to run the
'send_zulip_update_announcements' management command.

The aim is to improve UX for self hosters by sending
zulip updates as soon as the upgrade completes instead
of waiting for the cron to run.
2024-04-11 16:13:42 -07:00
Prakhar Pratyush 507d9c3281 test_zulip_update_announcement: Remove global announcements list used.
Earlier, we were using 'test_zulip_update_announcements' global
list in 'ZulipUpdateAnnouncementsTest' tests and extending
that list within tests.

The previous behaviour can lead to flaky tests depending on the
order in which individual tests are run.

This commit replaces the global list with an instance variable
'zulip_update_announcements' declared in setUp(). It resets the
variable to an initial value before executing each tests making
it independent of the order of tests execution.
2024-04-11 16:13:42 -07:00
Sayam Samal 610f46d74e actions_popover: Rename "View message source".
This commit renames "View message source" to "View original message".

The meaning of "original" in this context is very similar to what
source/source code means in software jargon, while being easier to
understand and translate for a non-tech savvy user.
2024-04-11 15:57:24 -07:00
Sayam Samal 27c85af6d9 message_controls: Remove view message source icon.
With this commit, if a user cannot edit or move his own message,
we no longer show the view message source icon.
2024-04-11 15:57:24 -07:00
Sayam Samal 7744c8b264 actions_popover: Fix content overflowing when the max-width is defined.
The simplebar core documentation, recommends to not style the element
initalising the simplebar at all and use an inner element instead.

Following the recommendation, we move the max-width property from the
popover tippy options, to the `.simplebar-content` element via the
`--popover-menu-max-width` custom property.

While doing so, we also simplify the max-width to `350px`, since the
responsiveness for smaller screen is already been taked care of in the
shared popover styling.

This prevents the issue where the content overflows and gets hidden
instead of wrapping, when the width of the popover reaches the set
max width (if any).
2024-04-11 15:57:24 -07:00
Sayam Samal f9ec17e78e popovers: Fix styling for multi-line menu options. 2024-04-11 15:57:24 -07:00
Sayam Samal 678a3eccab popovers: Fix width discrepancies in popover menus.
Following ca9b1060b7, we allow the content of popover menu items to
control the width of the popover.

While using `white-space: nowrap` works, we should instead use the
`max-content` intrinsic sizing so that, if necessary, we can still
provide a `max-width` to the popover which would then force the popover
menu content to wrap.
2024-04-11 15:57:24 -07:00
Sayam Samal ba64900373 popovers: Simplify popover menu top and bottom padding. 2024-04-11 15:57:24 -07:00
Sayam Samal f5bedd9501 hotkeys: Show Level 2 Shift key symbol for Shift key in popovers. 2024-04-11 15:57:24 -07:00
Sayam Samal 4105a38c1f popovers: Add minimum width to popover hotkey hints. 2024-04-11 15:57:24 -07:00
Sayam Samal dcb6252e57 popovers: Update popover hotkey hint colors. 2024-04-11 15:57:24 -07:00
Sayam Samal 19077fa1f6 actions_popover: Update icons for message actions menu options. 2024-04-11 15:57:24 -07:00
Sayam Samal 299aa7c39f popovers: Add hotkey hints support via a new handlebar template. 2024-04-11 15:57:24 -07:00
Sayam Samal 36e709c934 hotkeys: Rename adjust_mac_tooltip_keys to adjust_mac_hotkeys. 2024-04-11 15:57:24 -07:00
Sayam Samal 4b0e6ae3d8 actions_popover: Use the new "popover-menu" theme.
Fixes part of #28699.
2024-04-11 15:57:24 -07:00
Sayam Samal 422230e82d popovers: Add consistent tippy arrows which support all placements.
Added `tippy.js/dist/border.css` along with some custom CSS override,
to add arrows which inherit the border color and width of the popover,
while also supporting all placements.

Also consolidates the CSS styling of the popovers to the `tippy-box`
element, which is the recommended way to theme the element according to
https://atomiks.github.io/tippyjs/v6/themes/#creating-a-theme.
This further helps in unifying the styling of the popover and the arrow,
and prevents inconsistencies such as shadow of the popover being casted
onto the arrows.
2024-04-11 15:57:24 -07:00
Sayam Samal 6bf9c2bdfc popovers: Rename "navbar-dropdown-menu" theme to "popover-menu" theme.
Also renames the navbar dropdown related CSS terms, to their equivalent
popover related terms to accompany the name change of the theme.
2024-04-11 15:57:24 -07:00
Evy Kassirer 1fe66a238f
build_emoji: Make sure emoji names are supported.
Fixes #19398. (All the other parts were completed a while ago).
2024-04-11 15:36:20 -07:00
Shubham Padia c44450c054
settings_users: Reverse order of roles in role filters.
Fixes #29687.
2024-04-11 15:35:01 -07:00
Alex Vandiver a853b8849f install: Actually add --puppet-classes argument.
7187146422 only added it to the internal parsing and the help, not
the getopt invocation which would make the command accept the
argument.
2024-04-11 15:34:00 -07:00
tnmkr 536f2e09e2 invite_user_modal: Always show scrollbar.
We now always show the scrollbar in invite modal body if it is scrollable.
This avoids confusion and makes it clear that some options are out of view.

Fixes #29393.
2024-04-11 14:41:38 -07:00
Mateusz Mandera c9ca4e68e5 scim: Add config option to disable initial streams for guests.
When an organization (without open ability for anyone to join) invites a
guest user, the invitation prompts allows them to choose whether the
guest should be added to default streams or not. This is useful, because
since we don't have per-role default streams configs, they may want
default streams to be for full Members.

SCIM provisioning doesn't have this control, since a newly provisioned
user gets created via a direct do_create_user call, thus adding them to
the organization's default streams, with no workaround possible aside of
just getting rid of default streams in the organization.

To make provisioning guests in such an organization usable, we add a
simple config option to create them with no streams. It's configured by
adding
```
"create_guests_without_streams": True
```

to the config dict in settings.SCIM_CONFIG.
2024-04-11 12:28:26 -07:00
rht c77ed52fa9
slack import: Refer the archive file as a file or dir. 2024-04-11 12:05:56 -07:00
roanster007 0be93b8519 stream_settings: Fix error on stream setting update when compose closed.
Previously, when stream settings were updated, without opening the
compose box, assertion error were thrown.

This error was a result of a regression in compose_recipient, due to an
extra assert statement added during its typescript migration in
25ff0d4418.

This is fixed by removing the statement.
2024-04-11 11:28:55 -07:00
sujal shah dd91157993 integration: Split 'opened_or_update_pull_request' event type.
Modified the 'get_zulip_event_name' function to
differentiate between 'opened' and 'updated' actions
for pull requests within the 'pull_request' event type.
Created separate event types for 'opened_pull_request' and
'updated_pull_request'. Updated the 'EVENT_FUNCTION_MAPPER'
dictionary to include handlers for these new event types.
Adjusted the'get_opened_or_update_pull_request_body' function to handle
both 'opened' and 'updated' actions appropriately.

Fixes #29594.
2024-04-11 11:23:08 -07:00
Karl Stolley 7291f0a919 info_density: Set font size, line height vars in dev. 2024-04-11 10:25:03 -07:00
Varun Singh 9ad7a9f0be data: Restrict parameter type to not be undefined.
Since the type of request_method(AjaxRequestHandler) has
been extended in the previous commit.Consequently the 'data'
field of 'request_method' has to be typed such that it
satisfies this change.

Because request_method's type can also be 'typeof patch' which
does not accept undefined 'data' field, I haved 'omit'-ted
'undefined' from 'data's type in function signature to satisfy
TypeScript.

Now ,in support of the changes I have made to two different function
sign(namely setting_ui.do_settings_change,dialog_widget.submit_api_request)
I am stating some points about data field inside these respective
function signs.

1.settings_ui.do_settings_change: For this 'data' was actually never
undefined. Each function call has a 'data' object passed( with one
or more fields).

2.dialog_widget.submit_api_request: For this case many function calls
actually didn't have 'data' field (ie.'data' was undefined).
BUT,for those cases it was defaulted to '{}'(see function sign).
So effectively 'request_method' didn't recieve an undefined 'data' for
this case too. I have removed the defaulting and passed '{}' in the
function calls for those cases, which effectively does the some job,
but satisfies the type.

For both these cases 'data' field isn't undefined and hence an Omit,for me
makes sense.
2024-04-11 10:08:45 -07:00
Varun Singh 9b9ea01dfa channel: Use TypeScript unions for 'AjaxRequestHandler'.
Type AjaxRequestHandler is used for typing request methods
(like channel.get, channel.post etc.)Use cases include
'request_method' parameter in settings_ui.do_settings_change
and dialog_widget.submit_api_request.

Problem with the type definition:
The current type definition( ie. 'typeof call' ) satisfies every
'request_method' type EXCEPT channel.patch request.One can notice
the difference b/w 'call' and 'patch' function in channel.ts .

Hence,We need to expand the AjaxRequestHandler type.I have unioned it
with 'typeof patch' is account for the case when 'request_method'parameter
is of type channel.patch.

Discussion:
https://chat.zulip.org/#narrow/stream/6-frontend/topic/setting_ui.20do_settings_change/near/1754557
2024-04-11 10:08:45 -07:00