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: display dependencies and parents in project details #4859

Merged
merged 9 commits into from
Sep 28, 2023

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Sep 28, 2023

About the changes

I have a parent UI:
Screenshot 2023-09-28 at 10 17 10

I have some children UI:
Screenshot 2023-09-28 at 10 17 02

Important files

Discussion points

@vercel
Copy link

vercel bot commented Sep 28, 2023

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 Sep 28, 2023 11:12am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Sep 28, 2023 11:12am

@@ -44,6 +44,7 @@ export class DependentFeaturesReadModel implements IDependentFeaturesReadModel {
.where('features.project', result[0].project)
.andWhere('features.name', '!=', child)
.andWhere('dependent_features.child', null)
.andWhere('features.archived_at', null)
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 allow depending on archived features

@@ -50,6 +52,7 @@ export const AddDependencyDialogue = ({
} else {
await addDependency(featureId, { feature: parent });
}
await refetchFeature();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

refresh ui after adding/removing dependency

@@ -13,4 +13,6 @@ export const emptyFeature: IFeatureToggle = {
description: '',
favorite: false,
impressionData: false,
dependencies: [],
children: [],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

default feature should provide default values

import { FC, useState } from 'react';
import { FlexRow, StyledDetail, StyledLabel, StyledLink } from './StyledRow';

export const DependencyRow: FC<{ feature: IFeatureToggle }> = ({ feature }) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved this code from a previous location so that everything related to dependencies can be managed in one file

import { Add } from '@mui/icons-material';
import { TooltipLink } from 'component/common/TooltipLink/TooltipLink';
import { AddDependencyDialogue } from 'component/feature/Dependencies/AddDependencyDialogue';
import { useUiFlag } from 'hooks/useUiFlag';
Copy link
Member

@Tymek Tymek Sep 28, 2023

Choose a reason for hiding this comment

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

Unused?

Suggested change
import { useUiFlag } from 'hooks/useUiFlag';

…gue.tsx

Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
@kwasniew kwasniew merged commit 72cca4f into main Sep 28, 2023
15 of 16 checks passed
@kwasniew kwasniew deleted the display-dependency branch September 28, 2023 11:37
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