-
-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(console): refactor console paywall guards #6863
Merged
simeng-li
merged 4 commits into
master
from
simeng-log-10570-console-update-console-paywall-to-support-new-pro-plan
Dec 12, 2024
Merged
refactor(console): refactor console paywall guards #6863
simeng-li
merged 4 commits into
master
from
simeng-log-10570-console-update-console-paywall-to-support-new-pro-plan
Dec 12, 2024
+124
−88
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
simeng-li
requested review from
wangsijie,
charIeszhao,
xiaoyijun and
gao-sun
as code owners
December 9, 2024 10:20
COMPARE TO
|
Name | Diff |
---|---|
packages/console/src/components/ApplicationCreation/CreateForm/index.tsx | 📈 +29 Bytes |
packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/SkuCardItem/index.tsx | 📈 +20 Bytes |
packages/console/src/components/FeatureTag/index.tsx | 📈 +609 Bytes |
packages/console/src/components/Guide/GuideCard/index.tsx | 📈 +39 Bytes |
packages/console/src/components/PlanDescription/index.tsx | 📈 +54 Bytes |
packages/console/src/components/PlanUsage/index.tsx | 📈 +1 Bytes |
packages/console/src/consts/plan-quotas.ts | 📈 +34 Bytes |
packages/console/src/consts/subscriptions.ts | 📈 +257 Bytes |
packages/console/src/ds-components/CardTitle/index.tsx | 📈 +99 Bytes |
packages/console/src/pages/ApiResources/components/CreateForm/index.tsx | 📈 +60 Bytes |
packages/console/src/pages/Applications/components/GuideLibrary/index.tsx | 📈 +6 Bytes |
packages/console/src/pages/CustomizeJwt/index.tsx | 📈 +64 Bytes |
packages/console/src/pages/EnterpriseSso/SsoCreationModal/index.tsx | 📈 +5 Bytes |
packages/console/src/pages/EnterpriseSso/index.tsx | 📈 +250 Bytes |
packages/console/src/pages/Mfa/MfaForm/UpsellNotice/index.tsx | 📈 +66 Bytes |
packages/console/src/pages/Mfa/PageWrapper/index.tsx | 📈 +184 Bytes |
packages/console/src/pages/OrganizationTemplate/index.tsx | 📈 +121 Bytes |
packages/console/src/pages/Organizations/CreateOrganizationModal/index.tsx | 📈 +130 Bytes |
packages/console/src/pages/Organizations/index.tsx | 📈 +17 Bytes |
packages/console/src/pages/SignInExperience/PageContent/Branding/CustomUiForm/index.tsx | 📈 +6 Bytes |
packages/console/src/pages/TenantSettings/Subscription/CurrentPlan/AddOnUsageChangesNotification/index.tsx | 📈 +66 Bytes |
packages/console/src/pages/TenantSettings/Subscription/CurrentPlan/MauLimitExceededNotification/index.tsx | 📈 +6 Bytes |
packages/console/src/pages/TenantSettings/TenantMembers/InviteMemberModal/index.tsx | 📈 +18 Bytes |
packages/console/src/pages/TenantSettings/components/NotEligibleSwitchPlanModalContent/index.tsx | 📈 +11 Bytes |
packages/console/src/utils/subscription.ts | 📈 +401 Bytes |
charIeszhao
reviewed
Dec 9, 2024
simeng-li
force-pushed
the
simeng-log-10570-console-update-console-paywall-to-support-new-pro-plan
branch
2 times, most recently
from
December 10, 2024 08:45
70e19b8
to
191b470
Compare
charIeszhao
approved these changes
Dec 11, 2024
refactor console paywall guards
refactor the paywall logic
replace hardcoded pro plan id
simeng-li
force-pushed
the
simeng-log-10570-console-update-console-paywall-to-support-new-pro-plan
branch
from
December 11, 2024 03:57
191b470
to
14e116e
Compare
darcyYe
approved these changes
Dec 12, 2024
packages/console/src/pages/Organizations/CreateOrganizationModal/index.tsx
Show resolved
Hide resolved
add some comments
simeng-li
deleted the
simeng-log-10570-console-update-console-paywall-to-support-new-pro-plan
branch
December 12, 2024 06:26
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Refactor all the paywall guard logic to support the latest Pro plan migrations. This PR includes the following changes:
Add new
Pro202411
plan supportReservedPlanId.Pro
plan and the newReservedPlanId.Pro202411
plan co-exist online, introduce a newisProPlan
util function that maps bothplanId
as a pro plan.FeatureTag
component display logic. Currently, there is no mapping logic applied. We display the plainplanId
as the text for theFeatureTag
. This is not friendly for the newReservedPlanId.Pro202411
pro plan ID. Thus we create aplanId
totag
map. So we may control the displayed text for each given plan.latestProPlanId
constant to replace all the currentReservedPlanId.Pro
reference. Use the dev feature guard to indicate the returned pro plan ID. Once the new pro plan is launched. Should replace all theReservedPlanId.Pro
references withReservedPlanId.Pro202411
.Paywall logic refactor
Pro
feature tag if the current tenant plan is not a paid planfree
or `dev. Regardless of other tweak logic.paywall
type for theFeatureTag
component. So far we only support using the pro plan as a paywall guard. Should limit the input value of thepaywall
plan ID to pro only. (Previously, theAdmin
value is also accepted. )Online bug fix
ApplicationCreation/CreateForm
: Fix thepro
tag not shown for the free and dev tenant bug.EnterpriseSso/SsoCreationModal
: Fix the enterprise plan not able to create SSO bug.MfaForm/UpsellNotive
: Fix the add-on upsell notice not shown to the enterprise plan bug.Organizations/CreateOrganizationModal
: Fix the enterprise plan not able to create organization bug.Organizations/index.tsx
: Fix the enterprise plan not able to create organization bug.OrganizationTemplate
: Fix the enterprise plan not able to create organization roles and permissions bug.AddOnUsageChangesNotification/index.tsx
: Fix the add-on changes notification not shown to enterprise plan bug.Testing
test locally
Checklist
.changeset