Commit Graph

55349 Commits

Author SHA1 Message Date
Lauryn Menard a018f2611b push-notifications: Update payload for realm name and event string.
Adds `user.realm.string_id` as the realm name to the base payload
for notifications. Uses this realm name in the body of the alert
in the `apns_data`.

Changes the event string from "test-by-device-token" to "test".

Fixes #28075.
2023-12-07 14:14:37 -08:00
Aman Agrawal 2165486c88 upgrade: Allow showing downgrade success message for legacy server. 2023-12-07 13:55:39 -08:00
Aman Agrawal 825986ac3a billing: Allow legacy servers to cancel upgrade. 2023-12-07 13:55:39 -08:00
Aman Agrawal 00b7424d11 legacy_server_login: Restyle page. 2023-12-07 13:55:39 -08:00
Aman Agrawal 21e64887f1 plans: Add current plan icon to cloud free current plan. 2023-12-07 13:55:39 -08:00
Aman Agrawal bbacee7fe9 decorator: Pass patch parameters in request.POST.
We need to manually process the parameters from request.body
since PATCH parameters are present in body and pass it in
`request.POST` to allow PATCH requests via `update_plan_for..` to
work.
2023-12-07 13:55:39 -08:00
Tim Abbott d29d132e8a push_notifications: Set more reasonable timeouts. 2023-12-07 13:45:57 -08:00
Tim Abbott 19ac558d5f push_notifications: Fix handling of 500s from bouncer.
The comments explain the context, but we shouldn't mark our access to
push notifications as disabled incorrectly here.
2023-12-07 13:45:57 -08:00
Lauryn Menard c94c194ea7 corporate: Send email community plan sponsorship approved. 2023-12-07 13:17:14 -08:00
Prakhar Pratyush 25899b1f7e left_sidebar: Decrease follow-icon opacity. 2023-12-07 11:54:36 -08:00
Aman Agrawal 1987894a2d billing: Remove `min` input validation for license input.
Fixes #28040
2023-12-07 08:34:39 -08:00
Aman Agrawal 7cad1f80be sponsorship: Set page title based on sponsorship status.
Fixes #27999
2023-12-07 08:34:39 -08:00
Sahil Batra 3d181a8ee1 settings: Remove "User groups" panel from settings overlay.
The "User groups" panel is now removed from settings overlay
and we instead use new "#groups" UI.

This commit also makes some changes to tests to ensure coverage
for pill_typeahead.js which was previously done by
settings_user_group_legacy.test.js. We have still not got
complete coverage on user_pill.ts as we have removed
settings_user_group_legacy.test.js, but we just add the file
to EXEMPT_FILS list for now and will handle it in future.

Fixes #28012.
2023-12-07 06:35:38 -08:00
Sahil Batra 17d25284a2 help: Update documentation to use new "#groups" UI. 2023-12-07 06:35:38 -08:00
Sahil Batra d43244313d user_groups: Fix joining user group when group row not visible.
There was a bug when a user tries to join user group if the
there was not a corresponding group row in left panel.
This happend when a user tried to open group settings page
from group popover.

This commit fixes the bug by adding code to check whether the
group row is present before calling the functions to show or
hide the loading spinners.
2023-12-07 06:35:38 -08:00
Sahil Batra a3af0250a0 compose: Do not include deactivated users for group as DM recipient.
We do not select deactivated members of group as DM recipient when
selecting a user group as option from typeahead.
2023-12-07 06:35:38 -08:00
Sahil Batra c4ec18bc61 popovers: Improve user group popovers.
This commit updates the user group popovers to change the icon
and text of ".manage-group" option to match what we have in
gear menu and also change the heading and ".manage-group"
option to be left-aligned.
2023-12-07 06:35:38 -08:00
Sahil Batra a97cf5d107 user_groups: Do not show deactivated users in members list.
This commit adds code to now show deactivated users in the
members list in "#groups" UI and the user group popover.
2023-12-07 06:35:38 -08:00
Sahil Batra 381670d2b6 user_group_popover: Fix scrollbar present outside the popover.
We already had the code to override the margin but it was not
being applied due to CSS specificity. This commit fixes it.

Due to this change, there was too much space on the left of
member names, so this commit also decreases the left padding.
2023-12-07 06:35:38 -08:00
Sahil Batra 34fd68c6b2 user_group_popover: Hide "Manage group" option for guests.
We do not allow guests to access the "#groups" UI.
2023-12-07 06:35:38 -08:00
Sahil Batra 7d217f2ede group_settings: Make new "#groups" UI accessible.
We now add a "Group settings" option in the gear menu to open
the new "#groups" UI and the "Manage group" option in user
group popover also opens the new UI.
2023-12-07 06:35:38 -08:00
Prakhar Pratyush bbfcb2dcb3 banner: Make banner about automatic follow/unmute topics one-time only.
Fixes: #27847.
2023-12-06 18:19:20 -08:00
Prakhar Pratyush 83bd9955e3 events: Add 'onboarding_steps' event deprecating 'hotspots'.
Earlier, the event sent when an onboarding step (hotspot till now)
is marked as read generated an event with type='hotspots' and
'hotspots' named array in it.

This commit renames the type to 'onboarding_steps' and the array
to 'onboarding_steps' to reflect the fact that it'll also contain
data for elements other than hotspots.
2023-12-06 18:19:20 -08:00
Prakhar Pratyush dde3d72100 onboarding_steps: Add 'OneTimeNotice' dataclass.
This commit adds a 'OneTimeNotice' dataclass to
support one time banner and similar UI elements.
2023-12-06 18:19:20 -08:00
Prakhar Pratyush df379b5e86 hotspots: Add 'type' field to objects in 'hotspots' array.
This commit adds a 'type' field to the objects
in 'hotspots' array sent in 'hotspots' events.

We have explicitly added this field as we eventually
plan to have two type of onboarding steps, 'hotspots'
and 'one_time_notice'.

This will help clients to easily identify them.
2023-12-06 18:19:20 -08:00
Prakhar Pratyush ac8af3d6de urls: Add a new endpoint for hotspot and deprecate the old one.
This commit adds a new endpoint 'users/me/onboarding_steps'
deprecating the older 'users/me/hotspots' to mark hotspot as read.

We also renamed the view `mark_hotspot_as_read` to
`mark_onboarding_step_as_read`.

Reason: Our plan is to make this endpoint flexible to support
other types of UI elements not just restricted to hotspots.
2023-12-06 18:19:20 -08:00
Prakhar Pratyush 62bfc20ebc models: Rename 'UserHotspot' model to 'OnboardingStep'.
This commit renames the 'UserHotspot' model to 'OnboardingStep'.

Also, it renames the 'hotspot' field in that model
to 'onboarding_step'.
2023-12-06 18:19:20 -08:00
Prakhar Pratyush 32a5c422e9 migration: Make 'rename_indexes_constraints' a lib function.
This prep commit moves the 'rename_indexes_constraints'
function to 'lib/migrate' as we're going to re-use it for
the 'UserHotspot' to 'OnboardingStep' table rename operation.

In general, this function would be helpful in migrations
involving table rename operations, subject to the caution
mentioned in the function via comments.
2023-12-06 18:19:20 -08:00
Prakhar Pratyush 777398fc82 test_helpers: Maintain alphabetical order of models in 'use_db_models'. 2023-12-06 18:19:20 -08:00
Divyansh Seth ec36fc5605 docs: Update devlogin screenshot and url in development setup.
This commit replaces the old dev login screenshot with the new one.
This also replaces the default path that we mention in the docs to
localhost:9991/devlogin.
2023-12-06 18:04:54 -08:00
Alya Abbott 6b64929523 help: Make minor clarifications for spoiler and quote formatting. 2023-12-06 16:17:35 -08:00
Alya Abbott ffb9261eaf help: Fully document use of Enter for list formatting. 2023-12-06 16:17:35 -08:00
Alya Abbott f1f41ab234 help: Advertise compose box buttons on message formatting page. 2023-12-06 16:17:35 -08:00
Alya Abbott 1062b64149 help: Explain smart formatting buttons in more detail. 2023-12-06 16:17:35 -08:00
David Rosa 6b94b1183f help: Document new formatting buttons.
Updates icons and adds instructions for formatting text using the new
formatting buttons in the compose box.

Fixes #27850.
2023-12-06 16:17:35 -08:00
Alex Vandiver 8d5573b395 narrow: Prevent contradicting DM and stream narrows.
These confused `ok_to_include_history` and caused exceptions looking
for the "flags" column.
2023-12-06 16:06:15 -08:00
Aman Agrawal b8f364a345 test-backend: Ignore coverage for custom_dev_settings. 2023-12-06 12:04:10 -08:00
Aman Agrawal 1a60697bd5 populate_billing_realms: Use correct plan tier for sponsored realms.
In cloud:

Sponsored organizations have plan_type=STANDARD_FREE, don't have
a CustomerPlan object and thus no tier value.

With self-hosting:
Sponsored organizations have a CustomerPlan object with tier
TIER_SELF_HOSTED_COMMUNITY and a plan_type of PLAN_TYPE_COMMUNITY.
2023-12-06 12:04:10 -08:00
Aman Agrawal 9f1f292462 populate_billing_realms: Add some helpful comments for testing. 2023-12-06 12:04:10 -08:00
Aman Agrawal a15499fb98 upgrade: Fix upgrade links. 2023-12-06 12:04:10 -08:00
Aman Agrawal 860e4f6060 stripe: Don't change plan tier before the plan becomes live.
For new plans that have not started, the tier change should only
happen when they become live.
2023-12-06 12:04:10 -08:00
Aman Agrawal ec7fd94782 billing: Show correct info for to be upgraded legacy plan server. 2023-12-06 12:04:10 -08:00
Aman Agrawal f5a96cba05 stripe: Don't modify non-status details of legacy-server plan.
The new plan already has the details for pricing and how to
charge customer and ideally should be used to show information
about it on billing page.
2023-12-06 12:04:10 -08:00
Aman Agrawal 30f7d5e8df stripe: Don't create `LicenseLedger` entries for non-live plans. 2023-12-06 12:04:10 -08:00
Aman Agrawal fec155ea9c stripe: Extract method to get billing page context. 2023-12-06 12:04:10 -08:00
Aman Agrawal 0d3c68cefb stripe: Rearrange code. 2023-12-06 12:04:10 -08:00
Aman Agrawal 74ef619412 stripe: Active plans always have last_ledger_entry. 2023-12-06 12:04:10 -08:00
Aman Agrawal f99214e866 stripe: Plan is always defined for get_billing_page_context calls. 2023-12-06 12:04:10 -08:00
Aman Agrawal f381fb1afd billing_page: Check for live plan before redirecting to upgrade page.
Instead of checking for any `CustomerPlan`, we need to check if
the customer has any live plan.
2023-12-06 12:04:10 -08:00
Aman Agrawal b8c0265d3a billing_page: Directly used billing_session method get base url. 2023-12-06 12:04:10 -08:00