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

13987 Commits

Author SHA1 Message Date
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
Melinda Fekete
278421a1c8
docs: change 'Get a demo' to 'Start free trial' (#9947)
Change the main docs CTA from 'Get a demo' to 'Start free trial'
2025-05-09 16:51:29 +02:00
Mateusz Kwasniewski
e414c4446d
feat: remove instances older than 1 day not 2 days (#9944) 2025-05-09 13:58:52 +02: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
Tymoteusz Czech
f02c883da5
feat: external link templates (#9927)
Adds support for link templates in projects, allowing reusable URL
patterns with placeholders. Includes validation, database changes,
updated API schemas, and tests.
2025-05-09 12:40:14 +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
Nuno Góis
bfc583b5b7
chore: prevent duplicate key errors in unknown flags (#9940)
https://linear.app/unleash/issue/2-3561/fix-duplicate-key-errors-in-unknown-flags

This should prevent `duplicate_key` errors in unknown flags.

Follow-up to: https://github.com/Unleash/unleash/pull/9837

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-09 10:02:38 +01:00
Jaanus Sellin
8b115122fc
chore: fix strategy tests (#9922)
This is still in progress.
2025-05-09 11:10:45 +03:00
Mateusz Kwasniewski
43efaf7c47
feat: report feature links by domain (#9936) 2025-05-09 09:39:15 +02: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
a3ac624deb
feat: report top used domains (#9934) 2025-05-08 14:06:10 +02:00
Tymoteusz Czech
499ee1e099
migration: project settings - external link templates (#9933) 2025-05-08 13:51:21 +02:00
Mateusz Kwasniewski
28e5f39548
feat: store domain for links (#9931) 2025-05-08 13:33:41 +02:00
Mateusz Kwasniewski
9ca44e6188
feat: add domain to links (#9930) 2025-05-08 13:20:47 +02:00
Mateusz Kwasniewski
3865fb41ae
fix: project environments have info about required approvals (#9929) 2025-05-08 11:37:15 +02:00
Mateusz Kwasniewski
c8ebaa49fc
feat: order links by insertion order (#9928) 2025-05-08 10:46:26 +02:00
Mateusz Kwasniewski
dea785fb96
feat: edit link UI (#9926) 2025-05-08 10:25:47 +02:00
Gastón Fournier
919db76629
chore: ignore sample cdn url (#9925)
This url is used as an example in a page
2025-05-08 08:42:33 +01: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
Nuno Góis
eb238f502a
chore: unknown flags (#9837)
https://linear.app/unleash/issue/2-3406/hold-unknown-flags-in-memory-and-show-them-in-the-ui-somehow

This PR introduces a suggestion for a “unknown flags” feature.

When clients report metrics for flags that don’t exist in Unleash (e.g.
due to typos), we now track a limited set of these unknown flag names
along with the appnames that reported them. The goal is to help users
identify and clean up incorrect flag usage across their apps.

We store up to 10 unknown flag + appName combinations, keeping only the
most recent reports. Data is collected in-memory and flushed
periodically to the DB, with deduplication and merging to ensure we
don’t exceed the cap even across pods.

We were especially careful to make this implementation defensive, as
unknown flags could be reported in very high volumes. Writes are
batched, deduplicated, and hard-capped to avoid DB pressure.

No UI has been added yet — this is backend-only for now and intended as
a step toward better visibility into client misconfigurations.

I would suggest starting with a simple banner that opens a dialog
showing the list of unknown flags and which apps reported them.

<img width="497" alt="image"
src="https://github.com/user-attachments/assets/b7348e0d-0163-4be4-a7f8-c072e8464331"
/>
2025-05-07 11:48:36 +01:00
Mateusz Kwasniewski
2b73b17579
feat: feature links section (#9915) 2025-05-07 11:35:41 +02:00
Github Actions Bot
b322afb097 6.10.0 2025-05-07 07:51:51 +00:00
Github Actions Bot
0784ce4f1f docs: Update CHANGELOG.md 2025-05-07 07:51:39 +00: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
Mateusz Kwasniewski
20a80142d3
feat: normalize urls in feature links (#9911) 2025-05-06 19:08:04 +02: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
Mateusz Kwasniewski
b9f1d8414c
feat: add links to feature read model (#9905) 2025-05-06 14:57:52 +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
Mateusz Kwasniewski
c6ab2a1cf7
feat: sql feature link persistence (#9901) 2025-05-06 11:46:15 +02:00
Mateusz Kwasniewski
bb82b6920b
feat: feature link migration (#9900) 2025-05-06 11:21:20 +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