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: multiple environment flag analytics #5026

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

Conversation

kyle-ssg
Copy link
Member

@kyle-ssg kyle-ssg commented Jan 21, 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

Prior to this change, the feature analytics tab would only let you view data from the environment you're in context of. Whilst this makes sense, we often want to check that a feature is no longer in use over all environments so that we can safely delete it.

  • Moves feature usage to RTK + TypeScript
  • Creates reusable environment tag filter component

image

How did you test this code?

As above viewed production feature usage.

@kyle-ssg kyle-ssg requested a review from a team as a code owner January 21, 2025 14:47
@kyle-ssg kyle-ssg requested review from tiagoapolo and removed request for a team January 21, 2025 14:47
Copy link

vercel bot commented Jan 21, 2025

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 Jan 21, 2025 4:44pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 21, 2025 4:44pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 21, 2025 4:44pm

@github-actions github-actions bot added front-end Issue related to the React Front End Dashboard feature New feature or request labels Jan 21, 2025
Copy link
Contributor

github-actions bot commented Jan 21, 2025

Docker builds report

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

Copy link
Contributor

github-actions bot commented Jan 21, 2025

Uffizzi Ephemeral Environment deployment-60106

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

📄 View Application Logs etc.

What is Uffizzi? Learn more!

…-usage

# Conflicts:
#	frontend/web/components/modals/CreateFlag.js
@matthewelwell
Copy link
Contributor

I agree that this is useful, but it really highlights a flaw in the current UI architecture (which is definitely already highlighted elsewhere, e.g. in the settings tab). In this tab, you're able to see data from multiple environments, but to get to this feature, and subsequent tab, you have to select an environment.

I'm not sure what the solution is other than a large overhaul of the UI to be able to view a feature in the context of the project, not a specific environment, but I'm just highlighting that it makes me feel a little uneasy.

@kyle-ssg
Copy link
Member Author

kyle-ssg commented Jan 28, 2025

Yeah I think we could get a redesign concept around the hierarchy, however all the changes I can think of to this would involve making the product more difficult to navigate when creating a feature, adjusting it for an environment and updating any settings that belong to the project level.

I guess we'd have a features page at the project level containing create feature, edit settings + analytics then have replace the environment level page something like "feature states".

I think regardless of this though, seeing analytics for all environments might be necessary to make the final decision as to whether you can delete it.

@matthewelwell
Copy link
Contributor

Yep, I agree, but is there a half step that we can take here perhaps? Like, the analytics tab in the feature modal just shows you data for the specific environment, but it also has a link out to a project-level screen (maybe specifically for analytics, or maybe for the feature itself)?

@tiagoapolo
Copy link
Contributor

tiagoapolo commented Feb 10, 2025

Can we have an environment selector in the analytics tab? It would be defaulted to the current environment but you could change the environment just for pulling analytics, it would not change the app selected environment

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.

3 participants