Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements feature gating for the "Company Info" and "Calendar Integrations" admin settings sections, restricting editing to Pro plan users. Non-Pro users see a PRO badge, disabled controls, and upgrade prompts when attempting to edit restricted features.
Key Changes
- Feature gating based on subscription plan tier using
useSubscriptionhook andisProPlanutility - UI enhancements including PRO badges, disabled states for non-Pro users, and "Unlock with Pro" buttons
- Integration of
ProFeatureModalto prompt upgrades with billing page redirection
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| SettingsSection.tsx | Adds subscription checking and passes editable and showProBadge props to gated sections |
| CompanyInfo.tsx | Implements Pro feature gating with modal, badge display, and conditional edit handling |
| CalendarIntegrations.tsx | Adds Pro feature gating, displays user email, and disables controls for non-Pro users |
| SectionHeader.tsx | Changes title prop type from string to React.ReactNode to support badge rendering |
| EditableSection.tsx | Adds onEdit prop to allow custom edit behavior and changes title to React.ReactNode |
| EditModal.tsx | Changes title prop type from string to React.ReactNode for consistency |
| CalendarForm.tsx | Adds editable prop to control switch interactivity and disabled state |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
This file contains hidden or 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
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.
This pull request introduces feature gating for the "Company Info" and "Calendar Integrations" admin settings sections, making them editable only for users on a Pro plan. It adds UI elements to indicate Pro-only features, disables editing for non-Pro users, and provides upgrade prompts and modals to encourage upgrading. The changes also improve component flexibility and UX by passing down editability and badge props, and by ensuring disabled controls are visually and functionally consistent.
Feature gating and Pro plan enforcement:
CompanyInfoSectionandIntegrationsSectionnow accepteditableandshowProBadgeprops, which control whether the section is editable and whether a "PRO" badge is displayed. Editing is only enabled for Pro plan users, determined inSettingsSectionusing the subscription state.ProFeatureModalprompting upgrade, and an "Unlock with Pro" button is shown for gated actions.UI/UX improvements for Pro features:
Component and prop improvements:
EditableSection,SectionHeader,EditModal,CalendarOptionsList) to acceptReactNodefor titles and new props for editability and event handling, increasing flexibility and supporting the new Pro badge UI.User information handling:
Integration with billing/upgrade flow: