feat: redo the env/namespace switcher component to handle branches#4238
Conversation
Signed-off-by: Mark Phelps <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v2 #4238 +/- ##
=====================================
Coverage ? 50.97%
=====================================
Files ? 121
Lines ? 12759
Branches ? 0
=====================================
Hits ? 6504
Misses ? 5728
Partials ? 527
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
|
The first instinct is to position the "Create Branch" icon in that spot. But ... the selector is already quite complex, so adding more might not be ideal. It’s probably better to add extra spacing on the left and right between the border and the environment names. The use of a tooltip for actions is interesting—I'm curious if this is a new direction or pattern you're trying out. Usually, actions like “Copy to namespace” or “Create a flag” are handled through dialogs or slideovers, so this stands out a bit. |
I did actually try that first! It did look a bit cluttered and I felt like if you had several environments it would be repetitive Also from a UX point, I thought to myself 'if I want to create a branch from an existing env, i would probably already be 'in' that env and not go looking in the env/namespace switcher'
Yeah I also struggled with this. I used a popover component because theres only field in the form, and not much content that i could think to display that would justify a modal or slideover, as I thought those would look weird with just one field and two buttons |
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
|
@erka I improved the x-padding for the menu items |
sidebar has Signed-off-by: Roman Dmytrenko <[email protected]>
|
There might be another bug related to namespace selection, but I haven’t traced it yet. Screencast.From.2025-05-23.22-07-12.mp4 |
|
Ah yes i saw that once too but thought it was a fluke |
Signed-off-by: Mark Phelps <[email protected]>
…lipt-io/flipt into v2-env-namespace-branch-picker * 'v2-env-namespace-branch-picker' of https://github.com/flipt-io/flipt: remove double border and use the same spacing between icon and text as sidebar has
|
@erka I believe I fixed the issue with switching namespaces |
Signed-off-by: Mark Phelps <[email protected]>


Fixes: #4235
This redoes the EnvironmentNamespaceSwitcher to handle branched enviornments as well
It also moves the BranchCreation component to the header only when we are on a base branch
This feels better to me as now branches show up like 'real' environments, since they are
Note: There are still issues that occur if you are on a flag page in one env/namespace and then switch to another env/namespace that does not contain that item, this shows an error. We'll need to fix this seperately