Commit Graph

64853 Commits

Author SHA1 Message Date
Aman Agrawal
3cdda91afe stripe: Link InvoiceItem to Invoice.
This is required for upgrading to the basil version of stripe.
Changes haven't been tested in this commit. It is just for easy
verification of changes.
2025-05-14 13:45:35 -07:00
Aman Agrawal
6fb7a21cef stripe: Update plan in database outside for loop.
Since we are not doing an early return here and the updated information
is not immediately used, we can skip updating the plan in database
till the end of for loop.
2025-05-14 13:45:35 -07:00
Aman Agrawal
ba9d183721 stripe: Only create flat discounts for renewal invoices.
If we only created invoice for additional licenses, we don't need
to add discount to the invoice.

Changes haven't been tested in this commit. It is just for easy
verification of changes.
2025-05-14 13:45:35 -07:00
Aman Agrawal
0a1f84fba1 stripe: Link InvoiceItem to Invoice.
This is required for upgrading to the basil version of stripe.
Changes haven't been tested in this commit. It is just for easy
verification of changes.
2025-05-14 13:45:35 -07:00
Aman Agrawal
c0504777b2 stripe: Link InvoiceItem to Invoice.
This is required for upgrading to the basil version of stripe.
Changes haven't been tested in this commit. It is just for easy
verification of changes.
2025-05-14 13:45:35 -07:00
Aman Agrawal
1a516f8b04 stripe: Link InvoiceItem to Invoice.
This is required for upgrading to the basil version of stripe.
Changes haven't been tested in this commit. It is just for easy
verification of changes.
2025-05-14 13:45:35 -07:00
Aman Agrawal
cfa7458797 stripe: Link InvoiceItem to Invoice.
This is required for upgrading to the basil version of stripe.
Changes haven't been tested in this commit. It is just for easy
verification of changes.
2025-05-14 13:45:35 -07:00
Aman Agrawal
af4cee9479 stripe: Link InvoiceItem to Invoice.
This is required for upgrading to the basil version of stripe.
Changes haven't been tested in this commit. It is just for easy
verification of changes.
2025-05-14 13:45:35 -07:00
Aman Agrawal
f8abfa2936 test_stripe: Add check for initially added card. 2025-05-14 13:45:35 -07:00
Aman Agrawal
625118bbb5 test_stripe: Add explanatory comment. 2025-05-14 13:45:35 -07:00
Aman Agrawal
567cf3c127 test_stripe: Fix incorrect pattern replacement in fixtures.
When normalizing fixture data, all numbers were being
replaced if they matched `exp_month`. This can lead to various
errors and flaky fixture generation. We use a pattern match
which includes the parameter being matched to fix this.
2025-05-14 13:45:35 -07:00
Aman Agrawal
104a7dd7a0 test_stripe: Don't return None on mocked return of stripe functions.
When mocking stripe function, don't return `None` as it can be
treated as the call was unsuccessful by the code being tested.
2025-05-14 13:45:35 -07:00
Aman Agrawal
9bcdaee065 test_stripe: Add clarification comment.
Wasted some time on this today, so decided to leave a comment here.
2025-05-14 13:45:35 -07:00
Aman Agrawal
fbec6ab123 stripe: Only attempt payment if invoice is not paid.
Since it is possible that invoice can be paid before we reach here,
so only attempt payment if the invoice is not marked as 'paid'.

Fixes invoice already paid error from stripe when running tests.
2025-05-14 13:45:35 -07:00
Sahil Batra
abdad3d485 settings-ui: Align tab toggler correctly in streams and groups UI.
This commit updates the left margin for the tab toggler in
streams and groups UI to be equal to the margin for the content
below so that they align correctly.
2025-05-14 13:24:55 -07:00
Sahil Batra
816bd21af3 group-settings: Fix live update when deactivating groups. 2025-05-14 13:24:55 -07:00
Sahil Batra
927024cf70 group-settings: Add UI to reactivate user groups.
Fixes #23568.
2025-05-14 13:24:55 -07:00
Sahil Batra
54b51823e6 user_groups: Add API support to reactivate a user group.
This commit adds support to reactivate a user group using
`PATCH /user_groups/{user_group_id}` endpoint.

Fixes part of #23568.
2025-05-14 13:24:54 -07:00
Aman Agrawal
136c0f1c44 registration: Enable import from slack using realm registration form.
Co-authored-by: Alex Vandiver <alexmv@zulip.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>
2025-05-14 13:24:38 -07:00
Alya Abbott
a11cc9a46e help: Document new setting for marking resolved topic notices as read. 2025-05-14 10:01:05 -07:00
Alex Vandiver
41fbe0bb4f kandra: Install PostgreSQL 17 by default. 2025-05-14 09:16:46 -07:00
Alex Vandiver
47238ed74c kandra: Remove PostgreSQL upgrade key. 2025-05-14 09:16:39 -07:00
bedo
c04558fe31 stream: Add subscriber_count field.
Fixes #34246.

Add subscriber_count field to Stream model to track number of
non-deactivated users subscribed to the channel.
2025-05-13 17:36:53 -07:00
Alya Abbott
54702ba2a0 help: Clean up "Deactivate your organization" help page. 2025-05-13 17:22:33 -07:00
Saubhagya Patel
70e45f45c0 settings: Add setting for marking resolved-topic notices as read.
This commit adds a new personal setting
`resolved_topic_notice_auto_read_policy` which controls how
resolved-topic notices are marked as read for a user.

Fixes #33599.
2025-05-13 16:23:21 -07:00
Saubhagya Patel
3d33a05455 test_classes: Add functions to get read/unread user IDs for a message.
This commit adds two functions in `zerver/lib/test_classes.py`. The
first function returns the `user_ids` of users for whom the message
is marked as unread. The second function returns the `user_ids` of
users for whom the message is marked read, based on the `message_id`.
2025-05-13 16:04:43 -07:00
Saubhagya Patel
934042d47e zerver: Extract function to parse Enum from string value.
This commit extracts a function from `zerver/views/realm.py` used
for `message_edit_history_visibility_policy` so it can be reused
for other settings.
2025-05-13 16:04:43 -07:00
Tim Abbott
6b26b828b3 test_topic_link_util: Remove unused import. 2025-05-13 16:04:42 -07:00
Kislay Verma
316d1cf285 topic_link_util: Use module to generate correct links.
In this commit, we use the said module instead of using
the `#**..**` syntax for channel and topic links.

Fixes #34608
2025-05-13 15:56:57 -07:00
Kislay Verma
ff27c568c5 topic_link_util: Add module to generate working topic links.
Similar to the frontend `web/src/topic_link_util.ts`, we
introduce a backend module to avoid generating broken
channe/topic links.

Fixes part of #34608
2025-05-13 15:56:46 -07:00
Maneesh Shukla
11a620fefb buttons: Modify the styles of buttons in user group settings.
This commit changes the intent of "Leave group" to neutral color (grey),
while keeping "Join group" brand-colored.
2025-05-13 15:16:14 -07:00
Karl Stolley
59788f01d4 markdown: Apply correct color var to RTL blockquotes. 2025-05-13 15:15:59 -07:00
Tim Abbott
64aa890645 i18n: Update translations from Transifex. 2025-05-13 12:51:11 -07:00
Evy Kassirer
d82bd57cef two_pane_settings: Calculate body height from resize instead of fiddly CSS.
Having a set height is necessary for simplebar to work, and the height
will change depending on whether the header is one or two lines.
2025-05-13 12:06:47 -07:00
Evy Kassirer
a5c77cc017 settings: Move settings page CSS out of subscriptions.css. 2025-05-13 12:06:47 -07:00
Evy Kassirer
4f7c65d255 two_pane_settings: Clean up padding and width on creation window footer.
This changes the vertical padding to be the same top and bottom, instead
of 9px top and 15px bottom, and updates the width to properly account
for the left/right padding.

Note: This footer is currently only used for stream/usergroup creation.
2025-05-13 12:06:47 -07:00
Evy Kassirer
1778bea8fa two_pane_settings: Remove unused text-align on list-toggler-container.
This seems only relevant for the text in the `.tab-switcher .ind-tab`
which already have `text-align: center`.
2025-05-13 12:06:47 -07:00
Evy Kassirer
9ab4954fe8 two_pane_settings: Use transform with transition instead of left.
This is more performant.
2025-05-13 12:06:47 -07:00
Evy Kassirer
3edbd5983c two_pane_settings: Clean up top border for body on narrow screens.
It seems like the only impact of removing `top` here is the bottom
border of the header appears, but we can just remove that directly.

`border-top: none` doesn't seem like it was doing anything here
(the element had no border).
2025-05-13 12:06:47 -07:00
Evy Kassirer
ce78543fcd two_pane_settings: Remove redundant height for narrow screens.
This is already set on `.left` and `.right` for wide screens
and doesn't change on narrow screens.
2025-05-13 12:06:47 -07:00
Daniel Krol
b336c54dc3 navbar: Fix fallback avatar in navbar.
Match the behavior of the user list for loading avatar images: if the
image does not load, maintain the grey fallback background color.

Before this change, the avatar in the navbar started as a grey box while
it was waiting for the image to load, but it disappeared after it failed
to do so. This is because the grey background was attached to the `img`
element, which is hidden after it fails to load the image.

In this change, we attach the necessary styling, including background
color and size, to a new surrounding `div` tag instead of the `img`.
(The existing surrounding `a` tag has its own size styles that we should
leave alone.)

Fixes part of #19123.
2025-05-13 12:05:28 -07:00
Daniel Krol
12d36ebfee tests: Remove unused .css = noop.
The front end tests pass without these removed lines. There are a few
such lines that are still necessary.
2025-05-13 12:05:28 -07:00
Maneesh Shukla
975f86581f banners: Redesign "configure your email" demo organization banners.
Fixes: #34448.
2025-05-13 12:04:24 -07:00
Lauryn Menard
3a87b467e9 demo-orgs: Enable admin of auth methods for owner without email.
There is no technical reason to block updating the authentication
methods for the demo organization when the owner has not yet set
an email.

If they get locked out of the demo organization when they set an
email address for their account, they can just create another demo
organization. These organizations are primarily intended to be
temporary sandboxes for trying out Zulip.

Co-authored-by: Maneesh Shukla <shuklamaneesh24@gmail.com>
2025-05-13 12:04:24 -07:00
Aman Agrawal
36b63adc03 inbox_ui: Fix empty view text for both channel and normal view visible.
Fixed by hiding inbox view empty text when channel view is visible.
To ensure normal inbox view empty text is hidden, we make it think
there is visible unread topics.
2025-05-13 10:21:50 -07:00
Shubham Padia
dfc2a7d19a help-beta: Convert include files to mdx along with required conversion.
Earlier, we were just renaming the files in help/include and copying
them over. Which meant that none of the mdx features or any of the
components we add could be used there. We could also not support nested
imports which are a part of the help/include files.

We also set an explcit height and width of 1em for icons, since some odd
behaviour for icon height and width was noticed when writing this
commit. unplugin-icons sets height and width by itself. It was setting
the height to 1024 and 960 for some icons. It is better to set the
height explicitly.
2025-05-13 10:21:17 -07:00
Shubham Padia
b1bf937cad help-beta: Remove BASE_DIR from path.join for output_dir.
BASE_DIR is already part of output_dir. There is no need to specify it
once more.
2025-05-13 10:21:17 -07:00
Shubham Padia
130877615e help-beta: Use .insert to insert string at a particular line.
The previous logic could not handle adding the given string at the 1st
line. We also rename the function to accurately represent what it does,
insert_string_at_line.
2025-05-13 10:21:17 -07:00
Shubham Padia
bb7af6e5c1 help-beta: Refactor convert_string_to_mdx to handle file read as well.
In future, we intend to add a function that will read the include files
and do a conversion to mdx. That conversion will be different from the
conversion that we are doing right now for the main help files. That is
why we have extracted the markdown file reading logic to the
`get_markdown_string_from_file` and renamed `convert_string_to_mdx` to
`convert_help_center_file_to_mdx` to be more specific for help center
files.
2025-05-13 10:21:17 -07:00
Shubham Padia
0f85d6327d help-beta: Fix bug of not rendering font-awesome icons correctly.
In `replace_icons`, when replacing zulip icons, the original
`markdown_string` was being passed instead of the result from the
previous font-awesome icon replacement.
2025-05-13 10:21:17 -07:00