-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 Connectors Program inline enrollment callout #21315
Conversation
a249b32
to
5584655
Compare
...p/src/packages/cloud/components/experiments/FreeConnectorProgram/InlineEnrollmentCallout.tsx
Outdated
Show resolved
Hide resolved
...p/src/packages/cloud/components/experiments/FreeConnectorProgram/InlineEnrollmentCallout.tsx
Outdated
Show resolved
Hide resolved
...packages/cloud/components/experiments/FreeConnectorProgram/hooks/useFreeConnectorProgram.tsx
Outdated
Show resolved
Hide resolved
...packages/cloud/components/experiments/FreeConnectorProgram/hooks/useFreeConnectorProgram.tsx
Outdated
Show resolved
Hide resolved
...p/src/packages/cloud/components/experiments/FreeConnectorProgram/InlineEnrollmentCallout.tsx
Outdated
Show resolved
Hide resolved
...p/src/packages/cloud/components/experiments/FreeConnectorProgram/InlineEnrollmentCallout.tsx
Outdated
Show resolved
Hide resolved
6870736
to
e98af7c
Compare
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.
I've added the hook to query the backend for enrollment eligibility (with a hardcoded boolean for the email verification issue that was raised this morning) to #21414
...packages/cloud/components/experiments/FreeConnectorProgram/hooks/useFreeConnectorProgram.tsx
Outdated
Show resolved
Hide resolved
9b77479
to
091cea4
Compare
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 great 🚢
...p/src/packages/cloud/components/experiments/FreeConnectorProgram/InlineEnrollmentCallout.tsx
Outdated
Show resolved
Hide resolved
@@ -23,6 +27,11 @@ export const ConnectionPageTitle: React.FC = () => { | |||
|
|||
const { connection } = useConnectionEditService(); | |||
|
|||
const freeConnectorProgramEnabled = useExperiment("workspace.freeConnectorsProgram.visible", false); |
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.
On reflection, I think it makes most sense to put the useExperiment
check inside the useFreeConnectorProgramInfo
hook: it always has the same meaning vis a vis showEnrollmentUi
(if the flag is off, don't show the FCP UI), we'll always want to consider the two together while the flag is relevant, and pulling it into the hook gives us a single place to change if we end up making the experiment flag a permanent feature.
No need to update this PR, though, I'm happy to do that in my PR that implements email verification status checking.
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, just made some non-blocking comments
...p/src/packages/cloud/components/experiments/FreeConnectorProgram/InlineEnrollmentCallout.tsx
Outdated
Show resolved
Hide resolved
...p/src/packages/cloud/components/experiments/FreeConnectorProgram/InlineEnrollmentCallout.tsx
Outdated
Show resolved
Hide resolved
...p/src/packages/cloud/components/experiments/FreeConnectorProgram/InlineEnrollmentCallout.tsx
Show resolved
Hide resolved
@josephkmh not sure why I can't reply or quote reply, but RE links: Yep, a unified component would be useful. We have an existing issue here: #18825 |
What
Closes #21222
Shows callout to enroll if a user:
How
Recommended reading order
useFreeConnectorProgram.tsx
InlineEnrollmentCallout.*