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: flag exposure in personal dashboard #8247

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

kwasniew
Copy link
Contributor

@kwasniew kwasniew commented Sep 25, 2024

About the changes

Show last seen widget and lifecycle widget when selecting a flag
Screenshot 2024-09-25 at 10 31 30

Same last seen as the project flags and single flag view
Screenshot 2024-09-25 at 10 31 34

Same lifecycle as the project flags and single flag view
Screenshot 2024-09-25 at 10 31 39

Details:

  • create a new FlagExposure component to encapsulate exposure info
  • had to improve lifecycle tooltip so that they don't reach to the URL for the project id. Instead we pass it explicitly from the parent. The reason for that is that personal dashboard is not tied to a project based URL
  • when archiving the flag from the lifecycle widget you end up on the same screen but we need to refresh the personal dashboard data. In other places we usually navigate to the project flags view after the archive but here it makes sense to stay in the dashboard
  • if you archive a feature from the lifecycle tooltip with change requests enabled you get a change request created but you will only see it when you go to the project with a change request. Change request bar is tied to the project view. I think it's such a rare corner case that it's ok for now

Important files

Discussion points

Copy link

vercel bot commented Sep 25, 2024

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 25, 2024 8:54am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Sep 25, 2024 8:54am

Copy link
Contributor

github-actions bot commented Sep 25, 2024

Dependency Review

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

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

loading={loading}
project={'default'}
>
<span>child</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

curious: what is this child? is it just the text child in a span?

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 component accepts any ReactElement as children prop so wanted to specify sth that doesn't look like string. In tests we find this element by text so passing child without a span would also work

Comment on lines +61 to +68
{feature.project ? (
<MarkCompletedDialogue
isOpen={showMarkCompletedDialogue}
setIsOpen={setShowMarkCompletedDialogue}
projectId={feature.project}
featureId={feature.name}
onComplete={refetchFeature}
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can a feature not have a project?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, a placeholder feature has an empty project

@kwasniew kwasniew merged commit a1a24ea into main Sep 25, 2024
10 of 11 checks passed
@kwasniew kwasniew deleted the flag-exposure-personal-dashboard branch September 25, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants