-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
🪟 ☁️ Free alpha/beta connectors pills #21564
Conversation
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! I tested it locally ✨
@@ -26,7 +26,8 @@ export const ConnectionPageTitle: React.FC = () => { | |||
|
|||
const { connection } = useConnectionEditService(); | |||
|
|||
const { data: displayEnrollmentCallout } = useFreeConnectorProgram(); | |||
const { data: freeConnectorProgramInfo } = useFreeConnectorProgram(); | |||
const displayEnrollmentCallout = freeConnectorProgramInfo?.showEnrollmentUi; |
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.
This can probably be the same in both CreditsPage
and ConnectionTitlePage
if we just rename the variable showEnrollmentUi
... No real strong feeling in how we do it.
6815c14
to
abb7abd
Compare
ebc7e33
to
7484541
Compare
abb7abd
to
f766423
Compare
7484541
to
afaf850
Compare
Just need a rebase to remove conflicts again and this is good to go. My kingdom for a setting to enable EDIT: There were more conflicts than expected, but the resolution was clean. Comparing the post-resolution state to the prior branch SHA, the only frontend change in the end state is from an unrelated commit pulled in from
|
- rename the function to match its filename - check the experiment within the hook, not at every call site
afaf850
to
f876995
Compare
* check email verification status for real * Clean up useFreeConnectorProgram - rename the function to match its filename - check the experiment within the hook, not at every call site * add free tag to release stage badge * Fix ReleaseStageBadge's useFreeConnectorProgram usage * Add isEnrolled to useFreeConnectorProgram * Add free pills SVG to enrollment modal header * Make ReleaseStageBadge show free tag based on prop Co-authored-by: josephkmh <joseph@airbyte.io>
What
Adds free tag to alpha/beta status pills for enrolled users (largely courtesy of #21526); also adds an SVG of the free pills to the modal header. Closes #21228.
How
useFreeConnectorProgram
to pass a (LaunchDarkly-flag-guarded) boolean for enrollment status alongside the boolean to show enrollment UIReleaseStageBadge
's conditionalmargin-top: 2em
to make it look nice.One last issue that cropped up: by making the
ReleaseStageBadge
component depend onuseFreeConnectorProgram
, it added a whole slew of (partially cloud-specific) providers that needed to be added toairbyte/airbyte-webapp/src/views/Connector/ConnectorForm/components/FrequentlyUsedConnectors/FrequentlyUsedConnectorsCard.test.tsx
Lines 11 to 13 in 59ecaea
ReleaseStageBadge
acceptsshowFreeTag
as a "dumb" prop, making it the responsibility of the components that use it to figure out whether free tags are appropriate.