1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-12-21 20:06:40 +01:00
Commit Graph

14815 Commits

Author SHA1 Message Date
Thomas Heartman
581a8b83f6
Merge 767b2115f6 into eca2ca395b 2025-12-19 13:55:31 +01:00
Thomas Heartman
eca2ca395b
fix: context field link in project context list takes you to flags list (#11184) 2025-12-19 13:49:38 +01:00
Fredrik Strand Oseberg
62a97a47aa
feat: impact metrics empty state (#11179)
Add empty state for impact metrics
2025-12-19 13:42:48 +01:00
Thomas Heartman
75b153883e
fix: correctly list legal values for project context fields (#11183)
Fixes the bug where project context fields wouldn't have their legal
values picked up when assigning them. The issue was that this context
call wasn't correctly set to be project specific.
2025-12-19 13:32:14 +01:00
Thomas Heartman
85defeb605
chore: delete file that was commited by accident (#11182)
This should never have been added.
2025-12-19 12:49:45 +01:00
Thomas Heartman
6a02be8417
feat: allow selection of project-scoped context fields in strategy edits (#11171)
Allows you to use project-scoped context fields in strategy edits and in
project segments.

To do so, introduces a new hook that combines global and project level
segments (using the existing api paths).

Adding project context fields to the project segments works both from
the project settings menu, and from the global segments menu. Step 1 of
the segment creation form allows you to pick a project for the segment.
If this is set, then we use that to fetch the correct context fields.

There isn't anything that'll stop you from moving a project segment to
the global level, though. But that's an edge case we can handle later.

Global segment form:
<img width="1145" height="707" alt="image"
src="https://github.com/user-attachments/assets/a187b5be-522d-4daf-bfb3-7c3c2c6a8cab"
/>

<img width="1145" height="707" alt="image"
src="https://github.com/user-attachments/assets/a23f0643-8f6f-4843-9077-73bbad63d845"
/>

Strategy edit:
<img width="1257" height="364" alt="image"
src="https://github.com/user-attachments/assets/4d747149-656f-4746-881c-1ce876079eff"
/>

## Why update segments?

I realized that the 'editable constraints list' component is used in two
places: the strategy edit form, and the second step of the segment form.
So we got that for free, just had to pass the right project along to get
the segment in the overview.

## Discussion point

With the new hook for combined, I'd have loved to go back and remove the
project Id and url update check in useUnleashContext (because we only
use it with project ids in two places). However, it serves a use case
that isn't covered by the new hook: it returns *only* project or *only*
global context fields. We could probably change the wrapper somehow to
only pass in the correct context fields, though. I'll explore that in a
follow-up.

----

Additionally, there's no way to select project-specific context fields
in the playground yet. I've added a task for it.
2025-12-19 10:54:43 +01:00
Copilot
9074fb0efe
Fix docs link 404s in Spring Boot and React tutorials (#11177) 2025-12-19 09:29:50 +01:00
Healsi
53c57ff1c4
Chore: Tweaks to typography (#11103)
## About the changes
The purpose of the changes are to increase consistency and readability in the UI. The changes are mainly related to the styling of typographic elements.

##Details: 
- Update theme typography: add fontWeightRegular, set medium weight to 500, update headers to fontWeight 700
- Standardize font sizes: apply body2 variant to navigation links, buttons, tabs, and sidebar
- Enhance visual hierarchy: make selected navigation items, current breadcrumb page, and page headers bold
- Update component styling:
  * Navigation: bold selected menu items, medium weight for links
  * Buttons: body2 font size, bold font weight
  * Tables: medium weight headers (bold when sorted), bold feature flag names
  * Tabs: body2 font size, bold environment names
  * Projects page: bold titles, project names, and card titles
  * UserProfile: reduce avatar size, update spacing, use body2 with medium weight
- Replace deprecated fontSizes with typography.fontSize throughout
- Update Google Fonts Sen import to include weight 500
2025-12-18 14:55:45 +00:00
Thomas Heartman
767b2115f6
chore: add new standardized fetcher (and hopefully update all other uses)
Adds a new `createFetcher` function that's exposed from `useApiGetter`.

Much like in https://github.com/Unleash/unleash/pull/6541, I'm tired of having to manually redeclare the fetcher in each and every fetching hook, especially when it's always the exact same. As such, I'd like to create a shared standard.

... But that didn't work the last time. Presumably because existing uses weren't updated. I'd suggest that if we do this, then we should update all existing hooks so that the next time someone copies an existing fetch hook, they get the new fetcher instead of the old one.

Additionally, this `createFetcher` function has two improvements on the existing `fetcher` function:
1. It takes the path and errorTarget as part of an object instead of positional parameters. Because both params are of type string, it's possible to mix up the order, so I think it makes sense to enforce the object here.
2. Returns a function that returns the fetcher instead of returning the fetcher directly. All the places in the code where we use the `fetcher` function, we use it as `() => fetcher(args)`. If it's always gonna be a function, why don't we just do that directly?
2025-12-18 13:36:16 +01:00
Nuno Góis
2cd1909a45
chore: add readOnlyUsers feature flag (#11173)
https://linear.app/unleash/issue/2-4086/add-readonlyusers-feature-flag

Adds the `readOnlyUsers` feature flag.
2025-12-18 12:30:59 +00:00
Saulius Astromskis
d95b3907ac
chore: change token rate limit log to debug (#11167)
The token rate-limit logs at info level generate a lot of data that is
not particularly useful during normal operations.

We decided to keep the log level at info, but reduce the amount to 10%

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2025-12-18 11:49:50 +01:00
Fredrik Strand Oseberg
3fb69cfe9a
feat: trigger the splash screen from new in unleash (#11170)
Add support for triggering the splash screen modal from the new in
Unleash toast
2025-12-18 10:50:54 +01:00
Mateusz Kwasniewski
fab340f3dc
feat: project context field import with different project (#11169) 2025-12-18 10:42:40 +01:00
Fredrik Strand Oseberg
bc4b6cdf1f
fix: add cdn.getunleash.io to media-src (#11168)
Add self and cdn as allowed sources for mediaSrc in our CSP.
2025-12-18 09:35:12 +01:00
Mateusz Kwasniewski
97d393059f
feat: project context field adoption (#11166) 2025-12-18 09:29:59 +01:00
Utkarsh Soni
01ec0cc3aa
Fix broken architecture diagram link in README (#11154) 2025-12-17 15:38:41 +01:00
Nuno Góis
f6307ff8e4
chore: add permission guard to license page (#11163)
https://linear.app/unleash/issue/e2120a1f-6892-43ee-b118-e056aea25b50

When browsing Unleash as a viewer I noticed the license page displayed
nothing. This adds a permission guard like we do for other pages.

This also saves us a 404 since we're not trying to fetch an endpoint
that is only available to admins.

### Before

<img width="1366" height="725" alt="image"
src="https://github.com/user-attachments/assets/c780fdf0-62e4-4036-8470-6a7b18748fff"
/>

### After

<img width="1367" height="690" alt="image"
src="https://github.com/user-attachments/assets/93c2c5c7-2ef6-4904-a036-4cffb62db23a"
/>
2025-12-17 13:24:42 +00:00
Fredrik Strand Oseberg
570f3187cd
fix: add tracking (#11162)
Add plausible tracking and use CDN for video hosting
2025-12-17 13:13:04 +01:00
Thomas Heartman
51a5395c8e
fix(chore): update the UI to use project-based context endpoints when on a project endpoint (#11160)
Reverts #11156 which was itself a revert of #11153 and then applies a
fix to two breakages
- one in the strategy configuration overview
- one in the context list

## Strategy edit context bug:
Fixed in ef6f6542bc

No context options were available in the strategy edit modal:

<img width="854" height="904" alt="image"
src="https://github.com/user-attachments/assets/6c8be391-294d-4b31-85ce-492db53c1b76"
/>

The fix itself was removing a double call to `formatApiPath`, which
would double up the base path if it's not an empty string, e.g.
`/sandbox/sandbox/api[...]` instead of `/sandbox/api[...]`.

When the base path was doubled up, Unleash would attempt to return the
base app (HTML) which obviously can't be parsed into anything useful.

## Context list bug
Fixed in c410daf183

Edit links would point to `context/edit/undefined` and editing via the
pen also caused some weird issues.

The main cause was that the `name` variable was shadowed and I didn't
realize. So when the edit string was created, it wouldn't be the context
field's name, but instead the name of the context field to delete (for
which there is a weird, stateful solution -- I remember there was a bug
that we fixed with it).

This has been fixed by moving the edit url variable declaration further
down, such that the `name` variable is in scope. additionally, I've
renamed the generic `[name, setName]` variables to
`[contextFieldToDelete, setContextFieldToDelete]` to avoid shadowing and
to make it clearer what the name is being set for.

## Scenarios tested 
Against sandbox instance with a base path (using a viewer user with
project update and context field crud permissions):

Flag off:
- [x] Create / edit / delete context field in global menu
- [x] Context fields with projects (as created with the flag on) are
show in global list when flag is off
- [x] Context fields with projects can be edited in the global list (but
are still project-based if the flag goes back on)
- [x] Context fields with projects can be deleted in the global list.
- [x] Select and edit context fields on a strategy

Flag on:
- [x] Create / edit / delete context field in global menu
- [x] Create / edit / delete context field in project menu 
- [x] Context fields with projects are not shown in global menu
- [x] Context fields not belonging to "this" project are not shown in
project-scoped menu
- [x] Select and edit (global) context fields on a strategy

## Known limitations:

Using project-scoped context fields for strategies is not yet supported.
2025-12-17 12:37:18 +01:00
Fredrik Strand Oseberg
a770549fd0
Feat/feature flag splash (#11157)
This PR sets up the new splash overlay behind a feature flag and adds
the video as an asset
2025-12-17 12:24:27 +01:00
Mateusz Kwasniewski
8205a9d973
feat: import project context fields (#11161) 2025-12-17 12:14:01 +01:00
Mateusz Kwasniewski
c08e8c82c4
feat: export project specific context fields (#11159) 2025-12-17 11:15:44 +01:00
Mateusz Kwasniewski
81d898c067
fix: revert breaking UI change context fields (#11156) 2025-12-17 07:11:57 +01:00
Thomas Heartman
62314aa66c
fix: don't attempt to get fetch strategies for new context fields on every key stroke (#11152)
Only renders the "ContextFieldUsage" component in the context form when
the form is in edit mode. It doesn't make sense to render it for context
fields that don't exist yet.

Rendering this in the create form caused the Unleash to send a request
to `/api/admin/context/:contextName/strategies` every time the name of
the context field changes (i.e. every key stroke).
2025-12-16 17:34:51 +01:00
Thomas Heartman
7369977b23
chore: update the UI to use project-based context endpoints when on a project endpoint (#11153)
Update the context field hooks to accept a project ID and to change
their API endpoints and cache keys based on the project ID.

Updating the URL in this many places (API example, multiple hooks, form
actions) feels kinda brittle and I wish there was a better way to do
this, but I don't have any bright ideas right at this moment. We could,
of course, extract a function that creates it, but that's also brittle
because they're all a little different 🤔
2025-12-16 16:21:35 +01:00
Thomas Heartman
4ef2050669
make context field fetch differentiate based on project ID (#11151)
Implements the minimum number of changes in the back end to make the get
operations work separately for project / global context.

Avoids going to the store for now, instead doing filtering in the
service.

---------

Co-authored-by: kwasniew <kwasniewski.mateusz@gmail.com>
2025-12-16 11:30:53 +00:00
Mateusz Kwasniewski
9d14ebad1a
feat: project level context api (#11149) 2025-12-16 12:21:45 +01:00
Thomas Heartman
b0c45a33c7
remove (optional) project from payload body (#11150)
Removes the project payload from the context field schema. This optional
property would only have been returned in the get endpoints (and only if
there was a project tied to a context field).
2025-12-16 09:44:43 +00:00
Thomas Heartman
50b8b73e81
expose project in the API (#11119)
Exposes the optional `project` property on the context field schema,
allowing the new feature to work e2e when the field is set (currently
only possible by manual db manipulation)

<img width="1532" height="558" alt="image"
src="https://github.com/user-attachments/assets/370757a2-01d3-43d1-9178-8b6e4215cee7"
/>

---------

Co-authored-by: kwasniew <kwasniewski.mateusz@gmail.com>
2025-12-16 09:28:53 +01:00
Fredrik Strand Oseberg
ed6f728e7e
feat: add splash overlay (#11147)
Adds a splash overlay that we can to App.tsx, it will look for active
splash ids defined in splash.tsx and append a query parameter that will
trigger the modal content. Once a splash is triggered it will be marked
as seen in the backend. This PR only adds the functionality, it does not
add it to the application just yet.
2025-12-16 08:40:53 +01:00
Mateusz Kwasniewski
4c1ef6aa1a
refactor: test case matching (#11148) 2025-12-15 15:35:54 +01:00
Thomas Heartman
27f7799962
feat: add db migration (#11118) 2025-12-15 14:17:03 +01:00
Fredrik Strand Oseberg
820820d79f
feat: initial splash setup (#11146)
Setup the intial splash screen in the current framework. For now we are
only adding the component on a path you can navigate to, there are
currently no triggers set up.
2025-12-15 13:29:18 +01:00
Jaanus Sellin
f95e734834
chore: add safeguards to slack integration (#11145) 2025-12-15 11:20:39 +02:00
renovate[bot]
a83234703d
chore(deps): update dependency @tsconfig/docusaurus to v2.0.7 (#11143)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@tsconfig/docusaurus](https://redirect.github.com/tsconfig/bases)
([source](https://redirect.github.com/tsconfig/bases/tree/HEAD/bases)) |
[`2.0.3` ->
`2.0.7`](https://renovatebot.com/diffs/npm/@tsconfig%2fdocusaurus/2.0.3/2.0.7)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@tsconfig%2fdocusaurus/2.0.7?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tsconfig%2fdocusaurus/2.0.3/2.0.7?slim=true)
|

---

### Release Notes

<details>
<summary>tsconfig/bases (@&#8203;tsconfig/docusaurus)</summary>

###
[`v2.0.7`](c90a597c1f...5a0cc81220)

[Compare
Source](5257f3154e...1bff76396c)

###
[`v2.0.6`](be6b3bb160...0a2d3b323a)

[Compare
Source](5257f3154e...5257f3154e)

###
[`v2.0.5`](1bff76396c...a1854fcbfb)

[Compare
Source](0a2d3b323a...5257f3154e)

###
[`v2.0.4`](be6b3bb160...1bff76396c)

[Compare
Source](be6b3bb160...0a2d3b323a)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 7pm every weekday,before 5am
every weekday" 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 this update
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:eyJjcmVhdGVkSW5WZXIiOiI0Mi40Mi4yIiwidXBkYXRlZEluVmVyIjoiNDIuNDIuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 21:41:18 +00:00
renovate[bot]
f52fb943ea
chore(deps): update dependency @tanstack/react-virtual to v3.13.12 (#11142)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@tanstack/react-virtual](https://tanstack.com/virtual)
([source](https://redirect.github.com/TanStack/virtual/tree/HEAD/packages/react-virtual))
| [`3.13.10` ->
`3.13.12`](https://renovatebot.com/diffs/npm/@tanstack%2freact-virtual/3.13.10/3.13.12)
|
![age](https://developer.mend.io/api/mc/badges/age/npm/@tanstack%2freact-virtual/3.13.12?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tanstack%2freact-virtual/3.13.10/3.13.12?slim=true)
|

---

### Release Notes

<details>
<summary>TanStack/virtual (@&#8203;tanstack/react-virtual)</summary>

###
[`v3.13.12`](https://redirect.github.com/TanStack/virtual/blob/HEAD/packages/react-virtual/CHANGELOG.md#31312)

[Compare
Source](https://redirect.github.com/TanStack/virtual/compare/@tanstack/react-virtual@3.13.11...@tanstack/react-virtual@3.13.12)

##### Patch Changes

- chore(react-virtual): fix vite e2e build
([#&#8203;1030](https://redirect.github.com/TanStack/virtual/pull/1030))

- Updated dependencies
\[[`d21ed98`](d21ed98da3)]:
-
[@&#8203;tanstack/virtual-core](https://redirect.github.com/tanstack/virtual-core)@&#8203;3.13.12

###
[`v3.13.11`](https://redirect.github.com/TanStack/virtual/blob/HEAD/packages/react-virtual/CHANGELOG.md#31311)

[Compare
Source](https://redirect.github.com/TanStack/virtual/compare/@tanstack/react-virtual@3.13.10...@tanstack/react-virtual@3.13.11)

##### Patch Changes

- Updated dependencies
\[[`73fa867`](73fa867525)]:
-
[@&#8203;tanstack/virtual-core](https://redirect.github.com/tanstack/virtual-core)@&#8203;3.13.11

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 7pm every weekday,before 5am
every weekday" 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 this update
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:eyJjcmVhdGVkSW5WZXIiOiI0Mi40Mi4yIiwidXBkYXRlZEluVmVyIjoiNDIuNDIuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-12 18:42:24 +00:00
Mateusz Kwasniewski
01090075d5
feat: plausible impact metrics add chart (#11140) 2025-12-12 13:26:16 +01:00
Github Actions Bot
77c5af4d99 7.4.0 2025-12-12 12:05:14 +00:00
Github Actions Bot
d155474a03 docs: Update CHANGELOG.md 2025-12-12 12:05:05 +00:00
Christopher Kolstad
5ca04f5291
chore(build): set repository.url to what is reported from github (#11139) 2025-12-12 12:02:38 +00:00
Mateusz Kwasniewski
5332b583b6
chore: adjust help icon size (#11138) 2025-12-12 12:49:43 +01:00
Github Actions Bot
895af79e19 7.4.0 2025-12-12 11:48:42 +00:00
Github Actions Bot
45a8502f90 docs: Update CHANGELOG.md 2025-12-12 11:48:32 +00:00
Christopher Kolstad
dfe214f53d
chore(ci): add step for installing npm@latest before publishing (#11137)
We need npm > 11.8 for trusted publishing.
2025-12-12 11:46:25 +00:00
Jaanus Sellin
3c82c1b79b
fix: cap progression input (#11136)
We are capping the value to 10000 of any unit. I do not see a clear
reason why customer would need to enter anything larger.
2025-12-12 13:15:20 +02:00
Github Actions Bot
cdca639a54 7.4.0 2025-12-12 11:08:23 +00:00
Github Actions Bot
4a2d857f83 docs: Update CHANGELOG.md 2025-12-12 11:08:13 +00:00
Nuno Góis
90a6528146
chore: revert back to 7.3.0 (#11135)
Reverts back to 7.3.0 so we can re-attempt the release.
2025-12-12 11:06:25 +00:00
Nuno Góis
0187efcc00
chore: use id-token write and npm_config_provenance in npm publish (#11134)
https://linear.app/unleash/issue/2-4082/fix-npm-publish-in-unleash-releaseyaml

Uses `NPM_CONFIG_PROVENANCE` in npm publish.
2025-12-12 10:48:48 +00:00
Thomas Heartman
80fbaf1baf
feat: add project-specific edit and create modal forms (#11127)
Allows you to create, edit, and delete project context fields from the
project context field page.

Follows the same way of doing dynamic routing on the buttons as we did
for segments (checking if projectId exists, and if so, route there).

The current impl blindly inserts project if the edit/create form is open
under a project path, but we probably want to parameterize this later
(or before merging), so as to make it easier to control.
2025-12-12 10:24:23 +00:00