1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-17 13:46:47 +02:00
Commit Graph

4336 Commits

Author SHA1 Message Date
David Leek
ab594f5c29
feat: move admin menu into nav sidebar (#9774) 2025-04-16 14:58:37 +02:00
Nuno Góis
86cfb2f651
fix: demo flow step 4 is too eager on add strategy (#9771)
https://linear.app/unleash/issue/2-3512/bug-flow-2-enable-for-a-specific-user-doesnt-work

https://linear.app/unleash/issue/2-3513/bug-flow-4-adjust-variants-doesnt-work

Follow-up to #9770 

This "add strategy" step of `demoApp.step4` was a bit too eager and did
not properly wait for the accordion to be fully expanded. This change
makes it consistent with the same step in `demoApp.step2`, also
improving its "back" behavior.
2025-04-16 13:14:31 +01:00
Nuno Góis
fa4b09ffe5
fix: demo flow consistency with new flag page (#9770)
https://linear.app/unleash/issue/2-3512/bug-flow-2-enable-for-a-specific-user-doesnt-work

https://linear.app/unleash/issue/2-3513/bug-flow-4-adjust-variants-doesnt-work

Follow-up to #9765 

This should make the demo flow a bit more consistent with the new page
design.

The page seems a bit slower in general, so we're being a bit more
aggressive on the cleaning up of demo data to make it faster as well as
adding some delays in key steps of the flow.
2025-04-16 11:35:02 +01:00
Mateusz Kwasniewski
695c50b7d6
chore: cleanup reminder flag (#9769) 2025-04-16 11:25:50 +02:00
Jaanus Sellin
187f265680
feat: add values button now actually adds value (#9768) 2025-04-16 11:52:36 +03:00
Jaanus Sellin
e9c50a551f
feat: remove add values for legal values (#9767)
This removes the add values nicely.


![image](https://github.com/user-attachments/assets/8fb84b51-c842-4a56-af21-ff5b66772538)
2025-04-16 11:06:46 +03:00
Thomas Heartman
c1bb905146
Fix type issues (#9745) 2025-04-16 10:36:29 +03:00
Nuno Góis
1d94c261e6
fix: demo topics should work with new flag design (#9765)
https://linear.app/unleash/issue/2-3512/bug-flow-2-enable-for-a-specific-user-doesnt-work

https://linear.app/unleash/issue/2-3513/bug-flow-4-adjust-variants-doesnt-work

Fixes our demo topics by making them work with the new flag page design.

We achieve this by adding 2 new interactive steps in `demoApp.step2` and
`demoApp.step4` to expand the respective environment accordions. We mark
them as optional so they are not strictly required and will be skipped
if not found. This means the demo will be resilient to rolling back the
`flagOverviewRedesign` flag, for example.

We also mark 2 steps as optional: saving constraints in `demoApp.step2`
and `demoApp.step4`. It seems like we no longer have an extra button to
save the constraints after adding them, so by marking these steps as
optional the demo flow is able to proceed without breaking.
2025-04-15 16:18:33 +01:00
Tymoteusz Czech
06ade698e3
fix: search page filtered placeholder (#9763)
It's weird that we encourage to create new flags in the cleanup stage
2025-04-15 14:29:50 +02:00
Tymoteusz Czech
3fd74262bb
feat: search page - improved change request tooltip (#9750)
improved and tested tooltip for change requests and adjusted column width
2025-04-15 13:22:50 +02:00
Jaanus Sellin
01c1ec5c29
feat: strategy status as checkbox (#9760) 2025-04-15 13:11:11 +03:00
Christopher Kolstad
8380a7a532
fix(frontend): Now only shows average daily requests when viewing daily (#9758)
As reported by Ivar, there's no point in displaying the average daily
traffic when grouping monthly.
2025-04-15 08:38:56 +00:00
Nuno Góis
2c1ec41a07
fix: demo QR code (#9756)
https://linear.app/unleash/issue/CJUX-340/bug-qr-code-doesnt-work

Generated a new QR code using
[qrcode-monkey.com](https://www.qrcode-monkey.com/), following a similar
design to our previous one.

Unlike the previous QR generator, this one does **not** proxy the URL—so
the QR code will never break in the future. It’s also in SVG format,
allowing for infinite scaling without quality loss.


![image](https://github.com/user-attachments/assets/dbe22d45-aa53-403e-9ae1-fa4a9d7fd26f)
2025-04-15 09:06:25 +01:00
Mateusz Kwasniewski
e6d55ab17a
feat: display total count (#9753) 2025-04-14 14:30:21 +02:00
Jaanus Sellin
5b52a6e8d1
feat: predefined values more organized (#9752) 2025-04-14 14:22:32 +03:00
Tymoteusz Czech
417d3b80a4
feat: search page flag status with change requests (#9744) 2025-04-14 09:51:09 +02:00
Tymoteusz Czech
1b7cf6d97d
chore: update api types in frontend (#9748)
Get backend changes into frontend types
2025-04-11 20:00:09 +02:00
Jaanus Sellin
3b96bfb4ff
feat: description for stickiness selector (#9746) 2025-04-11 15:01:15 +03:00
Thomas Heartman
e9ec1db3b7
chore(1-3611): inline values list v1 (#9743)
Adds the easy parts of the inline values list: a list of chips that
shows you which values you have and that you can delete. You either
delete them by clicking the "clear" icon or by using del/backspace on
your keyboard.

If you use your keyboard we also handle switching your focus to the
appropriate element. By default, your browser may shift the focus to the
top of the window (which isn't very helpful). Instead, we handle it like
this:
- If you delete an item and there are more elements in the list: 
  - move the element to the next item if exists
  - if your element is the last item, move focus to the previous item
- if there are no more items in the list, move the focus to the Add
Values button

We still need to add the "add values" popover functionality. That's next
on the agenda.

Additionally, this switches how the containing flex container positions
its items along the cross axis (vertically) to "flex-start" instead of
"center". Because the values list can grow to multiple lines, it would
shift the "delete constraint" button and the constraint picker to the
middle of the expanded constraint. Now, instead they stay aligned to the
top. This causes a slight alignment issue with the button (due to the
invisible padding), but I don't want to look at that before the rest of
this is complete and we know how it all fits together. You'll notice
that the spacing between elements in that top row is also off anyway
(look at the value list being smushed up against the case sensitive
icon), so there's more work to do.

<img width="716" alt="image"
src="https://github.com/user-attachments/assets/225fcab8-03e4-46e3-92d4-82912eb40d46"
/>

Focus styles:

<img width="190" alt="image"
src="https://github.com/user-attachments/assets/6b07ab25-0a67-493c-9cac-839932b0d654"
/>

<img width="195" alt="image"
src="https://github.com/user-attachments/assets/9d5b323e-bf65-4eca-9008-a45ce0139a2b"
/>


Hover styles:
<img width="96" alt="image"
src="https://github.com/user-attachments/assets/f19e1945-d2be-4e87-8005-76cb6beb1f50"
/>
2025-04-10 15:50:51 +02:00
Tymoteusz Czech
1043eb8f03
feat: flag lifecycle status - first pass (#9736)
Resolving "status" column for flags overview page
2025-04-10 12:02:25 +02:00
Jaanus Sellin
67c0ffa1ab
feat: segment chip recoloring (#9742) 2025-04-10 12:51:09 +03:00
Jaanus Sellin
5d64d0ff4b
feat: styling of info box for release plans (#9741) 2025-04-10 12:22:07 +03:00
Jaanus Sellin
49a1dac2c9
feat: targeting info box new styling (#9740)
Updated styling of info box


![image](https://github.com/user-attachments/assets/983339b7-102d-440e-a937-4972d04496c9)
2025-04-10 11:20:02 +03:00
Ivar Conradi Østhus
3b84db7d61
fix: remove custom refresh interval for UnleashClient 2025-04-10 09:56:40 +02:00
Ivar Conradi Østhus
e63b28c1b8
feat: use Unleash React SDK in Admin UI (#9723)
In this PR I integrate the Unleash React SDK with the Admin UI. 

We also take advantage of Unleash Hosted Edge behind the scenes with
multiple regions to get the evaluations close to the end user.
2025-04-10 08:26:30 +02:00
Thomas Heartman
d5af58ce0e
fix: wrap env data before truncating env name. (#9733)
Solves an issue where the new buttons would potentially obscure the
entire name of the env:


![image](https://github.com/user-attachments/assets/0bb1e7e9-90da-414e-bd70-eef264ac1867)

 
Now, instead of using grid and container queries to find the right point
to break, we're using flex to always wrap before needing to truncate the
environment name. The name will still truncate if necessary.

Why didn't we do this originally? I ... couldn't think of a way to make
flex work in a 2D layout, but the `width: 100%` property seems to do the
trick 😄


![image](https://github.com/user-attachments/assets/fa81bf5b-3be0-4afa-8fc3-7a5b5ffeeefc)

PS: the buttons only stack when they have to. They stay single-line for
as long as possible. (just in case you were wondering).
<img width="711" alt="image"
src="https://github.com/user-attachments/assets/a9f85118-5b72-4618-a91b-f05c9d520663"
/>
2025-04-09 12:24:37 +00:00
Jaanus Sellin
8da5fe6811
feat: strategy menu interaction between two dialogues. (#9732) 2025-04-09 15:14:45 +03:00
Thomas Heartman
48b9be709e
Chore(1-3598): new constraint edit design iteration 1 (#9727)
Implements the first step towards implementing the new design for
constraint editing. All the edit functionalities work as and when you do
them now, but there is no validation of the values you put in that's
happening.

The inverted / not inverted button and the case sensitivity button are
placeholders. They should use icons and have proper descriptions of what
they do. I'll do that in a follow-up.

The way to enter values is currently always in the section below the
main controls. Again, more work on this is coming.

Current look:

With case sensitive options:
<img width="769" alt="image"
src="https://github.com/user-attachments/assets/bfdfbac1-cc95-4f26-bf83-277bae839518"
/>

With legal values:
<img width="772" alt="image"
src="https://github.com/user-attachments/assets/14f566cc-d02a-46dd-b433-f8b13ee55bcc"
/>
2025-04-09 14:08:04 +02:00
Mateusz Kwasniewski
f26bf2b8d1
feat: lifecycle column text (#9731) 2025-04-09 13:44:32 +02:00
Jaanus Sellin
02aadfe1bb
feat: update strategy window styles, extract old and new components (#9730) 2025-04-09 13:41:18 +03:00
Jaanus Sellin
a92c79e2dd
feat: styling of AND operator in strategies (#9726) 2025-04-09 11:00:05 +03:00
Tymoteusz Czech
5647fc916e
feat: adjust search page columns (#9722)
New columns for search page
- improved "name" with filtering by type and tag
- lifecycle
- created by (avatars) with filtering
2025-04-09 09:50:30 +02:00
Jaanus Sellin
827b8f274a
chore: make popover center of screen (#9725) 2025-04-09 09:41:30 +03:00
Tymoteusz Czech
28a69afe63
feat: adjust columns for a search page refactor (#9709)
- Change "Project ID" to Project name column in search
- Remove certain columns that are not present in new design
2025-04-08 14:57:50 +02:00
Jaanus Sellin
45a0ddd2a5
fix: fix hover on release template card (#9721)
For some reason, using template literals do not work after its in
enterprise repo. I will try something that matches more over codebase
style.
2025-04-08 15:55:07 +03:00
Mateusz Kwasniewski
1e027dcf4f
feat: adjust filter UI (#9720) 2025-04-08 14:32:30 +02:00
Mateusz Kwasniewski
f8e75e5250
feat: remove archived from filters (#9719) 2025-04-08 13:22:53 +02:00
Jaanus Sellin
84dbae20e8
feat: remove + from the segment dropdown (#9714) 2025-04-08 14:18:01 +03:00
Jaanus Sellin
6c74c994aa
feat: release plan review dialogue (#9712) 2025-04-08 12:24:09 +03:00
Tymoteusz Czech
1930c0f408
fix: update link text for archived feature navigation (#9698)
If you try to visit an archived flag, you're told you can find it on the
project archive page, but that page isn't visible by default anymore.
This is an update to take you to the project overview with a filter for
archived flags instead.
2025-04-08 11:03:01 +02:00
Mateusz Kwasniewski
e76d04a7ad
feat: export button in flags overview (#9715) 2025-04-08 10:23:02 +02:00
Mateusz Kwasniewski
b120c97717
feat: lifecycle filters UI (#9713) 2025-04-08 10:04:07 +02:00
Tymoteusz Czech
1a85b46acc
feat: rename search page and change icon (#9706)
Behind flagsReleaseManagementUI flag
2025-04-07 15:49:44 +02:00
Thomas Heartman
5e35a0fa22
chore: Set up the basis of the new constraint editing component. (#9701)
This PR creates/steals the logic and basic components that we need for
the new constraint editing design and shows it instead of the old one if
the flag is on.

The interface needs a lot of work, but this essentially wires everything
up so that it works with the API on direct editing:

<img width="781" alt="image"
src="https://github.com/user-attachments/assets/97489a08-5f12-47ee-98b3-aefc0b840a2b"
/>

Additionally the code here will need a lot of refactoring. This is a
first draft where I've yanked all the constraint editing logic out of a
nested hierarchy of components that handle validation and lots more. I
expect to clean this up significantly before finishing it up, so please
excuse the mess it's currently in. It turns out to have been lots and
lots more logic than I had anticipated.

This is just a PR to get started, so that the next one will be easier to
work on.
2025-04-07 14:50:42 +02:00
Thomas Heartman
6ea823f011
fix: restore focus style to the env switch (#9707)
Removes the "disableRipple" prop from the FeatureToggleSwitch component,
thereby restoring its focus styles, so that keyboard users can see where
their focus is at.

I don't know the reason this was added originally (the PR doesn't say
anything about it), but the prop changes nothing when hovering with the
mouse, but it does remove focus styles for keyboard navigation.

By removing it, we can bring the focus style back. As far as I can tell,
there's no other difference between the two states.

Both of these screenies have focus on the toggle, but in the first
screenie there's no way to tell.

With the prop:
<img width="397" alt="image"
src="https://github.com/user-attachments/assets/b9a5d764-ec5a-4d3b-b79d-0b52d7bd6891"
/>


Without the prop:
<img width="445" alt="image"
src="https://github.com/user-attachments/assets/3c95c7a6-91de-4ed2-9942-e9fc794e9d40"
/>

Because the component is used in multiple places, this also fixes this
issue in the project flag list (and maybe elsewhere too):
<img width="336" alt="image"
src="https://github.com/user-attachments/assets/6582c58b-fabe-40ce-a141-06b22189a462"
/>
2025-04-07 15:50:07 +03:00
Jaanus Sellin
58d123e998
feat: release plan hover buttons (#9703) 2025-04-07 11:32:31 +03:00
Christopher Kolstad
bd11ece873
fix: consumption warning is either/or not and 2025-04-04 11:09:48 +02:00
Christopher Kolstad
32ae7bc7d1
we don't have historical data available for purchased traffic (#9700)
So this PR removes the purchased dt point, as well as the total
available. Using the same check our overageCalculation does (it also
only works on current month)
2025-04-04 11:08:20 +02:00
Thomas Heartman
6b5c29a6e6
chore: Add flag for add/edit strategies (#9699)
Adds a flag for the edd/edit strategies updates.
2025-04-04 10:18:05 +02:00
Gastón Fournier
2748ced8e2
feat: only admin can fetch license (#9697)
Non admins can not fetch the license they're still allowed to check it
but not to get it
2025-04-03 16:26:36 +02:00
Tymoteusz Czech
821851a2f3
fix: depenency name truncator (#9696)
![image](https://github.com/user-attachments/assets/ce8d1dc4-d03a-4b42-aa30-c5cae3b6f53c)
2025-04-03 13:45:25 +00:00
Christopher Kolstad
f20ea86c61
feat: added network traffic bundle (#9691) 2025-04-03 14:37:07 +02:00
Thomas Heartman
07d11c7a87
Refactor: cleaner project status modal link handling (#9694)
Removes random booleans, uses more explicit functions.
2025-04-03 12:29:03 +00:00
Jaanus Sellin
9a4eb059e6
feat: strategy selector screen updates (#9692) 2025-04-03 14:51:00 +03:00
Thomas Heartman
a02fe7a245
fix: project status modal links don't work (#9693)
Fixes a bug where project status modal links wouldn't work.

The reason they didn't work is because we modified the query params on
modal close, and because we manually close the modal when you click a
link (because otherwise it'd stay open when you navigated to other
project pages), we inadverdently reset the URL.

I'm not entirely sure why setting the search params would modify the URL
itself, but I'm guessing that's related to the implementation.

One way to solve this is to indicate whether we're closing the modal
because a link was clicked or not, and only modify the query params if
that is not the case.
2025-04-03 13:13:18 +02:00
Thomas Heartman
3447b03e1c
Fix(1-3564)/hide project owner if system (#9686)
Hides owner avatars in cases where the owner type is "system". Touches
dashboard and project card owners.

Back when all projects required owners, we introduced the new project
cards that have the owner listed in the footer. Because, theoretically,
you weren’t allowed to create projects without owners, the only project
that should ever be without an owner was the default project. So we
thought it made sense to say that it was owned by the system.

But now that owners are optional, that doesn't necessarily make sense
anymore. As such, we'll just hide their avatars to begin with.

<img width="726" alt="image"
src="https://github.com/user-attachments/assets/950cd909-c891-48f1-9ef7-fd74922a5990"
/>

<img width="1497" alt="image"
src="https://github.com/user-attachments/assets/f4d213f5-febb-46f8-89f0-899e77652e07"
/>

Because the components expected the avatars to be there, we now need to
set an explicit min-height on them, so that they don't collapse.
Luckily, we can use the default avatar height (and also force that so
that they change in tandem) and use that in both places.
2025-04-03 10:43:58 +02:00
David Leek
4344c94a90
chore: remove z-index from sticky admin menu as its probably not needed (#9690) 2025-04-03 10:24:26 +02:00
David Leek
b9a7c0cda6
feat: command bar admin menu improvements (#9689) 2025-04-03 10:23:45 +02:00
Thomas Heartman
72e71b714d
fix: link to "view more insights" from dashboard goes to status modal (#9684)
Updates the link from the project dashboard page to take you to the
project status modal instead of the old insights page.

We didn't have a way to auto-open the modal before, so I added a query
param to control it.
2025-04-02 13:57:37 +00:00
Thomas Heartman
130b3869cc
Fix: lifetime API command doesn't update. (#9685)
Seems the previous value was hardcoded. Now we check the values you set
instead.
2025-04-02 15:35:29 +02:00
Tymoteusz Czech
e436ef29f1
fix: add Project and Playground icons for command bar (#9677)
Updating `IconRenderer` component in the `NavigationSidebar`. It will fix icons not showing up for command bar search results.
2025-04-02 15:31:55 +02:00
Jaanus Sellin
89724209cd
feat: new styling for strategy selector (#9683) 2025-04-02 14:55:36 +03:00
Thomas Heartman
645b005f29
Fix(1-3553): fix focus styles and tab navigation for segments + constraints (#9655)
Fixes a few small focus styling and tab navigation issues for the new
segments + constraints.

Before:
The segment acc header was tabbable even though you can't do anything
with it (by mouse or by keyboard)

![image](https://github.com/user-attachments/assets/de5c07ee-e55c-45f4-bd6e-3d978a0a51ca)

The focus color would stay even when you're focusing stuff inside the
accordion

![image](https://github.com/user-attachments/assets/1a75038b-256f-43b5-95ed-0a3d455d17f8)

Constraint items have focus styles that exceed the accordion borders,
causing a weird squaring effect:

![image](https://github.com/user-attachments/assets/638c9f5d-daf0-4570-8323-49141183dad8)

After:
The segment acc header isn't reachable by tab anymore.

The segment acc header doesn't change its background color on elements
inside getting focus:

![image](https://github.com/user-attachments/assets/4756e8b0-b461-49df-bf3e-ec8d26142877)

The constraint item has rounded corners for focus styles too:

![image](https://github.com/user-attachments/assets/fccf94e4-8b7a-4823-bcf5-24a0fe046cf7)

![image](https://github.com/user-attachments/assets/90020d85-990c-41de-9acb-ab2cc81a8f66)
2025-04-02 13:37:16 +02:00
Jaanus Sellin
b44ac069ae
feat: new feature strategy menu (#9678) 2025-04-02 09:00:34 +00:00
David Leek
18346d1107
feat: admin menu: unleash logo in header - links to dashboard (#9676) 2025-04-02 08:34:43 +02:00
Thomas Heartman
f6e786a6c0
Remove caseInsensitiveInOperators flag (#9670)
The flag has never made it out of dev, and has not been turned on
consistently since 2023. There was a project for it, but we have since
abandoned it.
2025-04-01 14:57:32 +02:00
Tymoteusz Czech
6e947a8ba6
fix: linter rule for hooks (#9660) 2025-04-01 14:33:17 +02:00
David Leek
a9490e6fe4
chore: admin menu main layout tweaks (#9671) 2025-04-01 14:16:26 +02:00
Fredrik Strand Oseberg
7545f5af60
refactor: change colors (#9672)
This PR fixes incorrect colors chosen from the theme. It now matches the
figma files.
2025-04-01 13:24:40 +02:00
Fredrik Strand Oseberg
c75779e677
refactor: colorpicker (#9668)
This PR refactors the color picker so we stick to one set of colors
instead of changing available colors when theme changes. Colors picked
also work in dark theme and is aligned with UX.
2025-04-01 12:32:13 +02:00
David Leek
c21ed3ed5e
chore: add flags to control network route links from menu (#9667) 2025-04-01 11:18:32 +02:00
David Leek
f7dbfe1162
chore: admin menu enterprise badge (#9656) 2025-04-01 09:13:40 +02:00
Thomas Heartman
89f63285a0
Fix: Move hooks to before we bail if the flag is off. (#9659)
This fixes the a react crash when we render more/fewer hooks than on the
previous render if the flag state changes.
2025-03-31 13:59:09 +00:00
Gastón Fournier
eae7535bfc
feat: remove access overview flag making it GA ready (#9654)
This is exposing information we already have about permissions in a UI
that should help users have an overview of the permissions of a user
with regards to projects and environments
2025-03-31 14:33:38 +02:00
Tymoteusz Czech
ce230ba96b
Fix: separate segment and constraint accordions (#9652)
Segment accordion should not share state with constraint accordions inside
2025-03-31 12:11:34 +00:00
Mateusz Kwasniewski
1f1b00c38f
chore: fixing typo pre-defined (#9651) 2025-03-31 13:58:22 +02:00
Fredrik Strand Oseberg
aa6c422165
Feat/tag type frontend display (#9630)
Add frontend for displaying tag colors
2025-03-31 11:55:49 +02:00
David Leek
5a55181561
feat: show only link to /admin in mobile menu (#9647) 2025-03-31 08:37:15 +02:00
Jaanus Sellin
b55732d719
fix: tooltips not working after base element is also clicked (#9629) 2025-03-31 08:59:08 +03:00
Thomas Heartman
398246c3ec
Chore/remove badges from tab order (#9643)
Makes badges not tabbable by default instead of tabbable by default.
Turns out, badges aren't tabbable by default and they never were until I
made them as much (for some reason that I don't quite understand now).

Anyway, I've gone through the list of uses for the Badge element and
made any element that should be reachable by tab either have an explicit
tab index (if it's within a tooltip, for instance), or be wrapped in a
Link (instead of having an on-click handler). The two places I've
wrapped it in a link, I've also gone and changed the item group to be a
list (for HTML semantics). I've also updated some spacing for the
profile tab.

Application list (one is before, one is after. don't remember which is
which; it's now a list):

![image](https://github.com/user-attachments/assets/66fdabf7-7a80-46cb-b302-6242c16ad43e)

![image](https://github.com/user-attachments/assets/660506ce-0ec4-417f-bb3a-3fbf23d5591c)


Profile page (now a list + improved spacing)

Before:

![image](https://github.com/user-attachments/assets/17a841e6-d500-410e-8f11-4c78ca0e9e12)

![image](https://github.com/user-attachments/assets/38a60e67-682e-45b5-9312-f4c2013192bb)

After:

![image](https://github.com/user-attachments/assets/602f3d06-0b7e-4a10-9958-fb565fb6d06b)


![image](https://github.com/user-attachments/assets/67c7d39c-cdf9-4586-98d9-63ceff4fd867)
2025-03-28 15:05:32 +00:00
Thomas Heartman
fc0383620b
fix: focus styles for env headers (#9635)
Adds focus styles to the env accordion header only when the focus is on
the header itself (not on the env toggle inside the header). The focus
style is consistent with what we do for other accordions (dashboard,
milestones).

Middle one is focused:

![image](https://github.com/user-attachments/assets/df87bd99-8fe2-4093-afd8-4cbce9f2c943)


Focus is on the toggle inside the top one (yeh, we should have better
focus styles for toggles; but that's not for now):

![image](https://github.com/user-attachments/assets/2a046d4c-8585-4021-a58e-32ef81b1f701)

Open and focused: 

![image](https://github.com/user-attachments/assets/fdbb5bda-4be5-4354-b213-5e2c7a59eb59)

Getting the consistent background for the header when it's open is a
little tricky because the accordion container and summary are split into
different files. ~~This first iteration used a class name for the
specific header (because envs can have multiple accordion headers inside
them, e.g. release plans) and setting a CSS variable in the summary, so
that the background matches.~~ I found out that I only need to set it in
the parent anyway 😄

Without it, you get this (notice that there is a little white outside
the lower corners):

![image](https://github.com/user-attachments/assets/4d71d73c-7f45-46b5-811d-c6e36f9be5ce)
2025-03-28 15:59:25 +01:00
Christopher Kolstad
14c8b97441
task: added a hook for cleanly deciding new or old admin menu (#9645) 2025-03-28 14:45:09 +01:00
David Leek
5da9f75014
chore: fix weird alignment issue with main content and admin menu (#9636) 2025-03-28 13:22:13 +01:00
Tymoteusz Czech
db1ec7ffa6
fix: feedback button (#9644)
Fix alignment of "add strategy" & "add template" buttons

---------

Co-authored-by: Simon Hornby <sighphyre@users.noreply.github.com>
2025-03-28 11:48:24 +00:00
Simon Hornby
8793d9e632
chore: swap release template instruction svgs for pngs (#9642) 2025-03-28 10:47:36 +02:00
David Leek
78dfbde007
fix: Back to Unleash onClick+useNavigate instead of href (#9641) 2025-03-28 09:34:48 +01:00
David Leek
39755c7f19
fix: useLocation instead of browser location for resolving pathname (#9640) 2025-03-28 08:54:21 +01:00
Simon Hornby
7f98709730
fix: fixes an issue where the new feedback button on the config strategy pane (#9638) 2025-03-27 16:43:14 +01:00
Mateusz Kwasniewski
f97924eb36
feat: enforce change request settings in create project dialog (#9637) 2025-03-27 16:15:09 +01:00
Simon Hornby
e53e2ca0c7
chore: ux feedback on release templates (#9634)
Makes two small changes to the release template UI based on walkthrough
feedback with UX

1) The how-to descriptions for creating release plans won't get hidden
when the user has created release plans. We think too much is better
than too little. At a later point we'll push users to documentation more
aggressively
2) The warning for when the user taps the "Use template" button now has
a line break to give it some breathing room and will render anchored to
the bottom left of the originating button rather than covering it
2025-03-27 16:31:47 +02:00
Simon Hornby
b5e52a6160
chore: feedback link on feature strategy (#9633)
Adds a new link on the feature strategy that points to the feedback link
(pops out new window, only renders if release plans are enabled)

![image](https://github.com/user-attachments/assets/bd965b88-4d95-4e75-a931-af365fe777dc)

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2025-03-27 15:19:14 +02:00
Mateusz Kwasniewski
53a4f61260
feat: enabled change requests reacting to available environments (#9631) 2025-03-27 13:46:29 +01:00
Tymoteusz Czech
cf053470e5
feat: improve constraints item on small screens (#9609)
Fixing constraint operator item, items alignment and padding for better presentation on mobile devices.
2025-03-27 13:33:25 +01:00
David Leek
f7c04cc2cb
feat: admin menu for mobile (#9626) 2025-03-27 13:28:44 +01:00
Mateusz Kwasniewski
6b793677b9
feat: preselect change request settings in create project (#9625) 2025-03-27 12:17:21 +01:00
Mateusz Kwasniewski
cc0348beba
feat: show environments with change requests (#9628) 2025-03-27 12:16:04 +01:00
Simon Hornby
47c6f43865
chore: add some getting started info and images when you have no release plans (#9627) 2025-03-27 12:58:56 +02:00
Thomas Heartman
138e93c41a
chore: drag-n-drop tooltip for strategies (#9623)
Implements the drag-n-drop tooltip the first time the user sees a
strategy drag handle on the feature env overview. It uses React Joyride,
which is the same system we use for the demo.

The design is a little different from the sketches because I couldn't
find a quick way to move the content (and the arrow) to be shifted
correctly.

If the demo is also active the first time a user visits a strategy page,
it'll render both the demo steps and this, but this tooltip doesn't
prevent the user from finishing the tour. It might be possible to avoid
that through checking state in localstorage, but I'd like to get this
approved first.

The tooltip uses the auth splash system to decide whether to show the
tooltip, meaning it's stored per user in the DB. To avoid it
re-rendering before you refetch from the back end, we also use a
temporary variable to check whether the user has closed it.

Rendered:

![image](https://github.com/user-attachments/assets/5912d055-10d5-4a1d-93f4-f12ff4ef7419)

If the tour is also active:

![image](https://github.com/user-attachments/assets/b0028a0f-3a0f-48aa-9ab9-8d7cf399055a)
2025-03-27 11:16:37 +01:00
Simon Hornby
6aae9be19c
chore: add a message stating no templates when there aren't any (#9624) 2025-03-27 11:34:45 +02:00
Simon Hornby
01f3af4bda
chore: whats new dialog (#9622)
Adds a new dialog option for whats in new in Unleash items. This can be
tiggerred by setting `popout` to true when configuring the items.

To do this without setting fire to the code, I've also needed to
refactor the NewInUnleash components:

- NewInUnleashItem becomes a dumb item that decides if a dialog or
tooltip should be rendered and controls that render state
- The child item in NewInUnleashItem has been moved out into
NewInUnleashSideBarItem, which feels a bit better since that is a
distinct UI element from the popup
- NewInUnleashDialog now exists, which is a dialog version of the popup.
Meaningfully different to ask for a new component

## Screenshots

![image](https://github.com/user-attachments/assets/33d3e7f5-9178-4d2d-9355-866814e58164)
2025-03-27 11:30:24 +02:00
Mateusz Kwasniewski
1bd328f4e1
feat: create and edit environment required approvals (#9621) 2025-03-26 15:54:46 +01:00
David Leek
07a4106f48
feat: admin menu (#9617) 2025-03-26 15:08:56 +01:00
Thomas Heartman
328c5368ed
Hide env metrics when an env has no strategies. (#9620)
Changes the logic in when we display metrics for an env to not showing
 them unless we have strategies.


![image](https://github.com/user-attachments/assets/83dc2465-b3fb-49d1-a9fe-886fd16fea25)
2025-03-26 13:43:12 +00:00
Jaanus Sellin
18d1a6c1bc
feat: show seats used only for full enterprise customers (#9618) 2025-03-26 14:53:51 +02:00
Gastón Fournier
380d2c2c5d
feat: release template feedback module (#9614)
## About the changes

Adds a release template feedback module to release templates: 

![image](https://github.com/user-attachments/assets/848d386b-0e20-43d0-b113-51e1e26c5a13)

It uses the Card component by defining a new variant of it.

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2025-03-25 17:01:04 +01:00
Nuno Góis
b885a927e6
chore: stylable card (#9604)
https://linear.app/unleash/issue/2-3442/make-card-component-stylable

Makes the Card component introduced in
https://github.com/Unleash/unleash/pull/9096 stylable.

E.g.

```tsx
const StyledCard = styled(Card)(({ theme }) => ({
    backgroundColor: 'pink',
}));
```
2025-03-25 16:39:32 +01:00
Simon Hornby
9106fbf721
feat: add use template button to strategies selector on flag config pane (#9605) 2025-03-25 14:18:20 +02:00
Simon Hornby
dbc953b222
chore: consolidate release plan flags (#9606)
Removes the `releasePlanChangeRequests` flag and swaps existing references to it to the `releasePlans` flag instead
2025-03-25 13:36:23 +02:00
Thomas Heartman
3d1a97f745
Fix(1-3462)/janky drag n drop (#9599)
Fixes janky drag and drop behavior and updates the styling of the drag
handle focus.

The solution uses the same method to prevent oscillation as we do for
strategies. To get access to the same context, I've added some extra
parameters to the OnMoveItem function and passed along the extra data
from the `useDragItem` hook. No new information, just making more of it
available, and turning it into an object so that you can declare the
properties you need (and get rid of potential wrong ordering of
drag/drop indices).

For the drag and drop behavior: If the dragged element is the same size
or smaller than the element you're dragging over, they will swap places
as soon as you enter that space. If the target element is larger,
however, they won't swap until you reach the drag/drop handle, even if
they could theoretically switch somewhere in the middle. This appears to
be a limitation of how the drag/drop event system works. New drag events
are only fired when you "dragenter" a new element, so it never fires
anywhere in the middle. Technically, we could insert more empty spans
inside the drag handle to trigger more events, but I wanna hold off on
that because it doesn't sound great.

When dragging, only the handle is visible; the rest of the card stays in
place. For strategies, we show a "ghost" version of the config you're
dragging. However, if you apply the drag handle to the card itself, all
of it becomes draggable, but you can no longer select the text inside
it, which is unfortunate. Strategies do solev this, though, but I
haven't been able to figure out why. If you know, please share!

Before:

![image](https://github.com/user-attachments/assets/d3bf9fd2-7d74-4ad7-adde-b729403f82b3)


After:

![image](https://github.com/user-attachments/assets/27d3ca4e-112a-4420-b10d-7df59a7c09a0)
2025-03-25 11:43:40 +01:00
Tymoteusz Czech
d8c7e31b18
Constraint values preview and filtering (#9603)
Restore constraint accordion to flag page.
2025-03-25 11:24:22 +01:00
Mateusz Kwasniewski
59dd769e5d
feat: frontend traffic explanation box (#9602) 2025-03-24 15:25:43 +01:00
David Leek
7580d3bc74
chore: rename release-management to release-templates, remove "plan" from descriptions (#9595) 2025-03-24 14:57:18 +01:00
David Leek
5d47d524bb
feat: Admin home landing page (#9594) 2025-03-24 14:57:08 +01:00
Tymoteusz Czech
dd62b3dbcd
Constraint values list (#9592) 2025-03-24 14:26:58 +01:00
Mateusz Kwasniewski
e018ee2f34
feat: connection explanation box (#9598) 2025-03-24 13:21:29 +01:00
Thomas Heartman
01870c6165
fix: wrap env header grid on narrow containers (#9596)
When the container is <500px, make it so that the strategy count wraps
onto its own line to prevent it from obscuring the environment name.

I decided to go for 500px because that allows our default names to not
get cut off before wrapping. It seems like a sensible default.

Before:

![image](https://github.com/user-attachments/assets/7fdec179-6053-4803-9bc0-8e48cedf3636)


After:


![image](https://github.com/user-attachments/assets/64728d51-5f9a-415e-84d1-a7708c039809)

It's still not perfect when you have envs without strategies, but it's
better. We'll get back to that edge case later.
2025-03-24 10:52:38 +01:00
Thomas Heartman
b84699f563
refactor(1-3439): extract shared components and styling from Env Accordion Body to common (#9590)
Extracts the shared strategy list and list item into the `common` folder
instead of living in the environment accordion body file.

Also takes the disabled strategy handling that we use for
`StrategySeparator` and moves it into the file itself. It might be
something we want to decorate manually in the future, but we don't for
now, so this was the most straight-forward way to make it work.
2025-03-24 07:39:35 +00:00
Thomas Heartman
19d2a553f0
chore(1-3431): rework constraint equality and case sensitivity (#9591) 2025-03-21 15:26:05 +01:00
Thomas Heartman
03699c8e80
chore(1-3516): add release plan / strategy count to env header (#9589)
Adds an optional `environmentMetadata` property to the env header
component, which is used to populate the release plan / strategy
counter. If no env metadata is passed (such as for default strategy
configuration) nothing is rendered.


![image](https://github.com/user-attachments/assets/9be29a7a-aa11-46a4-87b4-4596c12552f6)

With long env names, the project name will be cut off before the chip:


![image](https://github.com/user-attachments/assets/0711972b-66d6-4874-9c47-0c4c768807ff)

There's some issues with narrow screens, but I'll handle that in a
follow-up:

![image](https://github.com/user-attachments/assets/0de8aeae-1025-4c7e-9fcb-86dd22952f97)
2025-03-21 14:54:13 +01:00
Nuno Góis
3fa54f4465
chore: instance status prices (#9588)
https://linear.app/unleash/issue/2-3429/use-the-correct-prices-for-each-instance-in-unleashs-ui

Uses the instance prices exposed through instance status to display the
correct price amounts in Unleash's UI.
2025-03-21 09:15:49 +00:00
Tymoteusz Czech
70444c2003
refactor: variant colors (#9586)
Toned-down colors for dark theme
2025-03-20 14:44:33 +01:00
Thomas Heartman
aeb3081624
chore: Don't use fallback functions for dragging (#9585)
Makes it so that strategies project env strategies that aren't draggable
don't get the drag icon. The reason it didn't work as expected was that
we used fallback functions instead of keeping them undefined.

I discovered that we applied two dragging boxes, so I removed the outer
layer one (specific to project envs) in favor of relying on the inner
one. Most of the lines changed are just indentation as a result of this
nesting going away.

Here's the diff. The top set of strategies aren't draggable; the lower
ones are.


![image](https://github.com/user-attachments/assets/0a7b6371-9f34-4596-a85f-9881da821448)
2025-03-20 13:54:19 +01:00
Thomas Heartman
90eed05296
Chore(1-3520)/playground disabled badges (#9583)
Gives a small update in how we deal with unevaluated and disabled
strategies in the new playground design:

- "Unevaluated" badges go from yellow warning to blue info and their
text changed to "Not evaluated"
- Don't show "Not evaluated" badges on strategies that are disabled.

To avoid this change affecting the current playground setup, I
duplicated the old resultschip into a legacy file and changed the
existing impl. To avoid updating all other files that use that chip
(it's all over the playground) and checking flags or creating duplicates
there, I decided to do a quick check at the top of the legacy file and
use the new file if the flag is on.

In doing so, I've also simplified the actual chip file and have more or
less cut the total line count in it in two 😄


![image](https://github.com/user-attachments/assets/44e38a8e-4faa-440b-82ed-9ee377160922)
2025-03-20 13:19:16 +01:00
Tymoteusz Czech
2d47fb3827
feat: new constraint view for flag edit page (#9567)
Refactor components in Targeting (Edit strategy)
2025-03-20 13:04:24 +01:00
Nuno Góis
a10dca44f6
fix: access overview fallback to email (#9582)
https://linear.app/unleash/issue/2-3430/fix-undefined-in-access-overview-when-user-name-is-unavailable

Adds a fallback to email in case the name is not available.

Also switches the priority of the fallbacks to be consistent with other
places in our codebase (email > username) and uses `||` instead of `??`
because falsy values don't provide much informational value anyways.


![image](https://github.com/user-attachments/assets/2726247c-b7ba-4ed8-8589-f56fff63d031)
2025-03-20 11:02:19 +00:00
Thomas Heartman
afd24aa58a
refactor: flatten release plan + strategy list (#9581)
Flattens the list of strategies when you have both release plans and
strategies. If you had both, you'd have this setup before:
```
- ol
  - li // release plan
    - ol // release plan strategies
  - li // regular strategies
    - ol // strategy list
```

Now we drop the extra nesting:
```
- ol
  -  li // release plan
    - ol // release plan strategies
  - li // the rest of the strategies
```

Semantically, I think this is just as valid and it simplifies a lot of
styling that no longer needs to look for other lists etc.

As part of doing this, I have also moved the "many strategies" warnings
and pagination labels to outside the list instead of inside the smaller
list.

Otherwise, the list looks just the same as before and drag-n-drop works
just fine.

(side note: these strategies shouldn't have drag handles 🤔 )

![image](https://github.com/user-attachments/assets/f27f451c-1b73-4f18-903f-153e379b54c1)


As a bonus, this PR also:
- Uses the disabled style separator for disabled strats in playground
and deletes some unused components I found.

Playground disabled strats (we probably don't want double orange badges;
I'll talk to UX):

![image](https://github.com/user-attachments/assets/a722b18f-f3d5-4d53-b093-b44912284748)
2025-03-20 11:16:44 +01:00
Thomas Heartman
038c10f612
chore: finish up disabled strategies (#9579)
Aligns the design of disabled strategies with the sketches. Most notable
changes:
- makes the disabled badge warning yellow
- greys out the preceding "or" separator
- makes the segment "preview" button *not* grey (because it's still
interactable)

As a bonus: uses a list for the constraint value lists instead of a div
and updates the design to match the sketches (no chips).


![image](https://github.com/user-attachments/assets/1b3ddfa0-b0e8-4856-ae01-26e507590a4f)

With strat variants:

![image](https://github.com/user-attachments/assets/dc143fbf-256b-4e96-872b-a6aa84df2111)


Bonus fix: 
Lets the constraint value list wrap so that we avoid this kind of
blowout:

![image](https://github.com/user-attachments/assets/4c0977ac-f8a4-41cc-8fb7-194e8b09c0a3)

Instead: 

![image](https://github.com/user-attachments/assets/a68ed4cf-c68c-43a1-9d6c-b90e85a0841f)
2025-03-19 15:40:23 +01:00
Thomas Heartman
f5b26340e7
chore: Updates change request sidebar to remove env/cloud icon (#9577)
Removes the cloud icon in the change request env header to better align
with the new env headers in the flag environment overview.

Also hides strategy variants in favor of using the new strategy
execution component.

As a bonus: also uses a link component instead of a button for
navigating to the change request page.

With flag enabled: 

![image](https://github.com/user-attachments/assets/0391c845-d68c-44fa-a747-1c21f5a9c2f4)


![image](https://github.com/user-attachments/assets/ac84be9b-15fb-4d0b-9737-69643332fa23)
2025-03-19 11:13:11 +01:00
Fredrik Strand Oseberg
aad5a6a1a9
Feat/tag type colors frontend (#9566)
Add frontend support for tag type colors
2025-03-19 10:03:33 +01:00
Thomas Heartman
0542fef5d8
chore(1 3493): handle cases with no strategies (#9563)
Handle cases where flags have no strategies in the playground.

As part of this, also changes how we deal with the padding/margins in
the playground: instead of making all but one items in the playground
have to explicitly add padding, now we instead say that the only item
that needs to do something is the list, which uses negative inline
margins.

This also has the added benefit of adding all the top-level elements
(that is: that's not part of the strategy lists) inside the same
container, so we can control gaps between them with flex's gaps.

When you have no strategies (before):

![image](https://github.com/user-attachments/assets/52c85ba4-0738-4aa7-b2ac-84e5f0f65b45)


When you have no strategies (after):

![image](https://github.com/user-attachments/assets/80f5ce75-29e5-4b6d-b707-213cb79d53cc)
2025-03-18 15:12:23 +01:00
David Leek
890bbcaaa0
chore: rename release management to release templates (#9564) 2025-03-18 14:52:47 +01:00
Thomas Heartman
c5fa7c82fd
chore: add spacing to playground header + style segment's no constraints text (#9561)
This adds two small visual changes:
1. Add some spacing to the playground header (so that the custom
strategies info box (or other alerts) get some breathing room. (It
slightly increases the text between the header and the flag result text,
but I'll leave that as is unless we get told otherwise. It's partially
because of extra padding on the close button etc, and will be more work
than I wanna put in right now).

2. Style the "this segment has no constraints" text for empty segments
to use a smaller, less prominent font.


Playground header before:

![image](https://github.com/user-attachments/assets/821b2711-8ab4-4390-8f6b-718c7bd97731)


Playground header after:

![image](https://github.com/user-attachments/assets/08a446a7-7d8f-4c69-b539-b662a6c7be54)


Segments text before:

![image](https://github.com/user-attachments/assets/b5ad60f8-3423-406c-8b48-e28c5190f956)

Segments text after:

![image](https://github.com/user-attachments/assets/f23a640e-dcfd-441d-8fc0-c7a31c6054af)
2025-03-18 14:07:23 +01:00
Thomas Heartman
43685f516e
chore: segment execution in playground (#9558)
Adds segment execution results to the playground and moves the existing
segment execution into a legacy file.

New:

![image](https://github.com/user-attachments/assets/870d87dd-46a3-4867-bf89-256165f669f0)

Old:

![image](https://github.com/user-attachments/assets/7624a169-9622-4785-9405-405466a89e6f)
2025-03-18 13:54:00 +01:00
Tymoteusz Czech
99fcdb1f23
fix: segment spacing in strategy constraints (#9559) 2025-03-18 13:03:52 +01:00
Thomas Heartman
c89cf196e7
Use new strategy execution in playground (#9553)
Implements playground results for strategies.

Old design:

![image](https://github.com/user-attachments/assets/6c1f1bad-4568-4959-82ee-3ebc6a0aab2d)

New design:

![image](https://github.com/user-attachments/assets/8991fc67-7055-4f6c-b2cb-b2d445057962)


Still left: segments.

I also discovered during this that some of the new hooks (and also some
of the new components) accept deprecated types
(`IFeatureStrategyPayload` in this case). If that should indeed be
deprecated, then we also shouldn't use it in the new hooks / components
if we can avoid it. I'll make a task for it.

---------

Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2025-03-18 11:23:02 +01:00
David Leek
33733b64a7
chore: fix missing primary routes for commandbar (#9557) 2025-03-18 10:13:23 +00:00
David Leek
35ed2dabf3
feat: rework navigation sidebar admin section (#9556) 2025-03-18 10:35:06 +01:00
Thomas Heartman
7efe5c5311
chore: implement design for disabled environments in playground (#9544)
Adds the new design for strategy lists in disabled environments.


![image](https://github.com/user-attachments/assets/3d7c4e05-1a49-4a87-a6fa-b7491d86fab2)
2025-03-17 15:30:08 +01:00
Thomas Heartman
cf1ba8fcc5
Chore(1-3390)/playground strategy execution: constraints (#9532)
Implements the new design for playground constraints. They're not in use
in segments yet, and strategy parameters have not been touched. This PR
establishes a pattern that we can follow for strategies and parameters
later.


![image](https://github.com/user-attachments/assets/c23d538d-f27f-43f2-8e29-fa8044c11d48)

The PR also includes a change in how the constraint item organizes its
children: it now takes care adding padding and spacing itself, instead
of the children doing that. It looks right most places, but segments
aren't quite right anymore. However, as this is behind a flag, I'd
rather fix that in a separate PR.

---------

Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2025-03-17 14:30:11 +01:00
Jaanus Sellin
6d6a4290fe
feat: requests consumption UI for frontend (#9550)
Switching frontend traffic tab to use the requests consumption API:
2025-03-17 12:55:01 +02:00
Jaanus Sellin
f093a3f4b3
chore: update orval types (#9549) 2025-03-17 11:52:25 +02:00
Thomas Heartman
2b634438a1
fix: only drag handle is draggable, allow you to select text in the header (#9536)
Previously, the entire card was draggable, which meant that you couldn't
select text inside the card or inside the milestone title when editing.
This makes it so that only the drag handle is draggable.
2025-03-17 10:52:09 +01:00
Nuno Góis
3a59886206
chore: access overview search (#9547)
https://linear.app/unleash/issue/2-3407/add-search-to-the-access-overview

Adds search to Access Overview.


![image](https://github.com/user-attachments/assets/20ba5266-ad67-43ff-8c31-79517951f893)
2025-03-17 08:46:09 +00:00
Nuno Góis
76b3e06fe5
chore: categorize access overview (#9546)
https://linear.app/unleash/issue/2-3346/only-show-description-and-not-permission-first-column-and-group

Categorizes the permissions in our Access Overview.


![image](https://github.com/user-attachments/assets/9b9fc8b3-78fb-48eb-a9f5-0f7f7683d2b7)
2025-03-17 08:24:48 +00:00
David Leek
e38a58d635
fix: use the correct permission for the create template button (#9545) 2025-03-14 14:42:28 +01:00
Tymoteusz Czech
14512c73d6
fix: command bar z-index (#9543) 2025-03-14 11:46:44 +01:00
Thomas Heartman
85ea5ce5e2
chore: Delete unused files (#9542)
These files are never used anywhere, so we might as well remove them.
2025-03-14 11:22:10 +01:00
Thomas Heartman
af705ad0e0
fix(1-3489): strategy dragging is broken in env overview (#9538)
Fixes strategy dragging in project envs. Not sure why this works, but
apparently, making it a variable instead of react component takes care
of it?
2025-03-14 11:22:02 +01:00
Nuno Góis
8e67594f1b
chore: change access overview to lists in accordions (#9535)
https://linear.app/unleash/issue/2-3343/accordions-not-a-must-have

https://linear.app/unleash/issue/2-3345/indicator-of-how-many-permissions

Changes our Access Overview from tables to lists in accordions. Also
includes the total permissions in the accordion summary.

Looking at the designs it seems like lists would make the most sense,
both visually and in terms of semantics. This will also allow us to
group the permissions both visually and semantically in a future task.


![image](https://github.com/user-attachments/assets/0692b4f3-0fc5-482c-b963-c731bf5113f5)

### Update

Also improved our project permissions label.


![image](https://github.com/user-attachments/assets/cbb2c298-1f85-4a78-b3ff-3140c567f756)


![image](https://github.com/user-attachments/assets/f3d5c623-4013-4a47-a4b1-5af2e63cb01e)

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2025-03-14 10:21:14 +00:00
Tymoteusz Czech
872162eb7c
fix: new header z-index style (#9541) 2025-03-14 11:18:20 +01:00
Tymoteusz Czech
3912b443d0
fix: command bar search padding 2025-03-14 11:13:11 +01:00
David Leek
bdc21cc4e2
chore: mark release mgmt new in unleash as beta (#9540) 2025-03-14 10:51:33 +01:00
David Leek
f9c152995c
chore: new flag adminNavUI for admin UI 2.0 (#9537) 2025-03-14 09:30:30 +01:00
David Leek
8ab1a49294
chore: clean up frontend routes (#9533) 2025-03-14 08:18:01 +01:00
Nuno Góis
0d0530b61c
chore: rename access matrix to access overview (#9531)
https://linear.app/unleash/issue/2-3344/new-name-access-overview-instead-of-access-matrix

Renames Access Matrix to Access Overview, both internally (code) and
externally (UI).
2025-03-13 15:23:58 +00:00
Thomas Heartman
dadda7b648
fix: Data usage graphs don't work in UTC-n time zones (#9530)
Fixes a number of issues that would surface in UTC-n (where n > 1)
timezones. I've not found a way to check this with tests (and it looks
like [we weren't able to last time
either](https://github.com/Unleash/unleash/pull/9110/files#r1919746328)),
so all the testing's been done manually by adjusting my system time and
zone. (From what I understand, you can't generate a Date with a specific
TZ offset in JS: it's only utc or local time)

Resolved:
- [x] Selecting "Jan" in the dropdown results in the selection being
"December" (off by one in the selector)

- [x] Selecting a month view only gives you one data point (and it's
probably empty). Wrong date parsing on the way out resulted in sending
`{ from: "2025-02-28", to: "2025-02-28"}` instead of `{ from:
"2025-03-01", to: "2025-03-31"}`

- [x] The dates we create when making "daysRec" need to be adjusted.
They showed the wrong month, so the dates were off.

- [x] Make sure the labels are correct when hovering over. Again: we
used the wrong month for generating these.

- [x] The available months are wrong. Incorrect month parsing again.

- [x] The request summary month is wrong. You guessed it: incorrect
month parsing
2025-03-13 15:44:10 +01:00
Thomas Heartman
732b7f342a
chore: Playground Strategy Lists (#9510)
Continue the implementation of Playground strategy lists. This PR also
adjusts some existing strategy container and list items to accomodate
more use cases (such as this).

The playground strategy execution component is still the old design.

After (playground results):

![image](https://github.com/user-attachments/assets/f32505ba-f040-4491-a298-6e8bf606536d)

After (env strategy list):

![image](https://github.com/user-attachments/assets/b39174c7-3ee2-4fb4-aa7c-b51134c740b8)

Before (env strategy list):

![image](https://github.com/user-attachments/assets/a0a045e5-3623-44ef-96fa-8ba2f5be6b98)
2025-03-13 12:01:44 +01:00
Tymoteusz Czech
863788d7b3
Feat(UI): new strategy variant chips (#9507)
- new way of showing strategy variants
- fixed wrapping issue in strategy editing, for a lot of variants
defined (`SplitPreviewSlider.tsx` change)
- aligned difference between API and manually added types
2025-03-13 11:27:45 +01:00
Nuno Góis
5ad3178590
refactor: remove unused access overview component (#9527)
https://linear.app/unleash/issue/2-3396/remove-unused-access-overview-component

Removes an unused access overview component.

A nice bonus is that we're adding something called [Access
Overview](https://github.com/Unleash/unleash/pull/9525) so we avoid some
confusion.
2025-03-13 09:21:57 +00:00
Nuno Góis
8ab24fd3bf
chore: users actions menu (#9525)
https://linear.app/unleash/issue/2-3342/new-entrance-point-create-dot-dot-dot-menu-instead-of-icons

Adds a new users actions menu.

Should this change be behind a flag? I'm leaning towards no, but if you
think otherwise let me know.

### Previous

![image](https://github.com/user-attachments/assets/6becffc5-c5e2-4e21-88bf-8644d1337c68)

### After

![image](https://github.com/user-attachments/assets/968859f0-f562-4252-bc93-fe362c5bc378)

### If user is SCIM-managed

![image](https://github.com/user-attachments/assets/275581b5-4cd2-4a8b-9f35-42e9f493102f)
2025-03-13 09:02:06 +00:00
Mateusz Kwasniewski
1b7f91cd4b
feat: read backend connections UI (#9526) 2025-03-13 10:56:29 +02:00
David Leek
22f51df76c
feat: archived indicators and disabled button when editing archived template (#9503) 2025-03-13 09:16:55 +01:00
Mateusz Kwasniewski
29181118ce
chore: orval generation (#9524) 2025-03-12 16:47:55 +01:00
Nuno Góis
6b888abe10
chore: remove project at least one owner constraint (#9517)
https://linear.app/unleash/issue/2-3393/remove-project-at-least-one-owner-constraint

Removes our constraint that the project must have at least one owner.
2025-03-12 10:37:20 +00:00
Nuno Góis
242b0de592
chore: show events IP (#9512)
https://linear.app/unleash/issue/2-3392/visualize-event-log-ip-address-on-unleash-enterprise-ui

Shows events IP for Unleash Enterprise.


![image](https://github.com/user-attachments/assets/3ffbc69b-6dce-4c16-9d3d-77a404623d96)
2025-03-12 10:06:29 +00:00
Melinda Fekete
7534b66c18
Fix broken anchors in docs (#9406) 2025-03-11 11:45:40 +01:00
Thomas Heartman
a064672635
chore(1-3422): playground strategies list (#9504)
Initial rough work on adapting the playground strategies to the new
designs. This PR primarily splits components into Legacy files and adds
new replacements. There are *some* updates (including spacing and text
color), but nothing juicy yet. However, I wanted to get this in now,
before this PR grows even bigger.
2025-03-11 11:36:14 +01:00
Thomas Heartman
be57f9f8fd
chore: remove apitoken.username (#9448)
Removes usage of the deprecated API token property `username` and uses
`tokenName` instead.

Affected components:

Token table:

![image](https://github.com/user-attachments/assets/7275e9ae-a79c-4815-9f8d-157008480b97)


Token deletion dialog:

![image](https://github.com/user-attachments/assets/1c47cd3d-c7ff-4547-9779-eaba16274d1e)


Environment post-clone screen (which is automatically hidden now, so it
... doesn't matter)
2025-03-11 08:32:50 +01:00
Tymoteusz Czech
312adc0c1a
chore: remove granularAdminPermissions flag (#9467)
- removed a flag
- deprecated `POST /admin/ui-config` endpoint in favor of `POST
/admin/ui-config/cors`
2025-03-10 16:36:59 +01:00
Thomas Heartman
7dd89034aa
chore: use new designs for project default strategies (#9447)
Implements the new strategy list design for default strategies. Moves
the old impl into a legacy file. Also: removes the description from the
strategy item. From my digging, we only showed this for default strategy
items and it didn't really provide any useful information. The only
other place you can add a description is for custom strategies (at least
that I could find), but these are deprecated and we never show the
description when you apply the strategy anyway.

Rendered:

![image](https://github.com/user-attachments/assets/fb244f10-0a19-42f5-a517-090d6703c76a)

Without the flag (nothing changes):

![image](https://github.com/user-attachments/assets/62159338-8b26-4cb2-825d-e20965c6558d)
2025-03-10 16:09:32 +01:00
Thomas Heartman
23852afcdd
chore: Constrains custom strategy titles to a single line (#9469)
Constrains long custom strategy titles to a single line.

Before:

![image](https://github.com/user-attachments/assets/e00545db-bf95-4539-ac6e-557a8784ddd0)


After:

![image](https://github.com/user-attachments/assets/266bad74-77ba-4e59-8317-2d6b9d2333a7)
2025-03-10 14:09:05 +00:00
Thomas Heartman
51c9617da8
Fix: weird strategy spacing on envs without release plans (#9466)
Fixes a visual bug where envs without release plans would get too much
spacing on the top of their first strategy.

It does this flattening the list of strategies if there are no release
plans. In doing so, I have extracted the strategy list rendering into a
separate component (to make things more legible and re-usable) and have
also removed the FeatureStrategyEmpty component and marked it as
deprecated. In the new designs, you can't expand envs without
strategies, so the component is no longer needed.

Before (what looks like a shadow is actually the extra list being
rendered with a bit of padding):

![image](https://github.com/user-attachments/assets/5ba06ac9-046c-4fbd-8b46-b077b8a0570b)

After:

![image](https://github.com/user-attachments/assets/64270582-1221-4bdf-a85b-c24ce23bd4a3)
2025-03-10 14:49:26 +01:00
Mateusz Kwasniewski
3059d23446
feat: always show features table (#9446) 2025-03-10 10:19:36 +01:00
Mateusz Kwasniewski
6d02e33680
feat: rename api token column (#9445) 2025-03-10 10:16:36 +01:00
Thomas Heartman
220550071f
chore(1-3450): Place strategy names and titles on the same line (and fix list nesting issues) (#9443)
Moves strategy titles and names onto the same line, as per the new
designs.

In doing so, I've also updated the component to use a more semantic
hgroup with the header being the strategy title if it exists or the
strategy name if not.

The downside of being more semantically correct here is that we need to
know what header level we want the strategy to use. In most cases,
that's 3 (e.g. flag name > environment > strategy, release plan >
milestone > strategy), but for plans on flag envs, it's 4 (flag name >
env > milestone name > strategy).

I've also taken the opportunity to fix a little mistake I made earlier.
`ol`s can only have `li` children, and I'd forgotten to wrap a nested
`ol` inside an `li`. The changes in `EnvironmentAccordionBody` all
relate to that change. Because we now have several layers of lists
nested within each other, dealing with styling and padding gets a little
tricky, but CSS has the power do help us out here.

Rendered:

![image](https://github.com/user-attachments/assets/634615fe-b06d-4baa-8aa3-22447d1fb8b4)
2025-03-07 13:09:36 +01:00
Thomas Heartman
f6987909e7
Chore(1-3449): release plans in strategy env (#9441)
Use new design for release plans in flag environments.

- Move old ReleasePlanMilestone into Legacy file and update imports
- In the new version, use the same strategy list and item as in the
general strategy list and milestone template creation (components to be
extracted in the future)
- Fix an issue with the border being obscured by overflow by hiding
overflow


![image](https://github.com/user-attachments/assets/2258263d-aa96-4939-8af1-88236050cbd6)
2025-03-07 11:18:09 +01:00
Thomas Heartman
7db692e976
fix: Only show accrued traffic charges and estimated overages for the current month (#9440)
For past months, customers can refer to their invoices instead. Hiding
it when the selection is not the current month avoids weird things such
as estimation errors due to to a month not having finished (vs what it
actually *was* when it finished), potential changes in traffic package
pricing, etc.
2025-03-07 07:32:15 +00:00
Thomas Heartman
e5be1bf43e
Fix: drag and drop reverts to previous position on drop (#9439)
Fixes an issue where, when dragging large expanded milestone cards, the
position would revert from the current visual state to the previous one
when you drop the item.
2025-03-06 14:11:48 +00:00
Thomas Heartman
2e2bb9cf25
refactor: don't use absolute positioning for drag handle (#9434)
Avoids absolutely positioning the drag handle by instead creating a two
column grid where column 1 is the drag handle, column two is the
milestone card. The grid has a negative margin based on the padding of
the form container. I wanted to avoid modifying the form container
component (because we use it in so many places), so I used css variables
to store the information and hook into that further down the line.

Rendered:

Wide:


![image](https://github.com/user-attachments/assets/bb43b1b9-595b-475e-a59f-24ebf82df489)

Narrow:

![image](https://github.com/user-attachments/assets/344b9c6f-08e7-43ca-8a02-1b224ccdd2c8)

## Known bugs and limitations
The current drag implementation has some issues if you try to drag
something over a large, expanded card. They'll trade places visually,
but when you let go, the revert back to where they were. We can avoid
that by modifying the onDrop function in the drag handler, but I don't
want to do that before checking all the other places where we do drag
and drop ([linear
ticket](https://linear.app/unleash/issue/1-3458/drag-and-drop-is-a-little-finicky)).

I also want to get UX to sign off on this before making those changes.
2025-03-06 14:21:19 +01:00
Thomas Heartman
8629cda4d7
chore: remove dataUsageMultiMonthView flag (#9429)
Remove data usage multi month view flag and deprecated components and
functions.
2025-03-05 12:08:33 +01:00
Thomas Heartman
2e086161eb
refactor: strategy draggable item is now proj/env agnostic (#9411)
Updates `StrategyDraggableItem` (and `StrategyItem`) to be project/env
agnostic. They now instead expect you to pass in the required header
items (CR badges, strategy actions) at the call site. Updates their
usage in the feature env accordion, and the release plan card.

All components that have been updated are part of the new overview
rework. The legacy components (which are used when the flag is off)
remain untouched.

Also makes a few small tweaks explained in inline comments.

## Rendered 

Milestone card (with flag on):

![image](https://github.com/user-attachments/assets/828d5fe4-4b07-4ebe-86cd-1ab24608ba31)

Milestone card (with flag off):

![image](https://github.com/user-attachments/assets/10e37cc4-e5e4-4a07-a4f9-5e5f5c388915)


Feature env accordion (flag on (no change)):

![image](https://github.com/user-attachments/assets/2e5db9e7-24b1-4b3e-9434-4705e5737157)


Feature env accordion (flag off):

![image](https://github.com/user-attachments/assets/469970b6-ab57-4332-a99f-8f8e2e645230)
2025-03-05 10:34:55 +01:00
Thomas Heartman
a50fb7db35
chore: remove frontendHeaderRedesign flag (#9428)
Removes all references to the flag and deletes unused components.
2025-03-05 09:40:53 +01:00
David Leek
f6bb94addf
feat: UI for archiving release templates (#9415) 2025-03-05 08:08:57 +01:00
Gastón Fournier
4ae09fdb05
fix: copy strategy is allowed to copy to self (duplicate) (#9407)
When checking for permissions we were checking if the user was allowed
to copy to other environments but it can also copy to the same
environment.

Before the change: 

![image](https://github.com/user-attachments/assets/3bb1b738-8a4b-4c1b-b45f-c48895454c0a)


After the change: 

![image](https://github.com/user-attachments/assets/869e0fed-b7da-436c-93b4-fc50b6830e45)
2025-03-03 17:11:50 +01:00
Simon Hornby
f3ede7681f
chore: flip UI and backend validation for project env disabling (#9395) 2025-03-03 17:13:41 +02:00
Thomas Heartman
596577a1b7
feat: use new strategy list in release plans (#9405)
Here's an initial first pass of replacing the strategy lists in release
plan milestones.

The existing MilestoneCard has been moved to a Legacy file to avoid
conflicts.

This PR places the strategies in a list and changes the background color
of the list items (the strategies themselves still have a white
background, however).

It also re-orders the buttons in the footer and places the
milestone-level drag handle outside the milestone card.


![image](https://github.com/user-attachments/assets/5807bf09-ecbc-4539-a507-03482face154)

## For later

Changing out the strategy list item itself hasn't been done yet. I want
to see if we can re-use the existing strategy draggable item instead of
making a copy. There's some dependencies on project path params etc that
need to be worked out first, though, so I'd prefer to do get these
initial changes through first.
2025-03-03 13:17:55 +01:00
David Leek
90fe02ed0d
fix: solve 31 day month issue by using trafficUnitSize and not constant 1_000_000 (#9404) 2025-03-03 11:16:48 +01:00
Melinda Fekete
eee212f3f0
Update docs for data and privacy (#9397) 2025-02-28 16:28:32 +01:00
Tymoteusz Czech
1b67b288ee
Segment view for strategy evaluation (#9399)
Refactored "segments" part of strategy evaluation. This shows a lot of places, that use "Legacy" component.
2025-02-28 15:15:25 +01:00
Nuno Góis
8d0820fc8b
chore: release plan replacement UI (#9400) 2025-02-28 14:14:34 +01:00
Nuno Góis
da91ae6afe
chore: new add release plan dialog (#9389)
https://linear.app/unleash/issue/2-3249/adding-a-release-plan-to-a-non-cr-environment-feels-too-immediate

This adds a new confirmation / preview dialog when adding a release
plan.

What's cool about it is that it will describe what will happen before
you confirm. It also acts as the "add to CR" dialog, so we now only have
1 dialog instead of 2 separate ones.

This also refactors quite a bit of our code here, hopefully simplifying
it.

### Simple (env disabled)

![image](https://github.com/user-attachments/assets/579697a8-5b21-4400-a48b-96d2df3931f6)

### CR protected (env enabled)

![image](https://github.com/user-attachments/assets/35398bc9-faed-4ce1-8c78-52e89fe21f4a)
2025-02-28 10:57:20 +00:00
Nuno Góis
2064cae20f
chore: release template card min height (#9390)
https://linear.app/unleash/issue/2-3328/release-template-cards-should-have-a-consistent-minimum-height

Sets a consistent min height in our release template cards.


![image](https://github.com/user-attachments/assets/4e1f1994-6044-4df0-9019-abe76ffc9a37)
2025-02-28 10:23:21 +00:00
Tymoteusz Czech
a6cfcea029
refactor: new constraints style (#9363)
Refactored styles for strategy evaluation parameters. New look for constraints etc
2025-02-28 10:49:23 +01:00
Thomas Heartman
97fd1c0fec
chore(1-3423): adapt existing tests to new components (#9396)
Adds tests for the new version of components that were moved to legacy
files in https://github.com/Unleash/unleash/pull/9361 and where there
were tests already.
2025-02-28 09:45:29 +00:00
Thomas Heartman
0a0d6e9e2a
refactor(1-3429): makes the drag args optional, defaulting to noops (#9394)
Removes the `() => {} as any` args from the StrategyDraggableItem
invocation when you have paginated strats. Instead makes all the drag
params optional. It defaults to a no op if not provided.

Also, the reason it had to be typed as `any` before is probably because
it was missing a function. The correct empty param is `() => () => {}` 💁
2025-02-28 08:45:01 +00:00
Mateusz Kwasniewski
bf78d74dc5
feat: frontend traffic tab (#9385) 2025-02-27 16:02:09 +01:00
Thomas Heartman
d5d172647c
chore: deprecate envAccordion colors; update non-legacy components (#9378)
Deprecates the `envAccordion` colors (`expanded` and `disabled`) and
updates the components that I do not expect to be deprecated as part of
the strategy facelift project to use `elevation1` instead.

The difference is very slight. envAccordion.expanded:

![image](https://github.com/user-attachments/assets/affaa000-11a7-45af-ac1e-1454281615d8)

Elevation 1:

![image](https://github.com/user-attachments/assets/6baa7219-7a6b-4e5d-bd55-1da9e284e7ed)
2025-02-27 15:29:37 +01:00
Thomas Heartman
63d4b8b0e4
chore: adjust env dropdown (#9382)
Adjusts styling of the env dropdown now that we have both release plans
and strategies.

Key points:
- simplifies strategy separator, removes inherent height. Also: extracts
it from the draggable component (it has no business knowing whether to
add that or not)
- Puts release plans and strategies in the same list so that it becomes:
```markdown
- Release plan
  - strategy 1
  - strategy 2
- (OR) Strategy A
- (OR) Strategy B
```
- Adjusts some padding around to make it line up properly
- Swaps a couple conditional renders for ternaries


Rendered:

![image](https://github.com/user-attachments/assets/d6d5cd56-572f-419e-90ed-6449a63fdc96)

## Still todo:

Handle cases where you have >50 strats and we show the warning etc. It's
a little trickier because of how it interacts with release plans, so I
wanna leave that for later.

I'm also unsure about how we handle spacing today. All the little items
have their own different spacing and I'm not sure it won't get out of
sync, but I'm also not sure how else to handle it. We should look at it
later.
2025-02-27 15:28:41 +01:00
Mateusz Kwasniewski
426f53cd8d
test: connection count chart functions (#9383) 2025-02-27 14:38:49 +01:00
Mateusz Kwasniewski
f46ec293df
feat: backend connections tab (#9381) 2025-02-27 13:38:42 +01:00