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

5863 Commits

Author SHA1 Message Date
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
renovate[bot]
097c83edfb
chore(deps): update dependency vite to v5.4.16 [security] (#9666)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vite](https://vite.dev)
([source](https://redirect.github.com/vitejs/vite/tree/HEAD/packages/vite))
| [`5.4.15` ->
`5.4.16`](https://renovatebot.com/diffs/npm/vite/5.4.15/5.4.16) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vite/5.4.16?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/5.4.16?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/5.4.15/5.4.16?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/5.4.15/5.4.16?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

### GitHub Vulnerability Alerts

####
[CVE-2025-31125](https://redirect.github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8)

### Summary

The contents of arbitrary files can be returned to the browser.

### Impact
Only apps explicitly exposing the Vite dev server to the network (using
`--host` or [`server.host` config
option](https://vitejs.dev/config/server-options.html#server-host)) are
affected.

### Details

- base64 encoded content of non-allowed files is exposed using
`?inline&import` (originally reported as `?import&?inline=1.wasm?init`)
- content of non-allowed files is exposed using `?raw?import`

`/@&#8203;fs/` isn't needed to reproduce the issue for files inside the
project root.

### PoC

Original report (check details above for simplified cases):

The ?import&?inline=1.wasm?init ending allows attackers to read
arbitrary files and returns the file content if it exists. Base64
decoding needs to be performed twice
```
$ npm create vite@latest
$ cd vite-project/
$ npm install
$ npm run dev
```

Example full URL
`http://localhost:5173/@&#8203;fs/C:/windows/win.ini?import&?inline=1.wasm?init`

---

### Release Notes

<details>
<summary>vitejs/vite (vite)</summary>

###
[`v5.4.16`](https://redirect.github.com/vitejs/vite/compare/v5.4.15...v5.4.16)

[Compare
Source](https://redirect.github.com/vitejs/vite/compare/v5.4.15...v5.4.16)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" in timezone Europe/Madrid,
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-01 09:01:45 +00:00
David Leek
f7dbfe1162
chore: admin menu enterprise badge (#9656) 2025-04-01 09:13:40 +02:00
renovate[bot]
98a0fba1cb
chore(deps): update dependency vite to v5.4.15 [security] (#9663)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [vite](https://vite.dev)
([source](https://redirect.github.com/vitejs/vite/tree/HEAD/packages/vite))
| [`5.4.14` ->
`5.4.15`](https://renovatebot.com/diffs/npm/vite/5.4.14/5.4.15) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vite/5.4.15?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/5.4.15?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/5.4.14/5.4.15?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/5.4.14/5.4.15?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

### GitHub Vulnerability Alerts

####
[CVE-2025-30208](https://redirect.github.com/vitejs/vite/security/advisories/GHSA-x574-m823-4x7w)

### Summary
The contents of arbitrary files can be returned to the browser.

### Impact
Only apps explicitly exposing the Vite dev server to the network (using
`--host` or [`server.host` config
option](https://vitejs.dev/config/server-options.html#server-host)) are
affected.

### Details
`@fs` denies access to files outside of Vite serving allow list. Adding
`?raw??` or `?import&raw??` to the URL bypasses this limitation and
returns the file content if it exists. This bypass exists because
trailing separators such as `?` are removed in several places, but are
not accounted for in query string regexes.

### PoC
```bash
$ npm create vite@latest
$ cd vite-project/
$ npm install
$ npm run dev

$ echo "top secret content" > /tmp/secret.txt

# expected behaviour
$ curl "http://localhost:5173/@&#8203;fs/tmp/secret.txt"

    <body>
      <h1>403 Restricted</h1>
      <p>The request url &quot;/tmp/secret.txt&quot; is outside of Vite serving allow list.

# security bypassed
$ curl "http://localhost:5173/@&#8203;fs/tmp/secret.txt?import&raw??"
export default "top secret content\n"
//# sourceMappingURL=data:application/json;base64,eyJ2...
```

---

### Release Notes

<details>
<summary>vitejs/vite (vite)</summary>

###
[`v5.4.15`](https://redirect.github.com/vitejs/vite/releases/tag/v5.4.15)

[Compare
Source](https://redirect.github.com/vitejs/vite/compare/v5.4.14...v5.4.15)

Please refer to
[CHANGELOG.md](https://redirect.github.com/vitejs/vite/blob/v5.4.15/packages/vite/CHANGELOG.md)
for details.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" in timezone Europe/Madrid,
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-31 16:20:38 +00:00