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: Clone identities (FE) #3725

Merged
merged 11 commits into from
Apr 30, 2024
Merged

feat: Clone identities (FE) #3725

merged 11 commits into from
Apr 30, 2024

Conversation

novakzaballa
Copy link
Contributor

@novakzaballa novakzaballa commented Apr 5, 2024

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Please describe.

  • Add the possibility to clone all feature states from an identity A to identity B
  • Create 2 identities in an environment
  • Create feature state overrides in both
  • Go to Compare in the side menu -> Go to the Identities tab
  • Select the identities and click in the clone button

Copy link

vercel bot commented Apr 5, 2024

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

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2024 2:04pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2024 2:04pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2024 2:04pm

Copy link
Contributor

github-actions bot commented Apr 8, 2024

Uffizzi Preview deployment-50259 was deleted.

Copy link

@Jayjogarajiya67 Jayjogarajiya67 left a comment

Choose a reason for hiding this comment

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

Nice project

@@ -287,6 +287,7 @@ export type IdentityFeatureState = {
enabled: boolean
feature_state_value: FlagsmithValue
segment: null
overridden_by: string
Copy link
Member

Choose a reason for hiding this comment

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

I'm guessing this is string|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.

Corrected

return openConfirm({
body: (
<div>
{'Are you sure you want to clone all the feature states from '}
Copy link
Member

Choose a reason for hiding this comment

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

Does cloning clone overrides and traits?

If so I think that might read better

"Cloning an identity will copy any traits and identity overrides. Are you sure?"

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 don't clone the traits.
Maybe could be: "Cloning {identityA} will copy any identity overrides in {identityB}. Are you sure?"

toast('Clonation Completed!')
})
},
title: 'Clone the values',
Copy link
Member

Choose a reason for hiding this comment

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

Clone identity might be better here ? Not clear what "The values" means

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed

}}
className='ms-2 me-2'
>
{'Clone features states'}
Copy link
Member

@kyle-ssg kyle-ssg Apr 24, 2024

Choose a reason for hiding this comment

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

Clone identity overrides I think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This text was updated.

</Button>
}
>
{`Clone the features states from ${leftId?.label} to ${rightId?.label}`}
Copy link
Member

Choose a reason for hiding this comment

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

Same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this text was updated.

@@ -120,6 +127,38 @@ const CompareIdentities: FC<CompareIdentitiesType> = ({
)
}

const clonedentityValues = (
Copy link
Member

Choose a reason for hiding this comment

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

cloneIdentityValues

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, was corrected

@novakzaballa novakzaballa added this pull request to the merge queue Apr 30, 2024
Merged via the queue into main with commit 084d775 Apr 30, 2024
21 checks passed
@novakzaballa novakzaballa deleted the feat/clone-identities-fe branch April 30, 2024 14:11
@novakzaballa novakzaballa linked an issue Apr 30, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compare / Clone Identities
3 participants