Commit Graph

56633 Commits

Author SHA1 Message Date
Alya Abbott 47b7abf324 portico: Tweak "contact sales" line on Cloud plans page. 2024-02-22 13:30:55 -08:00
Sahil Batra b154cb39f8 groups: Handle "#groups/new" url for users who cannot create groups.
We already do not show the buttons for opening the group creation
form if user is not allowed to create group at all, but the
user can still open the form by going on "#groups/new" url.

This commit fixes this by redirecting such users to "#groups/your"
like we do for streams.
2024-02-22 13:09:33 -08:00
Sahil Batra 2fe36cc0d7 group-settings: Handle invalid urls correctly.
There were couple of problems in our handling of invalid or
incomplete URLs-
- The browser back button behavior breaks if someone enters
url with invalid group ID, incorrect group name.
- On typing group edit URLs with invalid group ID, an error
was raised and the URLs remained the same with just opening
the groups overlay with "Your" tab selected in left panel.
- On typing group edit URLs with incorrect right side tab or
without any right side tab, we showed "general" section, which
is fine, but the URL was still incorrect.

This commit fixes the above mentioned problems-
- URLs with invalid group IDs are now handled gracefully
with groups UI opening in the same way as before but the
url is updated to "#groups/your".
- We now update the right side tab to "general" if right
side tab is invalid or there is no right side tab.
- All the URL updates to fix invalid urls are done using
"history.replaceState" to make sure the browser back button
behaves as expected.
- All the code for checking the urls is done in hashchange.js
itself, so we can remove some code from change_state.
2024-02-22 13:09:33 -08:00
Sahil Batra eea5ee8923 stream-settings: Handle invalid urls correctly.
There were couple of problems in our handling of invalid or
incomplete URLs-
- The browser back button behavior breaks if someone enters
url with invalid or inaccessible stream ID, incorrect stream
name, "#streams/new" url without permission to create streams.
- On typing stream edit URLs with incorrect right side tab or
without any right side tab, we showed "general" section, which
is fine, but the URL was still incorrect.

This commit fixes the above mentioned problems-
- We now update the right side tab to "general" if right
side tab is invalid or there is no right side tab.
- All the URL updates to fix invalid urls are done using
"history.replaceState" to make sure the browser back button
behaves as expected.
- All the code for checking the urls is done in hashchange.js
itself, so we can remove some code from change_state.
2024-02-22 13:09:33 -08:00
Sahil Batra 7da8f9650c streams: Handle "#streams/new" url for users who cannot create streams.
We already do not show the buttons for opening the stream creation
form if user is not allowed to create streams at all, but the
user can still open the form by going on "#streams/new" url.

This commit fixes this by redirecting such users to
"#streams/subscribed" like we do for guests.
2024-02-22 13:09:33 -08:00
Sahil Batra 54bc960898 message_view_header: Include right tab in stream settings link.
Previously, the link opened on clicking the stream name in
header was "#streams/{stream_id}/{stream_name}". It is now
changed to "#streams/{stream_id}/{stream_name}/general" as
the stream edit UI is opened with "general" tab.
2024-02-22 13:09:33 -08:00
Sahil Batra 61d481559f group_settings: Include tab selected in right section in url hash.
The url hash for a group edit view now includes "general" or
"members" in the end depending upon which tab is selected in
the right section.

Fixes #28678.
2024-02-22 13:09:33 -08:00
Sahil Batra 79975ae27e group_settings: Refactor code to handle tabs in right section.
We now use "data-group-section" attribute to set the "key" for
toggler in right section of groups overlay.

This change is preparatory work for showing the section opened
in right side in the url hash as we would use the "key" value
in url hash as well and the existing "group_general_settings"
and "group_member_settings" toggler key values were too long to
be used in the url. We previously used toggler key value as
class name and then used that class as selector to show the
relevant section but we now use "data-group-setting" section
to avoid using common class names like "general" and "members".
2024-02-22 13:09:33 -08:00
Sahil Batra e40846ef4e user_group_edit: Do not pass unused parameter to function.
There is no need to pass group as parameter to
update_toggler_for_group_setting.
2024-02-22 13:09:33 -08:00
Anders Kaseorg aeeea453dd install-shfmt: Upgrade shfmt from 2.7.0 to 2.8.0.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-22 12:46:40 -08:00
Anders Kaseorg 94cf99bcf2 install-node: Upgrade Node.js from 20.9.0 to 20.11.1.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-22 12:46:40 -08:00
Anders Kaseorg ac166dcfd4 dependencies: Upgrade JavaScript dependencies.
Fixes #26969.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-22 12:46:40 -08:00
Sayam Samal 9a12d1798e read_receipts: Fix duplication bug when opening menu repeatedly.
The (1) delay in fetching the read receipts data from the api call to
`/json/messages/${message_id}/read_receipts`; followed by the execution
of the success callback function, and the (2) use of `.append()` to
render the modal and user list, together lead to duplication of the read
receipts modal and also the user list inside the read receipts menu.

This commit adds a check to set the read receipts menu contents only if
the read receipts modal for the selected message ID is open by the time
the network request is resolved.

In addition, this commit also uses the `on_shown` hook instead of the
`on_show` hook in the read receipts modal logic, to add a delay in the
calling of the read receipts API, which prevents the stacking of the
requests.
2024-02-22 10:49:29 -08:00
Sayam Samal ece115c22d hotkey: Reorder "Edit selected message or view source" in ? and /help. 2024-02-22 10:49:29 -08:00
Sayam Samal eae148b67a hotkey: Add `Shift` + `V` shortcut to toggle read receipts modal.
The read receipts option, resides under the triple-dot message actions
menu. This made the process of viewing the read receipts take up
multiple steps, even via a keyboard-driven workflow.

Via this commit, now while focused on any message in a message feed,
and pressing `Shift` + `V`, efficiently brings up the read receipts
for that message.

Fixes part of #24716.

Co-Authored-by: SameepAher <sameepaher@gmail.com>
2024-02-22 10:49:29 -08:00
Alya Abbott c6feafe298 portico: Link to Semsee case study. 2024-02-22 10:33:31 -08:00
Alya Abbott fce68e23a2 portico: Add Semsee case study. 2024-02-22 10:33:31 -08:00
Aman Agrawal bddb44eebf stripe: Disable free trial for legacy customer with ended plan.
This ensures that customer who had legacy plan any time in the past
cannot avail free trial.
2024-02-21 21:40:47 -08:00
evykassirer b30f6bb705 user_search: Convert module to typescript. 2024-02-21 19:14:02 -08:00
evykassirer 860150525c sidebar_ui: Convert module to typescript. 2024-02-21 18:50:51 -08:00
evykassirer 134c5a8315 sidebar_ui: Add missing param to should_mask_unread_count. 2024-02-21 18:50:51 -08:00
evykassirer b609d3d88e base_page_params: Add realm_rendered_description. 2024-02-21 18:50:51 -08:00
Tim Abbott d0c276d863 corporate: Fix billing_session variable reuse confusion.
The previous logic incorrectly used the server-level number of users
even when a (presumably smaller) realm-level count was available.

Fixes a bug introduced in 2e1ed4431a.
2024-02-21 17:51:30 -08:00
Anders Kaseorg 0347e07a96 ci: Upgrade external GitHub actions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-21 17:17:36 -08:00
Karl Stolley ecbfd61e6a left_sidebar: Remove padding from bot icon.
This is no longer necessary for vertical alignment, and by
removing the 6px of padding it represents, bot DM rows will have
the same 22px height as other DM rows.
2024-02-21 13:14:02 -08:00
Lauryn Menard 161125c9be remote-support: Get user data once from the database.
Instead of querying the database twice for the user counts and
for the currently used licenses, we know pass that information
to the function where we populate the plan data for the remote
server or realm.
2024-02-21 12:40:34 -08:00
Lauryn Menard 907c209296 remote-support: Add search results for remote server/realm uuid. 2024-02-21 12:40:34 -08:00
Lauryn Menard 1eca9b3f6e remote-support: Return server results for realms with host match.
Checks for remote realm hosts that match the search query. Adds a
database query to getting the initial search results.
2024-02-21 12:40:34 -08:00
Lauryn Menard aec02d18af remote-support: Improve getting remote realm/server data.
Only get the customer information once from the database.

Extract logic for any next plan (either scheduled or an offer) data
into a separate function and do not hit database twice when getting
the number of licenses at the next plan renewal.
2024-02-21 12:40:34 -08:00
Lauryn Menard 8189b94a70 remote-support: Improve search results in view code.
Removes prefetch of remote realms on the remote server query
because, by excluding the system bot realm when this is referenced,
we end up hitting the database again.

Strips whitespace from query string and makes a few small updates
for readability.
2024-02-21 12:40:34 -08:00
Tim Abbott bd0b5d80ba zilencer: Use early return pattern for readability. 2024-02-21 11:10:45 -08:00
Mateusz Mandera ea863bab5b remote_billing: Remove code migrating Legacy plan from server to realms.
We no longer want to migrate Legacy plans from server to realms, since
Legacy plans are not really a thing in the original sense anymore, since
February 15th.

Now they're just a tool to give temporary extensions of access to the
push notification service for users, when needed. And as such, it makes
no sense to migrate like that.

The remaining code in this function is for migrating (any) plan from the
server object to the realm object, if the server has just a single
realm.
2024-02-21 11:10:45 -08:00
Tim Abbott 2598596ad2 vdom: Eliminate undefined type declaration for impossible case.
This was just debugging logic working around the fact that vdom.ts was
not originally implemented in TypeScript, and should not be polluting
our types.
2024-02-21 10:49:24 -08:00
evykassirer aab25fae6a pm_list: Convert module to typescript. 2024-02-21 10:49:24 -08:00
Prakhar Pratyush 2f8e4a71d6 corporate: Send a reminder email 2 months before the end date.
For fixed-price plans, we send a reminder email to
sales@zulip.com, 2 months before the end date, to review
the pricing and configure a new fixed-price plan accordingly.
2024-02-21 10:43:23 -08:00
Prakhar Pratyush 06e48fd553 corporate: Add end_date to fixed-price plans.
Earlier, we were not configuring the end_date while creating
a fixed-price plan which would result in the automatic renewal
of the plan at the end of billing cycle.

Our plan is to re-evaluate the pricing when we are close to the
end date, then:
1. Schedule a new fixed-price plan with the updated or same price.
2. or Don't do anything - the plan will end on the end_date.

Now, we add an end_date of 1 year from the start date when
creating a fixed-price plan.
2024-02-21 10:43:23 -08:00
Prakhar Pratyush 648d0286bc stripe: Extract repetitive write_to_audit_log code into a function.
This is a prep commit which extracts the write_to_audit_log
code block in `update_end_date_of_current_plan` into a
function named 'write_to_audit_log_plan_property_changed'.

This would be helpful to avoid repetition as we plan to
include another such block when the plan's property
reminder_to_review_plan_email_sent is changed.
2024-02-21 10:43:23 -08:00
Karl Stolley 1093ff841f left_sidebar: Remove unnecessary padding on bot icon. 2024-02-21 10:32:02 -08:00
Aman Agrawal ca96868b0e billing: Return login URL for AJAX request session timeout for servers. 2024-02-21 10:30:06 -08:00
Lauryn Menard 16135fbac6 support: Clean up class names in support views.
Updates the class name used for the sponsorship form container in
the remote support views to be more specific.

Adds a shared "support-form" class for the different forms in the
realm_details template.

Use the same CSS rule for current and next plan information sections.
2024-02-21 10:28:08 -08:00
Tim Abbott 6ee123be21 migrations: Renumber misnumbered migrations. 2024-02-21 09:19:34 -08:00
Prakhar Pratyush ee612dafac settings: Rename signup_notifications_stream realm setting.
This commit renames the realm-level setting
'signup_notifications_stream' to 'signup_announcements_stream'.

The new name reflects better what the setting does.
2024-02-21 09:04:23 -08:00
Prakhar Pratyush ab453fbe20 settings: Rename notifications_stream to new_stream_announce..._stream.
This commit renames the realm-level setting 'notifications_stream'
to 'new_stream_announcements_stream'.

The new name reflects better what the setting does.
2024-02-21 09:04:23 -08:00
Prakhar Pratyush 0c83bca81e events: Use 'get_notifications_stream' realm method.
This commit updates the code in 'fetch_initial_state_data'
function to use the 'get_notifications_stream' method
instead of re-writing the logic.
2024-02-21 09:04:23 -08:00
Alya Abbott 77ab7d810e docs: Move installation troubleshooting section to troubleshooting.md. 2024-02-20 22:26:11 -08:00
Alya Abbott fdb2bebc41 docs: Move installer details to Deployment options page. 2024-02-20 22:26:11 -08:00
Alya Abbott f7f1465fce docs: Edit installation instructions for clarity. 2024-02-20 22:26:11 -08:00
Alex Vandiver 7e9d8cd192 tornado: Fix GC of old queues. 2024-02-20 22:07:25 -08:00
Alex Vandiver b747ea285f topic: Fix history order for topic moves.
5c96f94206 mistakenly appended, rather than prepended, the edit to
the history.  This caused AssertionErrors when attempting to view the
history of moved messages, which check that the `last_edit_time`
matches the timestamp of the first edit in the list.

Fix the ordering, and update the `edit_history` for messages that were
affected.  We limit to only messages edited since the commit was
merged, since that helps bound the affected messages somewhat.
2024-02-20 21:30:32 -08:00
David Rosa e891c57d0e docs: Update links to new "Reverse proxies" page. 2024-02-20 21:03:32 -08:00