1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-06-27 01:19:00 +02:00
Commit Graph

6108 Commits

Author SHA1 Message Date
Nuno Góis
0429c1985a
refactor: remove deprecated get archive featured by project endpoint (#9938)
https://linear.app/unleash/issue/2-3367/remove-get-apiadminarchivefeaturesprojectid-deprecated-in-4110

Removes GET `/api/admin/archive/features/{projectId}` which was
deprecated in v4.11.
Also cleans up related code.

I leveraged our search features endpoint where needed, since that's what
we're using now in our UI (to see archived features you filter by
archived=true).

Builds on top of https://github.com/Unleash/unleash/pull/9924 — Since
they're both related.
2025-05-13 12:09:52 +01:00
Nuno Góis
42b6fc810e
refactor: remove deprecated GET archive features endpoint (#9924)
https://linear.app/unleash/issue/2-3366/remove-get-apiadminarchivefeatures-deprecated-in-4100

Removes GET `/api/admin/archive/features` which was deprecated in v4.10.
Also cleans up related code.

May include some slight scouting.

**P.S.** Should we merge this into main, or is there a `v7` branch we
should be targeting instead?
2025-05-13 11:45:03 +01:00
Jaanus Sellin
5f4d7de62e
chore: fix rendering issue without setConstraints (#9975)
The current implementation states that if you do not have
access—typically as a viewer user—it renders the old component.
Rendering an empty view is acceptable, as this is part of the segment
creation flow, and if you do not have permissions, you do not need to
see it.
2025-05-13 12:41:19 +03:00
Thomas Heartman
257b8d1f40
test/refactor: useEditableConstraint hook (#9970)
Adds a test suite for the useEditableConstraint hook, attempting to test
all the parts of it that we can't test in isolation.

Plus: a few, small refactorings:
- Renames `onAutoSave` on `onUpdate` to better match `onDelete` (and
because autosave doesn't really mean anything anymore).
- Simplifies and collapses some types
2025-05-13 11:30:07 +02:00
Jaanus Sellin
3c42edfbe8
chore: fix setConstraints being undefined/null (#9972) 2025-05-13 12:20:15 +03:00
Tymoteusz Czech
82dddb2eef
feat: update flags overview status column (#9961)
Improved spacing in the flag overview columns.
2025-05-13 09:37:22 +02:00
Jaanus Sellin
31a23db05e
chore: clarify deleted legal values warning (#9969) 2025-05-13 10:19:11 +03:00
Thomas Heartman
8bf3b1f135
test(1-3734): test constraint reducer (#9966)
Adds a fairly comprehensive test suite for the constraint reducer. I put
in all cases I thought were relevant.

As part of this, I discovered one bug, and changed two actions.

The bug was toggling on the wrong property when you tried to invert case
sensitivity.

The action changes are:
- rename "remove value from list" to "remove value"
- remove "set value" in favor of instead letting "add value(s)" work in
single-value constraints too.
2025-05-13 09:02:38 +02:00
Gastón Fournier
3e0b127113
chore: remove proxy from integrations (#9962)
Removing proxy from integrations as it's been deprecated while ago and
currently unmaintained
2025-05-12 16:37:18 +02:00
Thomas Heartman
d0975c52a9
Test(1-3733): get invalid and deleted legal values (#9963)
Extracts and tests the implementation of the functions to get deleted
and invalid legal values.

This is pretty straightforward stuff and arguably not crucial, but it
was an easy place to start and I don't think it hurts to have these in
place anyway.
2025-05-12 12:57:55 +00:00
Gastón Fournier
8b4ad4b574
chore: remove semver version from footer and proxy from sdk list (#9956)
This will stop displaying the semver version for our hosted (i.e.
managed) customers, as it has become less relevant over time. It remains
valuable for self-hosted users.
2025-05-12 14:32:12 +02:00
Jaanus Sellin
42f3ba5fc2
feat: add input box for gradual rollout slider (#9960) 2025-05-12 15:27:31 +03:00
Mateusz Kwasniewski
d175a5705a
feat: Import feature links (#9958) 2025-05-12 13:59:18 +02:00
Fredrik Strand Oseberg
d4d6e658ff
Chore/cleanup tag color feature falg (#9959)
Removes the flag for tag type colors.
2025-05-12 13:54:38 +02:00
Thomas Heartman
6efbe2d545
Single legal values (#9935)
Adds an input form for single legal values (i.e. for number and semver
operators).

- Uses the `validator` for the constraint to check the list of legal
values and provides a list of "invalid legal values" for values that
don't pass validation.
- Values in the "invalid legal values" set are "disabled" when rendered
in the UI. Additionally, there's an extra bit of text that tells you
that values that aren't valid are disabled.
- Makes the legal values selector more generic and makes it adapt to
multi- or single-value selection based on input props. The external
interface is two separate components (to make it clearer that they are
different things and because their props don't line up perfectly).

Rendered:
<img width="957" alt="image"
src="https://github.com/user-attachments/assets/cd8d2f32-057d-4e31-8fd3-174676eeb65e"
/>


Still todo: testing deleted/invalid legal value detection. I'll do that
as part of the big testathon in a followup.
2025-05-12 13:35:45 +02:00
Tymoteusz Czech
1ccd201a25
feat: use modal for managing link templates (#9955)
Editing with modals is more focused.
2025-05-12 11:52:48 +02:00
Tymoteusz Czech
5614cb56d3
feat: ui for external link templates (#9945)
Support for project link templates to the frontend UI
2025-05-12 11:05:04 +02:00
Jaanus Sellin
ea26e008d0
chore: update styling for variant box (#9953) 2025-05-12 11:38:33 +03:00
Tymoteusz Czech
f55ea5f387
chore: remove embedProxy flag (#9874)
Clean up old flags
2025-05-12 10:28:31 +02:00
Jaanus Sellin
095d4d7074
chore: remove newStrategyDropdown flag (#9952) 2025-05-12 11:11:25 +03:00
Thomas Heartman
920b550051
fix: avoid focus loss when using popover (and don't close multi-value popover after adding a value) (#9951)
Fixes an issue where you would lose keyboard focus when interacting with
one of the input fields in the new editable constraint.

The fix was spinning out the inputs into their own separate component.
This prevents them from being re-rendered every time (or something idk)
which allows us to keep focus.

It also stops the popover for multi-value constraint operators from
closing after you've entered a value; allowing for faster entry of more
values (as was intended and as was how it functioned previously).
2025-05-09 19:44:28 +02:00
Thomas Heartman
fbc58ca1fc
fix difference calc and add tests (#9950)
Fixes a whoopsie in the difference function and adds tests at the same
time.
2025-05-09 18:47:52 +03:00
Jaanus Sellin
7a012ce910
feat: add tooltips to constraint operator buttons (#9941)
![image](https://github.com/user-attachments/assets/9e40b6f8-a98e-48e0-a931-a946ad6ec9cf)
2025-05-09 14:56:32 +03:00
Tymoteusz Czech
fd4042db00
chore: update frontend OpenAPI models - (#9943)
project link templates
2025-05-09 13:05:22 +02:00
Thomas Heartman
e4ead3bd67
Refactor: get rid of editable constraint wrapper (#9921)
This (admittedly pretty big) PR removes a component layer, moves all
logic for updating constraint values into a single module, and dumbs
down other components.

The main changes are:
- EditableConstraintWrapper is gone. All the logic in there has been
moved into the new `useEditableConstraint` hook. Previously it was split
between the wrapper, editableConstraint itself, the legalValues
component.
- the `useEditableConstraint` hook accepts a constraint and a save
function and returns an editable version of that constraint, the
validator for input values, a function that accepts update commands,
and, when relevant, existing and deleted legal values.
- All the logic for updating a constraint now exists in the
`constraint-reducer` file. As a pure function, it'll be easy to unit
test pretty thoroughly to make sure all commands work as they should
(tests will come later)
- The legal values selector has been dumbed down consiberably as it no
longer needs to create its own internal weak map. The internal
representation of selected values is now a set, so any kind of lookup is
now constant time, which should remove the need for the extra layer of
abstraction.

## Discussion points

I know the reducer pattern isn't one we use a *lot* in Unleash, but I
found a couple examples of it in the front end and it's also quite
similar to how we handle state updates to change request states. I'd be
happy to find a different way to represent it if we can keep it in a
single, testable interface.

Semi-relatedly: I've exposed the actions to submit for the updates at
the moment, but we could map these to functions instead. It'd make
invocations a little easier (you wouldn't need to specify the action
yourself; only use the payload as a function arg if there is one), but
we'd end up doing more mapping to create them. I'm not sure it's worth
it, but I also don't mind if we do 💁🏼
2025-05-09 11:47:22 +02:00
Jaanus Sellin
8b115122fc
chore: fix strategy tests (#9922)
This is still in progress.
2025-05-09 11:10:45 +03:00
Mateusz Kwasniewski
857ee7da5c
feat: prevent more than 10 links in the UI and backend (#9937) 2025-05-08 21:21:28 +02:00
Thomas Heartman
c72f39bb4f
chore: make operator checking more ergonomic and type-ful (#9932)
This is a helper PR for a refactor I'm working on for the new constraint
inputs. In the refactoring, it's useful to have individual subtypes for
the various subgroups of operators and to be able to easily assert
whether something is X operator or not.

The only change required in the code base is a single check for
operators, which is now handled by using the new `isXOperator` functions
instead.

Yes, the operator file in constants now includes functions, but it
seemed useful to put the identification functions there instead of
somewhere unrelated. The tests are primarily to ensure that the
identifier function works, and I'd be happy to remove them if we think
it's necessary. That said, they're pretty simple unit tests, so I think
it's fine to leave them.

The main bulk of the change is: removing the explicit `: Operator[]`
typing to the various sub-sets of operators and instead adding explicit
types. Additionally, there's the new identifier functions.
2025-05-08 14:10:57 +02:00
Mateusz Kwasniewski
dea785fb96
feat: edit link UI (#9926) 2025-05-08 10:25:47 +02:00
David Leek
d15456a76a
chore: use tokenname instead of username in frontend for api-token creation (#9891) 2025-05-08 09:20:19 +02:00
Mateusz Kwasniewski
dac5a5e596
feat: delete link UI (#9923) 2025-05-07 15:58:51 +02:00
sjaanus
471cef1f29
chore: fix strategy tests 2025-05-07 16:12:53 +03:00
Mateusz Kwasniewski
206d5ed121
feat: shared add link dialogue for 2 paths (#9920) 2025-05-07 14:07:58 +02:00
Mateusz Kwasniewski
193c6274fc
chore: generate orval types (#9919) 2025-05-07 13:37:58 +02:00
Mateusz Kwasniewski
36c8efceae
feat: add link ui (#9918) 2025-05-07 13:24:59 +02:00
Mateusz Kwasniewski
2b73b17579
feat: feature links section (#9915) 2025-05-07 11:35:41 +02:00
Jaanus Sellin
d3cb8759c9
fix: make setConstraints work in editable constraints list (#9913)
Was missing implementation for addConstraint through ref.

Added it together with test.
2025-05-07 09:49:22 +03:00
Ivar Conradi Østhus
28373f5e37
fix: namespace flag-repo for unleash sdk (#9910)
Did two things:

1. Use basePath to prefix the Unleash repo used with the Unleash
Frontend SDK.
2. Use JSON.stringify as key for useEffect to avoid potential render
loop
2025-05-06 19:05:06 +02:00
Thomas Heartman
a7118e0c18
chore(1-3639): constraint validation (#9909)
Implements client-side validation of constraint values before you can
add them to a constraint.

I've removed the extra server-side validation that used to happen for
each specific constraint, because the surrounding form itself uses
server side validation to check every constraint every time there's a
change. This is what controls disabling the submit button etc.

I wanna make the next PR a bit of a followup cleanup now that it's
clearer what properties we do and don't need.
<img width="371" alt="image"
src="https://github.com/user-attachments/assets/7c98708f-fcbe-40ca-8590-bb0f5b2ad167"
/>
<img width="361" alt="image"
src="https://github.com/user-attachments/assets/503d4841-d910-4e8e-b0ef-a3d725739534"
/>
2025-05-06 15:21:33 +02:00
David Leek
681079bd08
chore: clean up adminNavUI flag (#9907) 2025-05-06 14:59:07 +02:00
Jaanus Sellin
8e05c92440
chore: align recently used constraints to designs (#9904)
Now both of the recents have aligned styling.
Now ConstraintAccordionView accepts dashed and solid borders.


![image](https://github.com/user-attachments/assets/89fefaf5-4acc-41b0-aa7b-efb1d5e1eb63)
2025-05-06 15:42:38 +03:00
Jaanus Sellin
8d377f76b7
chore: remove dead code (#9906) 2025-05-06 15:42:27 +03:00
Jaanus Sellin
dcb58de728
chore: clean dead code (#9903)
When looking at the big removal PR, I knew we missed something.

https://github.com/Unleash/unleash/pull/9888
2025-05-06 14:29:53 +03:00
Fredrik Strand Oseberg
db90ad9c6c
feat: enterprise consumption billing (#9862)
Initial PR that adds logic for displaying a link to stripe to view
consumption based pricing in the billing overview

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2025-05-06 13:15:31 +02:00
Jaanus Sellin
79abbc832f
feat: recently used segment chip (#9895) 2025-05-06 11:56:46 +03:00
Tymoteusz Czech
af93f93836
refactor: remove flagOverviewRedesign flag (#9888)
Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2025-05-06 10:25:57 +02:00
renovate[bot]
6a2953f768
chore(deps): update dependency vite to v5.4.19 [security] (#9899)
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.18` ->
`5.4.19`](https://renovatebot.com/diffs/npm/vite/5.4.18/5.4.19) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/vite/5.4.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vite/5.4.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vite/5.4.18/5.4.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vite/5.4.18/5.4.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

### GitHub Vulnerability Alerts

####
[CVE-2025-46565](https://redirect.github.com/vitejs/vite/security/advisories/GHSA-859w-5945-r5v3)

### Summary
The contents of files in [the project
`root`](https://vite.dev/config/shared-options.html#root) that are
denied by a file matching pattern 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.
Only files that are under [project
`root`](https://vite.dev/config/shared-options.html#root) and are denied
by a file matching pattern can be bypassed.

- Examples of file matching patterns: `.env`, `.env.*`, `*.{crt,pem}`,
`**/.env`
- Examples of other patterns: `**/.git/**`, `.git/**`, `.git/**/*`

### Details

[`server.fs.deny`](https://vite.dev/config/server-options.html#server-fs-deny)
can contain patterns matching against files (by default it includes
`.env`, `.env.*`, `*.{crt,pem}` as such patterns).
These patterns were able to bypass for files under `root` by using a
combination of slash and dot (`/.`).

### PoC
```
npm create vite@latest
cd vite-project/
cat "secret" > .env
npm install
npm run dev
curl --request-target /.env/. http://localhost:5173
```


![image](https://redirect.github.com/user-attachments/assets/822f4416-aa42-461f-8c95-a88d155e674b)

![image](https://redirect.github.com/user-attachments/assets/42902144-863a-4afb-ac5b-fc16effa37cc)

---

### Release Notes

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

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

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

Please refer to
[CHANGELOG.md](https://redirect.github.com/vitejs/vite/blob/v5.4.19/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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjQuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI2NC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-06 08:15:37 +00:00
Melinda Fekete
7ca79c1b84
docs: update self-hosting guide (#9855) 2025-05-05 15:57:17 +02:00
Thomas Heartman
bc342c5b13
chore(1-3679): use numeric input mode for numbers. (#9875)
Adds inputmode='decimal' to input fields with number input. As discussed
on the [GOV.UK
blog](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/),
this finds a balance between giving numeric input options to mobile
devices and improving validation / user experience.

They mention this bit in their [design system
guideline](https://design-system.service.gov.uk/components/text-input/#numbers)

> Do not use `<input type="number">` unless your user research shows
that there’s a need for it. With `<input type="number">` there’s a risk
of users accidentally incrementing a number when they’re trying to do
something else - for example, scroll up or down the page. And if the
user tries to enter something that’s not a number, there’s no explicit
feedback about what they’re doing wrong.

I've purposefully not included the `pattern="[0-9]*"` attribute here,
because the browser error messages conflict with our own and have
several drawbacks in terms of accessibility according to Adrian
Roselli's ["Avoid default field
validation"](https://adrianroselli.com/2019/02/avoid-default-field-validation.html).

Instead, the validation here will be part of the validation handling
later.

Also, I've opted for using `decimal` instead of `numeric`, because we
allow you to store decimal values and that inputmode also adds the
decimal separator to the keyboard. As always, however, there's
complications: several languages (including Norwegian) use a comma as a
decimal separator instead of a period, so the keyboard will likely
contain numbers and a comma instead of a period. This is a problem
because JS doesn't recognize "45,6" as a valid number. I've added a
follow-up task to look into this. I thought at first it would just be
expanding the validation, but because it's stored as a string on the
back end and the SDKs presumably parse it, we can't just suddenly allow
commas as decimal separators.
2025-05-05 11:30:52 +02:00
Jaanus Sellin
33f23cc0c1
feat: recently used segments (#9881) 2025-05-05 10:15:43 +03:00
Thomas Heartman
832e3f2e79
Add input help text (#9883)
Adds help text to the popover input for free text values, single numeric
and semver values. The help text is in addition to the error text (so
you can get both).

Also makes the add button a little narrower to better match sketches.

## Rendered

Multiple values (free text):
<img width="953" alt="image"
src="https://github.com/user-attachments/assets/1d9bf7da-af8c-46b6-8eae-ae4f8a687363"
/>

With error
<img width="936" alt="image"
src="https://github.com/user-attachments/assets/aa9dc2da-ad9f-43da-9e44-c36fd8344df1"
/>

Numeric operators:
<img width="927" alt="image"
src="https://github.com/user-attachments/assets/f1e8afd8-7051-4691-bdd2-810929ccd4fa"
/>



SemVer operators:

<img width="944" alt="image"
src="https://github.com/user-attachments/assets/655a7a7b-a4a4-468c-8a5d-23e5d38375b8"
/>
2025-05-02 15:47:29 +02:00
Thomas Heartman
3d84001273
1-3687/input mode separation (#9882) 2025-05-02 12:30:38 +02:00
Thomas Heartman
44b4ba7f60
feat: add date type input field for constraints. (#9864)
Adds a date input method for editable constraints.

Uses a modified version of
`frontend/src/component/common/NewConstraintAccordion/ConstraintAccordionEdit/ConstraintAccordionEditBody/DateSingleValue/DateSingleValue.tsx`,
which has been marked as deprecated.

<img width="971" alt="image"
src="https://github.com/user-attachments/assets/3c6f6e1f-6156-444c-9a73-e0c9c1c52ad6"
/>

Wraps when necessary
<img width="471" alt="image"
src="https://github.com/user-attachments/assets/786be9d0-e62e-4bc2-884d-ef6f4aaf6b51"
/>


Additionally, because I noticed how the old date input sets the error,
I've switched to using the standard way of setting input errors in
Unleash (and presumably for MUI)
<img width="359" alt="image"
src="https://github.com/user-attachments/assets/31e6ce7c-ad5d-4432-a89f-b4d9d491bd99"
/>
2025-04-30 14:42:54 +02:00
Thomas Heartman
0e1ab236c9
Fix/constraint value wrapping (#9873)
Changes how constraint values are treated and wrapped.

Previously, they would have their own column and fill it up:

![image](https://github.com/user-attachments/assets/3d13fa75-2b53-4393-8bb2-8677741016e3)

Then we changed it to always being on the next line below certain
widths:

![image](https://github.com/user-attachments/assets/e2fea1e2-3ab8-4000-a727-831802c583c4)

But that would also cause it to break even if there was no need for it.
This iteration instead uses display `contents` on the value lists to let
them be handled by the flex flow of the containing element. This allows
them to only wrap when necessary.

<img width="995" alt="image"
src="https://github.com/user-attachments/assets/d61f6f49-b1ef-49ec-91a4-df868cedc678"
/>

Of course, if they don't need to wrap, they don't:
<img width="1030" alt="image"
src="https://github.com/user-attachments/assets/84c27997-7cb2-4e1b-8977-d43a46f7de6e"
/>


This loom video shows how it folds in the most complex scenario, with
all elements being visible and within bounds down to about 300px:
https://www.loom.com/share/4f29cdb105d54edeb70edd54dfaca9f9
2025-04-30 13:57:57 +02:00
Jaanus Sellin
3c6d797234
feat: recently used constraints have use this button now (#9871)
Also splitted actions, so we have edit view actions, and view actions.


![image](https://github.com/user-attachments/assets/27220835-36d2-4782-86c4-25511f6f778f)
2025-04-30 14:12:49 +03:00
Thomas Heartman
691a9e6e57
fix: appropriately size case icon for non-editing constraints (#9869)
This fixes an issue where the "case sensitive" chip for existing
constraints was way too big. The underlying reason is that I switched
the icon for one with more padding to give it a consistent size with the
"not case sensitive" icon (PR:
https://github.com/Unleash/unleash/pull/9851).

The fix here is:
1. Add a viewBox to the SVG to let it scale properly.
2. Make the containing box stretch to fill the height of it's flex
container.
3. Use a size for height that doesn't grow too large.

Before:
<img width="137" alt="image"
src="https://github.com/user-attachments/assets/f23043f7-76a9-48c4-9f5c-c50371c24f72"
/>

After:
<img width="178" alt="image"
src="https://github.com/user-attachments/assets/cc2f8109-21ed-4070-b4bc-7c94be5b8e8d"
/>
2025-04-30 08:37:16 +00:00
Jaanus Sellin
3ec1daad2b
feat: now recent constraints work e2e (#9868)
Small intermediate cleanup.
Next step is to add usage buttons.
2025-04-30 11:34:03 +03:00
Tymoteusz Czech
6c5fa4c8a7
feat: update search placement on flags overview screen (#9854)
- search has a new place, closer to filters
- filters are adjusted to wrap properly on small screens
2025-04-30 09:25:45 +02:00
Thomas Heartman
d44b7ac6c2
1-3651/single value inputs (#9859)
Adds an "add value" with popover input for single-value fields
(numerical and semver operators).

The implementation re-uses the popover from the multi-value constraint
operators, so I've extracted it for re-use.

All current input types:
<img width="779" alt="image"
src="https://github.com/user-attachments/assets/ad522e4d-72ba-402c-ad7c-8609ef2fb3a8"
/>

For the new one, opening the popover when there's a value will
pre-select the value, so you can override it by typing immediately:
<img width="297" alt="image"
src="https://github.com/user-attachments/assets/31d18f9e-6ef9-4450-9d63-ca5034b59f19"
/>

Buttons look pretty identical:
<img width="784" alt="image"
src="https://github.com/user-attachments/assets/d96b0b0d-0cbb-4262-9ca8-4ec919cbfafb"
/>

## Discussion points

### Input type

I haven't set an input type anywhere on the popover yet. In theory, we
could use input type "number" for numerical inputs and I think it's
worth looking at that, but we don't do in the old implementation either.

I've added a task for it.

### Weird esc handling

This implementation uses a chip for the button/value display for the
single. In almost all cases it works exactly as I'd expect, but closing
the popover with esc moves your focus to the top of `body`.
Unfortunately, this isn't something we can address directly (trust me,
I've tried), but the good news is that this was fixed in mui v6. The
current major is v7, so we probably want to update before too long,
which will also fix this. More info in the MUI docs:
https://mui.com/material-ui/migration/upgrade-to-v6/#chip

I think that for the single value entry, losing focus on esc is a fair
tradeoff because it handles swapping states etc so gracefully. For the
multi-value operators, however, esc is the only way to close the
popover, so losing focus when you do that is not acceptable to me. As
such, I'll leave the multi-value input as a button for now instead.
(It's also totally fine because the button never updates or needs to
change).
2025-04-29 15:06:42 +02:00
Jaanus Sellin
cb987ac78b
feat: now updating/editing strategy will store constraints in recents (#9861) 2025-04-29 15:33:06 +03:00
Jaanus Sellin
7356453c0c
feat: view for recently used constraints (#9860) 2025-04-29 13:36:17 +03:00
Mateusz Kwasniewski
3980cfa2a8
feat: show backend and frontend sdks separately (#9857) 2025-04-29 10:36:02 +02:00
David Leek
e450d1e35e
chore: replace inherit color on menu item hover to common.white (#9856) 2025-04-29 09:27:09 +02:00
Thomas Heartman
20a259fc4a
Chore/constraint value styling (#9853)
Fixes a few small styling issues with the constraint value chips:
- Background color was wrong
- They shouldn't have a border when they're not focused
 
Different styles: 
1. Keyboard focus
2. Mouse hover
3. No focus
4. No focus
5. Add values button for reference.
<img width="405" alt="image"
src="https://github.com/user-attachments/assets/ded98393-a7a8-4d4a-81ff-63a3f4d32184"
/>
2025-04-28 14:52:08 +02:00
Jaanus Sellin
1b031c9caf
feat: recently used constraints hook (#9850) 2025-04-28 15:51:50 +03:00
Thomas Heartman
b8c50e6ed2
1 3634/new icons 2 (#9851)
Adds new icons for the constraint operator buttons (equals and case
sensitive).
<img width="398" alt="image"
src="https://github.com/user-attachments/assets/2bd2a20f-700b-489a-b7d3-e6e26d80c316"
/>
<img width="442" alt="image"
src="https://github.com/user-attachments/assets/e5cca824-d8c0-4ea4-b137-c7c1eae642cc"
/>


The icons are all 24x24, so using them for buttons is pretty easy.

There is one caveat: The heights are very subtly off (~1.25 px) when the
buttons wrap and end up on a line without the input field, but it's
really not noticeable. In this screenie, the Aa button has is a tiny bit
smaller than the items on the row above:

<img width="328" alt="image"
src="https://github.com/user-attachments/assets/d89e2a01-9274-4d6f-b203-1fc3d487543f"
/>
2025-04-28 14:35:55 +02:00
sjaanus
5c894c78be
fix: remove pushed files 2025-04-28 15:02:59 +03:00
sjaanus
19cb225623
feat: recently used constraints hook 2025-04-28 15:01:46 +03:00
Jaanus Sellin
5c483c7d8d
feat: split and clean up constraint lists (#9839) 2025-04-28 13:46:22 +03:00
David Leek
25790c1e0b
chore: fix colors, sizes and corner roundings on admin menu (#9847) 2025-04-28 10:57:24 +02:00
Tymoteusz Czech
3ac087e0f6
feat: count per lifecycle stage (#9845)
Show count per stage, and include count if flags are filtered.
2025-04-25 10:52:11 +00:00
Mateusz Kwasniewski
bd78a75177
chore: remove flag for global change request config (#9840) 2025-04-25 12:47:18 +02:00
Thomas Heartman
44082b24a1
chore: second design pass for editable constraints (#9843)
Fix a number of visual issues with the main editable constraint
component.

I've introduced a few more layers of container nesting to make the
layout break the right ways:
- Put everything on the same line when on wide.
- At 700px place selected values on the row below
- From 700px down, when necessary, also wrap operator options


Support super long context names without breaking layout
<img width="399" alt="image"
src="https://github.com/user-attachments/assets/07555e9c-d875-417f-ae6b-d4600731d5eb"
/>

Wrap values at 700px width container:
<img width="703" alt="image"
src="https://github.com/user-attachments/assets/deb6e059-57d4-4e47-88da-3ec5d6bce751"
/>

Wrap operator options when necessary
<img width="359" alt="image"
src="https://github.com/user-attachments/assets/ff96db40-f47d-4ddf-bed7-dfced4d69973"
/>

Absolutely position delete button to allow to not push it out of the
container on narrow screens:
<img width="330" alt="image"
src="https://github.com/user-attachments/assets/c7b8f88d-538a-46a1-ae3f-e5a761b50289"
/>

Remove extra focus styling from MUI (darken select background):
Before:
<img width="348" alt="image"
src="https://github.com/user-attachments/assets/99aff08d-c1af-46c0-8a75-40c1ea3c103f"
/>

<img width="357" alt="image"
src="https://github.com/user-attachments/assets/b7a0edac-2716-48a7-b50c-b3437e5f5be8"
/>

After:
<img width="379" alt="image"
src="https://github.com/user-attachments/assets/74da884c-7b1a-4b9a-8383-31592326a71b"
/>
<img width="350" alt="image"
src="https://github.com/user-attachments/assets/0ebea696-5f7d-4d4e-b91c-b087a8fc56a3"
/>
2025-04-25 10:37:04 +00:00
Thomas Heartman
44e9023fb3
Don't show extra input component if we have "add values" button (#9842)
Makes it so that the InputContainer is only rendered if we don't have
the add values button up top. We might need to adjust this later (as we
get more sketches for other input types, such as single numbers, single
semvers etc), but it works for now.

With legal values  (no add values button)
<img width="765" alt="image"
src="https://github.com/user-attachments/assets/032cc848-584e-4c3f-83ed-be1fb1cdc0f8"
/>

Without legal values (but add values button)
<img width="763" alt="image"
src="https://github.com/user-attachments/assets/1a8fa68e-a73b-42fc-a1b8-e8f5997f3c5d"
/>

Because we don't handle single value cases yet, some of those inputs are
still stuck in an in-between state:
<img width="775" alt="image"
src="https://github.com/user-attachments/assets/25b6ae89-9267-4f06-a32d-3460abe4a847"
/>
2025-04-25 12:23:18 +02:00
Thomas Heartman
799fc1f518
1-3658/fix legal values selector issues (#9838)
Fixes an issue with the new legal values selector where selecting an
item from filtering or changing the checkbox state would move your focus
to the top of the page. I think it's because we'd re-render the whole
tree because of it, and this would clear your focus selection. To get
around it, I've used the existing ResolveInput component. We might want
to change this later as we get around to more input components (single
values, etc), but for now, I think this is good enough.

As a bonus, I get to delete the most annoying part of the
EditableConstraints file 😄

The constraint still opens in edit mode for now, but I expect that to
get resolved once we properly implement the split between editable and
non-editable constraints that was started yesterday.
2025-04-25 09:41:23 +02:00
Nuno Góis
8e46bda8e1
chore: fix admin routes should respect plan data (#9828)
https://linear.app/unleash/issue/2-2852/sidebar-bug-with-enterprisepro-only-route-constraints

Fixes an issue where admin routes didn't respect plan data if their flag
was enabled.

First noticed here:
https://github.com/Unleash/unleash/pull/8469#discussion_r1804361222

Issue was that only `adminRoutes` respected plan data. `mainNavRoutes`
and `primaryRoutes` did not follow the same filtering logic.

We can probably clean this up even further in the future, but didn't
want to extend the PR too much.

Also adds tests to validate the intended behavior.
2025-04-24 15:44:06 +01:00
Tymoteusz Czech
0e2f7374e5
Feat: update variants placement (#9832) 2025-04-24 16:01:35 +02:00
Jaanus Sellin
3774cf8b87
feat: separate constraint edit/view screens (#9836)
Separating constraing edit and view screens.
Next PR is to start using these.
2025-04-24 16:49:30 +03:00
Tymoteusz Czech
bffaab5560
chore: update OpenAPI frontend types (#9834)
For lifecycle-count endpoint
2025-04-24 11:42:27 +00:00
Tymoteusz Czech
a38bf8ea4c
feat: remove sort by user on flags overview (#9826)
We don't aggregate all users, for filters on flags overview. Let's drop this filter
2025-04-24 13:37:30 +02:00
Thomas Heartman
f6eb572a14
Prevent legal value selection from triggering form submit (#9831)
Use event.preventDefault to prevent the app from trying to submit the
legal values (or the strategy) form when you hit "enter" in the legal
values filter input.
2025-04-24 10:19:03 +00:00
Thomas Heartman
3bb54c5a9d
feat: 1-3652/legal value selector visual update (#9829)
Handles the visual changes for the legal value selector widget.

Before:
<img width="792" alt="image"
src="https://github.com/user-attachments/assets/0965d577-c4cf-4c1d-9fe7-f8f90d683988"
/>

After:
<img width="769" alt="image"
src="https://github.com/user-attachments/assets/33bdf40c-8bbb-4650-a6ba-c4b9e62f8cbd"
/>

I'm still working on improving the functionality of selecting from the
search input and not losing focus when you select/deselect an item (both
of these work (mostly) as expected on hosted, so we've introduced a
regression somewhere).
2025-04-24 12:17:05 +02:00
Jaanus Sellin
b05e12d028
feat: remove warning boxes for empty values (#9830)
We had issues, where when you selected the operator, these boxes were
jumping up. The problem was that the illegal value checker was marking
empty values as illegal also.

Now empty value is not included in illegal values.


![image](https://github.com/user-attachments/assets/13c6b21e-6b7e-40ac-bade-4496e65f10ba)
2025-04-24 11:41:14 +03:00
Nuno Góis
26f582db21
chore: add terraform to integrations (#9827)
https://linear.app/unleash/issue/2-2565/add-terraform-to-list-of-integrations

Adds Terraform to our integrations list.

It links to: https://docs.getunleash.io/reference/terraform

<img width="769" alt="image"
src="https://github.com/user-attachments/assets/28edb65f-a56d-4ffc-8ce3-cbb6bde6b19b"
/>
2025-04-23 16:11:18 +01:00
Jaanus Sellin
08c11664ce
feat: change requests, use new accordion list not legacy (#9825)
This should be final piece where old accordion is used.


![image](https://github.com/user-attachments/assets/854dfab9-4b05-4a14-bb17-0de49705079d)
2025-04-23 17:37:54 +03:00
Thomas Heartman
9977b3e0f8
fix: legal value selector chips and option updates (#9819) 2025-04-23 14:41:28 +02:00
Tymoteusz Czech
b179f86fb7
fix: stale flag status chip (#9821) 2025-04-23 12:02:58 +00:00
Jaanus Sellin
31dbef84f6
feat: move away from old accordion list, create/edit segment (#9820)
This is one path that is using old component, that we can update.


![image](https://github.com/user-attachments/assets/2f88eea9-651c-4bb2-9b00-d8c54e8e5aab)
2025-04-23 15:02:13 +03:00
Thomas Heartman
08d0907d89
Always show the value list + hide "add values" on non-free text entries (#9817)
Removes the condition to hide the value list if we use legal values. 

In doing so, I also realized that focus handling when you delete the
last item in the constraint values list doesn't work if the add values
button isn't there (which it shouldn't be for legal values and more). So
I've hidden the add values button when it doesn't do anythnig helpful
(or for cases where we don't have designs yet). In cases where you don't
have the add values button and you delete the last constraint value,
we'll move the focus to the "delete constraint" button (that was easier
than making sure we pass refs all the way down into the operator select,
but we can change that later).

To facilitate this (refs coming from the parent component), I refactored
the value list component to accept the add values widget as a child (and
extracted it to its own file).
2025-04-23 10:59:10 +02:00
Nuno Góis
dbe2f9b6bd
chore: remove demo plans dialog (#9816)
https://linear.app/unleash/issue/2-3531/remove-pricing-pop-up

We decided to remove this dialog in favor of linking directly to
https://www.getunleash.io/pricing
2025-04-23 08:55:49 +01:00
Jaanus Sellin
a2e39a05c4
chore: clean up old accordion code path (#9813)
Remove unused code.
2025-04-23 10:52:01 +03:00
Thomas Heartman
77d72ce5a1
Stop "add values" from closing on adding a value (#9815)
Instead of closing the "add values" popover when you add a value, we now
keep it open to facilitate rapid entry of multiple values. It already
clears successfully and adds the new value to the list, so it's actually
quite smooth to use from just the keyboard now!

Additionally, I propose using a `form` element for the add values
popover, because it really is just a tiny form. This also allows us to
use regular form handling instead for submission instead of checking
what key the user pressed. It also means we don't need to specify the
action in the button, because the form handles it.

There's a few more things fixed: 
- I've added a label (only visible to screen readers) to the input label
(as per standard a11y guidelines).
- When you add a value by pressing the "add" button, your focus returns
to the input field, so that you can just start typing out the next one.
this is handy if you submit by mouse click or by tabbing to the button
instead of just hitting enter inside the input field.
2025-04-23 09:32:37 +02:00
Mateusz Kwasniewski
da05c7be5c
chore: remove disable notifications UI (#9814) 2025-04-22 15:03:15 +02:00
Tymoteusz Czech
9d98d0771e
fix: strategy-reorder tooltip padding (#9811)
Tooltip is created a gap on the right side of flag overview page
2025-04-22 14:26:40 +02:00
Mateusz Kwasniewski
a22f5d0201
chore: adjust reminder days (#9810) 2025-04-22 12:29:07 +02:00
Thomas Heartman
150a044207
Use svg icons for case sensitivity button and give it better textual representation (#9808)
Light mode:
<img width="110" alt="image"
src="https://github.com/user-attachments/assets/dba5dd69-685c-4259-ba07-f50ad7c66833"
/>
<img width="265" alt="image"
src="https://github.com/user-attachments/assets/1ac2e71b-36f7-4a90-b96c-38f9aee4cb51"
/>

Dark mode:
<img width="311" alt="image"
src="https://github.com/user-attachments/assets/780c2110-2871-4634-b755-e3e0e3681826"
/>
<img width="285" alt="image"
src="https://github.com/user-attachments/assets/fdf0d790-eee6-4640-823a-758570c53b2f"
/>
2025-04-22 12:25:05 +02:00
Gastón Fournier
a88e781391
feat: run cypress against current branch (#9793)
## About the changes
Currently, we're running against the older version of our UI. When
making changes to it we want to make sure we're testing the current code

**Details in comments**

---------

Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2025-04-22 11:58:22 +02:00
Tymoteusz Czech
18850a5156
feat: move 'copy flag name' button (#9805)
- moved "copy flag name" action next to the flag name
- refactored this component into a separate file
- added "Ctrl+C" shortcut
2025-04-22 11:12:37 +02:00
Jaanus Sellin
bc7856a23a
feat: enter will select the first filtered value (#9807)
![image](https://github.com/user-attachments/assets/deff3204-100d-464f-8a87-f36759bdee3a)
2025-04-21 16:56:54 +03:00
Mateusz Kwasniewski
916ee157ab
refactor: pass feature to feature overview metadata component (#9803) 2025-04-18 14:24:48 +02:00
Mateusz Kwasniewski
e436cf72e6
feat: revert to production (#9802) 2025-04-18 11:42:43 +02:00
Mateusz Kwasniewski
78f0d02a84
feat: snooze reminder tracking (#9798) 2025-04-18 10:10:13 +02:00
Tymoteusz Czech
6403ae7f9b
feat: futureproofing last viewed page redirect (#9794)
You should not be able to break initial page redirect even if you set
'/' as target. It is not strictly needed in the current code path. This
will create a redirect loop only if you manually modify local storage.
It just makes this part safer if it is ever modified.
2025-04-17 17:40:04 +02:00
Nuno Góis
ee9b0a0193
chore: demo misc improvements (#9796)
https://linear.app/unleash/issue/2-2577/transition-screen-between-the-guides
https://linear.app/unleash/issue/2-2582/page-scrolls-in-back

Includes what should be the last batch of demo improvements at this
stage:

- Visually aligns the Back button for consistent layout
- Replaces “Start” with “Start tutorial” for new topics
- Updates topic titles for clarity and consistency
- Applies bold styling to all step titles
- Prevents page scroll when the step target is set to body
2025-04-17 15:56:59 +01:00
Nuno Góis
e6813a4910
chore: set new demo step titles (#9795)
https://linear.app/unleash/issue/2-3517/change-titles-on-various-steps-in-flow

Updates the titles of our demo flow steps as per the designs.

Took some liberties, as always, as e.g. some optional steps were not
covered by the designs.
2025-04-17 13:52:54 +01:00
Mateusz Kwasniewski
7285607cad
feat: remind me later about cleanup (#9790) 2025-04-17 14:06:26 +02:00
Tymoteusz Czech
d60ea1acd4
feat: redirect logic refactor (#9734) 2025-04-17 12:07:08 +02:00
David Leek
d406420223
chore: menu cleanups (#9792) 2025-04-17 11:59:35 +02:00
Tymoteusz Czech
5ef33b56d6
fix: import path for formatOperatorDescription (#9791)
Fixing build on main
2025-04-17 09:43:45 +00:00
Tymoteusz Czech
9d2174534f
refactor: deprecate old ConstraintAccordion and point to new version (#9613)
Code for constraint accordion was copy-pasted before previous
improvement. Old version is still in use for Segments. When we get to
improving constraint editing we should rebuild segments editing, without
use of this code.
2025-04-17 11:16:32 +02:00
Jaanus Sellin
923578c9ea
feat: add values chip styling (#9789)
Made chips coloring and paddings correct.


![image](https://github.com/user-attachments/assets/734072cf-b053-492a-ae27-134b1a530345)
2025-04-17 11:54:19 +03:00
Jaanus Sellin
9678054116
feat: styling of new add values (#9788)
1. Moved add values to the left.
2. Popover has new styling, as in designs


![image](https://github.com/user-attachments/assets/311670e1-7cb3-46ee-a6d7-fbbef9ac21f2)
2025-04-17 11:30:36 +03:00
Nuno Góis
d988b61764
chore: update demo final steps content (#9782)
https://linear.app/unleash/issue/2-2580/change-text-on-last-steps-of-guides-environment-toggle

Updates the demo final steps content as per the designs.

Took some liberties for the third topic, as it was always about gradual
rollout, not variants.
2025-04-17 09:01:11 +01:00
renovate[bot]
61c98a9994
chore(deps): update dependency http-proxy-middleware to v2.0.8 [security] (#9787)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[http-proxy-middleware](https://redirect.github.com/chimurai/http-proxy-middleware)
| [`2.0.7` ->
`2.0.8`](https://renovatebot.com/diffs/npm/http-proxy-middleware/2.0.7/2.0.8)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/http-proxy-middleware/2.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/http-proxy-middleware/2.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/http-proxy-middleware/2.0.7/2.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/http-proxy-middleware/2.0.7/2.0.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

### GitHub Vulnerability Alerts

#### [CVE-2025-32996](https://nvd.nist.gov/vuln/detail/CVE-2025-32996)

In http-proxy-middleware before 2.0.8 and 3.x before 3.0.4, writeBody
can be called twice because "else if" is not used.

---

### Release Notes

<details>
<summary>chimurai/http-proxy-middleware
(http-proxy-middleware)</summary>

###
[`v2.0.8`](https://redirect.github.com/chimurai/http-proxy-middleware/releases/tag/v2.0.8)

[Compare
Source](https://redirect.github.com/chimurai/http-proxy-middleware/compare/v2.0.7...v2.0.8)

#### What's Changed

- fix(fixRequestBody): prevent multiple .write() calls by
[@&#8203;chimurai](https://redirect.github.com/chimurai) in
[https://github.com/chimurai/http-proxy-middleware/pull/1090](https://redirect.github.com/chimurai/http-proxy-middleware/pull/1090)
- fix(fixRequestBody): handle invalid request by
[@&#8203;chimurai](https://redirect.github.com/chimurai) in
[https://github.com/chimurai/http-proxy-middleware/pull/1091](https://redirect.github.com/chimurai/http-proxy-middleware/pull/1091)
- chore(package): v2.0.8 by
[@&#8203;chimurai](https://redirect.github.com/chimurai) in
[https://github.com/chimurai/http-proxy-middleware/pull/1094](https://redirect.github.com/chimurai/http-proxy-middleware/pull/1094)

**Full Changelog**:
https://github.com/chimurai/http-proxy-middleware/compare/v2.0.7...v2.0.8

</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 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMzguMCIsInVwZGF0ZWRJblZlciI6IjM5LjIzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-16 20:10:43 +00:00
Mateusz Kwasniewski
b31845b63c
feat: archive reminder icon (#9781) 2025-04-16 16:07:33 +02:00
Nuno Góis
176e9d3187
chore: improve demo auth screen (#9780)
https://linear.app/unleash/issue/2-2575/adjust-text-login-screen

Adjusts the text for the demo auth screen.

Also took some liberties to improve the visual design of this page (at
least, IMO).

### Before


![image](https://github.com/user-attachments/assets/c17a4378-a940-4e5f-ad79-00ae4514cba6)

### After


![image](https://github.com/user-attachments/assets/c77d7d43-648f-40ab-9eb6-07156af22a7f)
2025-04-16 15:07:22 +01:00
Nuno Góis
f3a1da9d7e
chore: make demo back button variant text (#9772)
https://linear.app/unleash/issue/2-2576/make-back-button-less-dominant

Make demo "Back" button `variant='text'` so it's less predominant
visually.

### Before


![image](https://github.com/user-attachments/assets/d4378975-483a-4478-a7c9-9698a466f918)

### After


![image](https://github.com/user-attachments/assets/1349454b-73aa-465e-9a15-cd7f52cedb75)
2025-04-16 14:52:54 +01:00
Nuno Góis
d3d618c9ad
chore: improve demo finish CTA (#9773)
https://linear.app/unleash/issue/2-2578/change-cta-text-finished-screen

Improves the demo finished dialog CTA.
2025-04-16 14:48:12 +01:00
Mateusz Kwasniewski
a2a8c06003
feat: archive reminder (#9779) 2025-04-16 15:47:35 +02:00
Mateusz Kwasniewski
bf8a9b31b3
feat: cleanup reminder (#9776) 2025-04-16 15:01:07 +02:00
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
dependabot[bot]
6af36288ab
chore(deps-dev): bump vite from 5.4.16 to 5.4.18 in /frontend (#9766)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite)
from 5.4.16 to 5.4.18.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/releases">vite's
releases</a>.</em></p>
<blockquote>
<h2>v5.4.18</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.18/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v5.4.17</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.17/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/v5.4.18/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->5.4.18 (2025-04-10)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19830">#19830</a>,
reject requests with <code>#</code> in request-target (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19831">#19831</a>)
(<a
href="823675baff">823675b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19830">#19830</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/19831">#19831</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.17 (2025-04-03)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19782">#19782</a>,
fs check with svg and relative paths (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19784">#19784</a>)
(<a
href="84b2b46ed1">84b2b46</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19782">#19782</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/19784">#19784</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="731b77d19d"><code>731b77d</code></a>
release: v5.4.18</li>
<li><a
href="823675baff"><code>823675b</code></a>
fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19830">#19830</a>,
reject requests with <code>#</code> in request-target (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19831">#19831</a>)</li>
<li><a
href="0a2518a98d"><code>0a2518a</code></a>
release: v5.4.17</li>
<li><a
href="84b2b46ed1"><code>84b2b46</code></a>
fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19782">#19782</a>,
fs check with svg and relative paths (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19784">#19784</a>)</li>
<li>See full diff in <a
href="https://github.com/vitejs/vite/commits/v5.4.18/packages/vite">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vite&package-manager=npm_and_yarn&previous-version=5.4.16&new-version=5.4.18)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/Unleash/unleash/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-15 19:36:22 +02: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