-
-
Notifications
You must be signed in to change notification settings - Fork 733
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: onboarding store #8027
feat: onboarding store #8027
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
this.eventBus.on(STAGE_ENTERED, async (stage: NewStage) => { | ||
if (!this.flagResolver.isEnabled('onboardingMetrics')) return; | ||
|
||
if (stage.stage === 'initial') { |
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.
we do this translation since there's not 100% domain vocab match between lifecycle and onboarding. lifecycle cares about initial flag, while onboarding cares about the first flag created
} from './onboarding-store-type'; | ||
import { millisecondsToSeconds } from 'date-fns'; | ||
|
||
type DBInstanceType = { |
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.
sticking to dashed convention as in lifecycle events instead of camel casing
event: OnboardingEvent['type'], | ||
): DBInstanceType['event'] => { | ||
if (event === 'flag-created') { | ||
return 'first-flag'; |
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.
can be also first-flag-created.
Overall progression: 'initial' in lifecycle -> 'flag-created' in service -> 'first-flag-created' when we confirm it's the first one
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.
LG
About the changes
Next PR:
Important files
Naming convention:
initial
event arrived from the lifecycle subdomain. It is translated toflag-created
in the onboarding subdomain. One we confirm it's the first flag created we store it asfirst-flag
in the DB.Discussion points