- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 751
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: rename lifecycle stages #9102
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 Files |
const stageName = (stage: keyof ProjectStatusSchemaLifecycleSummary) => { | ||
if (!isLifecycleImprovementsEnabled) { | ||
return `${flagWord('initial')} in ${stage}`; | ||
} | ||
|
||
const lifecycleStageName = stage === 'preLive' ? 'pre-live' : stage; | ||
return ( | ||
<StyledStageTitle> | ||
{flagWord(stage)} in{' '} | ||
{getFeatureLifecycleName(lifecycleStageName)} stage | ||
</StyledStageTitle> | ||
); |
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 be simplified after removing a 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.
Just a copy of previous version.
@@ -1,10 +1,12 @@ | |||
import { FeatureLifecycleStageIcon } from './FeatureLifecycleStageIcon'; | |||
import { FeatureLifecycleStageIcon } from '../../../../common/FeatureLifecycle/FeatureLifecycleStageIcon'; |
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.
dots
type TimedStage = { enteredStageAt: string }; | ||
export type LifecycleStage = TimedStage & | ||
( | ||
| { name: 'initial' } | ||
| { name: 'initial' & Lifecycle['stage'] } |
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.
what is the reason for the new type extension?
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.
To make sure we have the same keys from the API. If we change the API, this should fail.
@@ -0,0 +1,161 @@ | |||
import { screen } from '@testing-library/react'; |
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 guess we have the same code in the FeautreLifecycleTooltip.test.tsx and this one will be soon removed so we keep git history for the new code
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.
Not 1:1 the same, but yes. I'll remove this file
About the changes
Name names for "lifecycle" stages, and aligning frontend types.