-
-
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, core): refactor console to support new pro plan #6874
Merged
simeng-li
merged 3 commits into
master
from
simeng-log-10503-console-deprecate-legacy-pro-and-update-pricing-table
Dec 12, 2024
Merged
refactor(console, core): refactor console to support new pro plan #6874
simeng-li
merged 3 commits into
master
from
simeng-log-10503-console-deprecate-legacy-pro-and-update-pricing-table
Dec 12, 2024
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 11, 2024 04:22
COMPARE TO
|
Name | Diff |
---|---|
packages/console/src/components/CreateTenantModal/SelectTenantPlanModal/SkuCardItem/FeaturedSkuContent/use-featured-sku-content.ts | 📈 +521 Bytes |
packages/console/src/components/MauExceededModal/index.tsx | 📈 +266 Bytes |
packages/console/src/components/PlanUsage/index.tsx | 📈 +360 Bytes |
packages/console/src/consts/subscriptions.ts | 📈 +548 Bytes |
packages/console/src/pages/TenantSettings/Subscription/CurrentPlan/index.tsx | 📈 +488 Bytes |
packages/console/src/pages/TenantSettings/Subscription/PlanComparisonTable/index.tsx | 📈 +444 Bytes |
packages/console/src/pages/TenantSettings/Subscription/SwitchPlanActionBar/index.tsx | 📈 +545 Bytes |
packages/console/src/utils/subscription.ts | 📈 +445 Bytes |
packages/core/src/libraries/quota.ts | 📈 +91 Bytes |
packages/phrases/src/locales/ar/translation/admin-console/subscription/quota-table.ts | 📈 +96 Bytes |
packages/phrases/src/locales/de/translation/admin-console/subscription/quota-table.ts | 📈 +86 Bytes |
packages/phrases/src/locales/en/translation/admin-console/subscription/quota-table.ts | 📈 +82 Bytes |
packages/phrases/src/locales/es/translation/admin-console/subscription/quota-table.ts | 📈 +87 Bytes |
packages/phrases/src/locales/fr/translation/admin-console/subscription/quota-table.ts | 📈 +88 Bytes |
packages/phrases/src/locales/it/translation/admin-console/subscription/quota-table.ts | 📈 +84 Bytes |
packages/phrases/src/locales/ja/translation/admin-console/subscription/quota-table.ts | 📈 +93 Bytes |
packages/phrases/src/locales/ko/translation/admin-console/subscription/quota-table.ts | 📈 +89 Bytes |
packages/phrases/src/locales/pl-pl/translation/admin-console/subscription/quota-table.ts | 📈 +90 Bytes |
packages/phrases/src/locales/pt-br/translation/admin-console/subscription/quota-table.ts | 📈 +87 Bytes |
packages/phrases/src/locales/pt-pt/translation/admin-console/subscription/quota-table.ts | 📈 +87 Bytes |
packages/phrases/src/locales/ru/translation/admin-console/subscription/quota-table.ts | 📈 +119 Bytes |
packages/phrases/src/locales/tr-tr/translation/admin-console/subscription/quota-table.ts | 📈 +86 Bytes |
packages/phrases/src/locales/zh-cn/translation/admin-console/subscription/quota-table.ts | 📈 +88 Bytes |
packages/phrases/src/locales/zh-hk/translation/admin-console/subscription/quota-table.ts | 📈 +88 Bytes |
packages/phrases/src/locales/zh-tw/translation/admin-console/subscription/quota-table.ts | 📈 +88 Bytes |
xiaoyijun
approved these changes
Dec 12, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM.
darcyYe
approved these changes
Dec 12, 2024
simeng-li
force-pushed
the
simeng-log-10503-console-deprecate-legacy-pro-and-update-pricing-table
branch
from
December 12, 2024 06:23
cedcb2c
to
95565ed
Compare
Base automatically changed from
simeng-log-10570-console-update-console-paywall-to-support-new-pro-plan
to
master
December 12, 2024 06:26
refactor console to support new pro plan
fix the wrong quota number
align the util method usage
simeng-li
force-pushed
the
simeng-log-10503-console-deprecate-legacy-pro-and-update-pricing-table
branch
from
December 12, 2024 07:15
95565ed
to
b76d0ba
Compare
wangsijie
approved these changes
Dec 12, 2024
simeng-li
deleted the
simeng-log-10503-console-deprecate-legacy-pro-and-update-pricing-table
branch
December 12, 2024 09:23
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
This PR refactors the console and core code to support our new Pro plan migration.
Refactord
PlanUsage
component. Make theperiodicUsage
props required.MauExceededModel
we should use the usage data from the tenant context.Subscription/CurrentPlan
we should always fetch the latest usage data.formatLogtoSkusResponses
method to thepickupFeaturedLogtoSkus
method. We only need those SKUs to be ordered in the subscription plan table. No need to sort the data on every Logto SKU request.SkuButton
child component, to avoid complicated inline element display logic.New Pro plan support
featuredPlanIds
list. Once the new plan is launched, the latestPro202411
ID should replace the currentPro
ID.featuredPlanIdOrder
to a map instead of a list. So we can support multiple plans that share the same order, e.g grandfatheredPro
andPro202411
.PlanComparisonTable
content to pick up the latest quota updates.isEquivalentPlan
util method. If the given planId is not equal to the target planId, but they both share the same plan order, we treat them as equivalent plans. NewPro202411
and grandfatherPro
. We display a Contact Us button for such a case.Testing
test locally
Checklist
.changeset