1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-08 01:15:49 +02:00
Commit Graph

3802 Commits

Author SHA1 Message Date
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
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
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
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