-
Notifications
You must be signed in to change notification settings - Fork 262
feat: create new organization #4513
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
feat: create new organization #4513
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
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.
Pull Request Overview
This PR implements a new organization feature that integrates organization-specific checkout flows and UI updates in the payment and Plus subscription flows. Key changes include:
- Adding new organization-related types, queries, and context fields.
- Updating Paddle payment and Plus subscription components to support organization (team) checkouts.
- Enhancing UI components (e.g. PlusInfo, PlusProductToggle, ProfileSettingsMenu) to differentiate between personal and team subscriptions.
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
packages/shared/src/hooks/usePaddlePayment.ts | Introduces state for tracking checkout item loading and a new event handler for item updates. |
packages/shared/src/graphql/squads.ts | Extends role checking to include organization roles. |
packages/shared/src/graphql/paddle.ts | Adds a new pricing type for organization subscriptions. |
packages/shared/src/graphql/organization.ts | Adds a new query to fetch organization data. |
packages/shared/src/features/organizations/types.ts | Defines organization member roles and types. |
packages/shared/src/features/organizations/hooks/useOrganizations.ts | Implements a hook to query organizations. |
packages/shared/src/contexts/payment/context.ts | Updates PaymentContext to include organization settings and quantity state. |
packages/shared/src/contexts/payment/Paddle.tsx | Propagates the new checkoutItemsLoading state to the payment provider. |
packages/shared/src/contexts/payment/BasePaymentProvider.tsx | Introduces price type state and determines organization mode based on pricing type. |
packages/shared/src/components/utilities/common.tsx | Modifies getRoleName to accept organization roles. |
packages/shared/src/components/profile/ProfileSettingsMenu.tsx | Adds an organization menu item to the profile settings. |
packages/shared/src/components/plus/* | Multiple Plus components have been updated to support organization/team subscriptions (e.g. team size input, updated pricing, feature list). |
packages/shared/src/components/image/Image.tsx | Adds a fallback image for organizations. |
packages/shared/src/components/UserBadge.tsx | Updates badge rendering to support organization roles. |
packages/shared/src/components/ProfileMenu/sections/AccountSection.tsx | Adds an organizations option to the account section. |
Comments suppressed due to low confidence (1)
packages/shared/src/components/plus/PlusCheckoutContainer.tsx:38
- [nitpick] Review the organization checkout logic: returning early when isOrganization is true may bypass expected UI rendering. Confirm that the subsequent logic (e.g. shouldRenderCheckout) is aligned with the intended behavior for organization checkouts.
if (isOrganization) { return null; }
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.
Looks good code-wise, haven't checked the page yet 👀
@@ -19,6 +24,11 @@ export const AccountSection = (): ReactElement => { | |||
href: `${settingsUrl}/subscription`, | |||
icon: CreditCardIcon, | |||
}, | |||
{ | |||
title: 'Organizations', | |||
href: `${settingsUrl}/organization`, |
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.
shouldn't it be plural ?
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.
Asked product
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.
Will change later if they want to
ffd1f39
to
df09b96
Compare
Changes
API
dailydotdev/daily-api#2828
Jira ticket
AS-1117
Preview domain
https://as-1117-create-new-organisation.preview.app.daily.dev