Skip to content
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

Merged
merged 8 commits into from
Jan 16, 2025
Merged

feat: rename lifecycle stages #9102

merged 8 commits into from
Jan 16, 2025

Conversation

Tymek
Copy link
Member

@Tymek Tymek commented Jan 15, 2025

About the changes

Name names for "lifecycle" stages, and aligning frontend types.

Tymek added 6 commits January 15, 2025 14:56

Verified

This commit was signed with the committer’s verified signature.
daveleek David Leek

Verified

This commit was signed with the committer’s verified signature.
daveleek David Leek

Verified

This commit was signed with the committer’s verified signature.
daveleek David Leek
Copy link

vercel bot commented Jan 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 8:38am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Jan 16, 2025 8:38am

Copy link
Contributor

github-actions bot commented Jan 15, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Comment on lines +165 to +176
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>
);
Copy link
Member Author

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.

Copy link
Member Author

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.

@Tymek Tymek changed the title 1 3252 Renaming lifecycle stages Jan 15, 2025
@Tymek Tymek changed the title Renaming lifecycle stages feat: rename lifecycle stages Jan 15, 2025
@Tymek Tymek requested review from thomasheartman and kwasniew and removed request for thomasheartman January 15, 2025 14:02
@@ -1,10 +1,12 @@
import { FeatureLifecycleStageIcon } from './FeatureLifecycleStageIcon';
import { FeatureLifecycleStageIcon } from '../../../../common/FeatureLifecycle/FeatureLifecycleStageIcon';
Copy link
Contributor

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'] }
Copy link
Contributor

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?

Copy link
Member Author

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';
Copy link
Contributor

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

Copy link
Member Author

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

@Tymek Tymek enabled auto-merge (squash) January 16, 2025 08:37
@Tymek Tymek merged commit 50ab2c9 into main Jan 16, 2025
11 checks passed
@Tymek Tymek deleted the 1-3252 branch January 16, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants