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: show warning about dependencies removed on archive #5104

Merged
merged 5 commits into from
Oct 20, 2023

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Oct 19, 2023

About the changes

Users should know that dependencies will be removed
Screenshot 2023-10-19 at 16 39 07

The most important change is that our read model returns:

    {
        hasDeletedDependencies: true,
        parentsWithChildFeatures: ['parentA', 'parentB'],
    }

which covers our previous use case (parent that would orphan child features) and our new use case indicating if any dependencies will be deleted as part of the archive operation.

Important files

Discussion points

@vercel
Copy link

vercel bot commented Oct 19, 2023

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

Name Status Preview Comments Updated (UTC)
unleash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 20, 2023 6:34am
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 20, 2023 6:34am

@@ -38,7 +38,10 @@ const setupArchiveValidation = (orphanParents: string[]) => {
testServerRoute(
server,
'/api/admin/projects/projectId/archive/validate',
orphanParents,
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new structure returned from backend

@@ -144,6 +153,11 @@ test('Show error message when multiple parents of orphaned children are archived
await screen.findByText(
'have child features that depend on them and are not part of the archive operation. These parent features can not be archived:',
);
expect(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should not show the warning if there's already an error about orphaned children. Error and warning would confuse people

featureNames,
);
return {
hasDeletedDependencies,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added this to our archive validation. It now indicates if any dependencies will be removed

@kwasniew kwasniew merged commit b890df6 into main Oct 20, 2023
11 of 16 checks passed
@kwasniew kwasniew deleted the dependencies-removed-warning-on-archive branch October 20, 2023 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants