-
-
Notifications
You must be signed in to change notification settings - Fork 210
add bypass License check feature flag #3661
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: c9088fe The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
|
Commit SHA:048faf3bce210b9a45ecf4d782490d44a3591643 Test coverage results 🧪
|
|
Commit SHA:048faf3bce210b9a45ecf4d782490d44a3591643 |
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 introduces a feature flag (bypassLicenseCheck) to control whether license validation is enforced in the Figma plugin. The implementation includes fallback logic to keep the plugin functional when LaunchDarkly is unavailable (by defaulting to true when the flag is undefined), and comprehensive test coverage for all three flag states: false (normal validation), true (bypass), and undefined (LaunchDarkly down).
Key Changes
- Implemented feature flag logic with three-state handling (false/true/undefined) in
useIsProUserhook - Enhanced Cypress test infrastructure to support feature flag injection for E2E tests
- Added comprehensive unit test coverage for all flag states across affected components
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
useIsProUser.ts |
Implements the feature flag logic with fallback behavior for when LaunchDarkly is unavailable |
Navbar.test.tsx |
Adds test coverage for all three flag states (false/true/undefined) for navbar features |
ProBadge.test.tsx |
Adds test coverage for badge display behavior under different flag states |
useFlags.ts |
Extends flag system to support Cypress feature flag injection via window object |
commands.js |
Adds Cypress command to set feature flags for E2E testing |
branches.cy.js |
Updates E2E test to explicitly set flag state for pro upgrade modal test |
tricky-toys-destroy.md |
Contains the required changeset for this patch |
Why does this PR exist?
This PR introduces a feature flag that allows bypassing the license check within the Figma plugin.
What does this pull request do?
Testing this change
Additional Notes (if any)