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: Deletes provider and displays warning in selected env #5085

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

tiagoapolo
Copy link
Contributor

@tiagoapolo tiagoapolo commented Feb 10, 2025

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

  • 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

Ref: #3615

  • Adds warning icon to selected env if it has unhealthy features
Screenshot 2025-02-10 at 10 38 11

Environment without unhealthy features example
Screenshot 2025-02-10 at 10 37 55

  • Implements delete action in feature health provider list
Screenshot 2025-02-10 at 07 22 55

How did you test this code?

Selected env warning

  • Create a sample feature health provider
  • Using the provided webhook in the list of health providers, post an unhealthy event to an existing feature flag.
Payload example:

{
  "environment": "Development",
  "status": "unhealthy",
  "feature": "testing_flags",
  "reason": "is simply dummy text ",
  "name": "Sample"
}
  • Go to Environments page, then select the env you have unhealthy features, you should see a warning icon right by the selected env name
  • The env selector should have an orange border color indicating that there are unhealthy features and a tooltip saying "One or more environments have unhealthy features" will show when hovering.

Delete a provider

  • Make sure there's a health provider
  • Go to project settings, then feature health tab
  • Delete one the existing providers

@tiagoapolo tiagoapolo requested a review from a team as a code owner February 10, 2025 10:20
@tiagoapolo tiagoapolo requested review from kyle-ssg and removed request for a team February 10, 2025 10:20
Copy link

vercel bot commented Feb 10, 2025

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

Name Status Preview Comments Updated (UTC)
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 11, 2025 1:18pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 11, 2025 1:18pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Feb 11, 2025 1:18pm

@github-actions github-actions bot added the front-end Issue related to the React Front End Dashboard label Feb 10, 2025
@tiagoapolo tiagoapolo self-assigned this Feb 10, 2025
Copy link
Contributor

github-actions bot commented Feb 10, 2025

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-5085 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-5085 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-5085 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-5085 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-5085 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-5085 Finished ✅ Results

@tiagoapolo tiagoapolo changed the title Feat/feature health UI sample feat: selected environment displays unhealthy warning Feb 10, 2025
@tiagoapolo tiagoapolo changed the title feat: selected environment displays unhealthy warning feat: Deletes provider and displays warning in selected env Feb 10, 2025
Copy link
Contributor

github-actions bot commented Feb 10, 2025

Uffizzi Ephemeral Environment deployment-60768

☁️ https://app.uffizzi.com/github.com/Flagsmith/flagsmith/pull/5085

📄 View Application Logs etc.

What is Uffizzi? Learn more!

Copy link
Member

@khvn26 khvn26 left a comment

Choose a reason for hiding this comment

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

This looks good to me, however, I feel that the environment-level warning is too buried at the moment. A user would need to open the dropdown to see them.

Can we highlight the dropdown somehow to direct users attention to the dropdown in case when one of the not currently selected environments is unhealthy?

@matthewelwell
Copy link
Contributor

@tiagoapolo, sorry, there's a pretty minor, but rather annoying styling issue with the tooltip here when appearing over an environment banner.

image

Otherwise, this all looks good to me now.

@matthewelwell matthewelwell removed their request for review February 11, 2025 10:48
@tiagoapolo
Copy link
Contributor Author

tiagoapolo commented Feb 11, 2025

@tiagoapolo, sorry, there's a pretty minor, but rather annoying styling issue with the tooltip here when appearing over an environment banner.

image Otherwise, this all looks good to me now.

Indeed, that happens mainly because we need a more consistent z-index value management for handling component hierarchy. Ideally we want to render tooltips and alike in portals. This PR will fix that issue.

@@ -20,20 +20,28 @@ import TagUsage from 'components/TagUsage'

type AddEditTagsType = {
value?: number[]
hideTagsByType?: string[]
Copy link
Member

@kyle-ssg kyle-ssg Feb 11, 2025

Choose a reason for hiding this comment

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

Is it worth us having a defined UNION type here? If so lets put it in the Tag type in responses.ts

@kyle-ssg
Copy link
Member

small comment other than that all good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request front-end Issue related to the React Front End Dashboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants