1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-31 13:47:02 +02:00
Commit Graph

6172 Commits

Author SHA1 Message Date
renovate[bot]
10def0951f
fix(deps): update dependency date-fns to v4 2025-07-23 18:41:55 +00:00
dependabot[bot]
e89fa7ec6e
chore(deps): bump form-data from 4.0.0 to 4.0.4 in /frontend (#10403) 2025-07-23 18:37:42 +02:00
Thomas Heartman
64050121db
Add timestampsInChangeRequestTimeline flag (#10399)
Adds flag to OSS for the new timestamps in CR timeline capability.

We might not need them in the UI, but might as well add it in case.
2025-07-23 15:33:40 +02:00
Mateusz Kwasniewski
299ed65ef7
feat: New production flags chart (#10400) 2025-07-23 15:29:47 +02:00
Mateusz Kwasniewski
0457f5e035
chore: orval generation (#10398) 2025-07-23 13:11:26 +02:00
Nuno Góis
e87c51948f
fix: banner form state (#10397)
https://linear.app/unleash/issue/2-3710/fix-banner-form-state-inconsistencies

Noticed a few inconsistencies with the way the banner form handles
state. This should fix that by ensuring the form's state correctly
reflects prop changes.
2025-07-23 08:36:48 +01:00
Thomas Heartman
bfd82015d1
Fix each child in a list should have a key error. (#10393)
The console was complaining. I suspect it was because of the wrapping
fragment. So instead of doing everything within react, I switched to
using a standard case statement.

Also: because name is optional and not guaranteed to be unique, let's
use id for the key instead.
2025-07-22 13:03:33 +00:00
Tymoteusz Czech
f54305c8b7
refactor: impact metrics modal - label filtering and UX (#10377)
Modal for editing a chart now follows design of other parts of the app
more closely.
2025-07-22 10:08:29 +02:00
Tymoteusz Czech
c1df04548d
feat: add impact metrics wildcard label (#10373) 2025-07-21 10:50:14 +02:00
Tymoteusz Czech
2ff1aa78a0
refactor: color assignment in useChartData (#10372) 2025-07-18 14:28:56 +02:00
Tymoteusz Czech
b581b2393d
fix: improve impact metrics preview chart (#10368) 2025-07-18 09:46:32 +02:00
Mateusz Kwasniewski
89f5f79836
feat: aggregation mode selection (#10367) 2025-07-17 18:36:25 +02:00
Tymoteusz Czech
2d96becb28
fix: update legend display logic (#10365)
When grouping by multiple labels, chart label should always be visible.
Even if returned data only has 1 series
2025-07-17 16:26:24 +02:00
Tymoteusz Czech
3fb71bca75
fix: update text wrapping style in ImpactMetricsChart (#10363) 2025-07-17 10:52:53 +02:00
Mateusz Kwasniewski
8455134688
feat: show rps only for counters (#10361) 2025-07-16 13:43:29 +02:00
Mateusz Kwasniewski
c3f1454df7
feat: use metric display name in impact charts (#10359) 2025-07-16 11:58:42 +02:00
unleash-bot[bot]
96f59bccfa
chore(AI): healthToTechDebt flag cleanup (#10346)
Co-authored-by: unleash-bot <194219037+unleash-bot[bot]@users.noreply.github.com>
Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2025-07-11 14:15:55 +02:00
Melinda Fekete
cae5be4ad0
docs: update docs navigation (#9942) 2025-07-11 13:33:11 +02:00
Tymoteusz Czech
1948861a46
Update impact metrics state (#10342) 2025-07-11 10:46:20 +02:00
Tymoteusz Czech
69905185c5
Impact metrics errors with rate per second option (#10337)
- checkbox to select 'rate' vs 'increase' - always available for now,
but does nothing for gauge. I can improve it later on
- better preview - it will show resolved query underneath
- cleaner error handling that doesn't overflow widgets
2025-07-10 16:43:55 +02:00
Mateusz Kwasniewski
eb80f00206
feat: user friendly impact metric name (#10338) 2025-07-10 11:27:37 +02:00
Nuno Góis
3b6613360c
chore: unknown flags UI (#10332)
https://linear.app/unleash/issue/2-3682/add-unknown-flags-page-with-table-and-description

Adds a `/unknown-flags` page with a table of unknown flag reports and a
short description of what this is.

It’s only accessible via direct URL for now (if the flag is enabled),
but it allows us to share the list with some customers.

<img width="1026" alt="image"
src="https://github.com/user-attachments/assets/feee88bb-bbce-4871-98d7-f76f95076ee2"
/>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-08 17:51:03 +01:00
Tymoteusz Czech
1eefede62e
Improve impact metrics layout (#10326)
- narrow screen no longer breaks
- fixed size of series indicators in tooltips
- simplified grid layout props
- updated X axis ticks
2025-07-08 12:28:04 +02:00
Thomas Heartman
e2853acf15
Remove uses of one of / use operator checks instead (#10328)
Updates a few remaining places where we check constraint operators with
the new constraint operator checks. Additionally, because there was only
one remaining place where we used the `oneOf` function, I replaced it
with a normal `includes` check and deleted the `oneOf` util. From what I
can tell, there's no need to have that utility function; it doesn't
provide much benefit over using the language built-ins 🤷🏼
2025-07-08 11:10:45 +02:00
David Leek
068ef585be
feat: move apply button to a separate section (#10324) 2025-07-08 09:23:48 +02:00
Tymoteusz Czech
0247561f9d
update 'config' icon (#10319) 2025-07-07 10:41:43 +02:00
Thomas Heartman
cb4beb71ac
Chore(1 3895)/small input tweaks (#10316)
Doesn't clear the value from the constraint input value popover if you
close it and then re-open. In other words, if you accidentally click
out, you don't lose your progress. Instead, the popover will open again,
with the value you had when you closed it highlighted (so that it's easy
to type over if you want to):

<img width="452" alt="image"
src="https://github.com/user-attachments/assets/d86aa00e-4956-40a8-8fea-e75be5d5425b"
/>

The reason I'm changing this now is because I noticed that the error
wasn't cleared correctly when the popover was closed. If we do it this
way instead, then that makes sense, because you can still see the value.
This is also how the single-value popover has worked forever.

From some quick testing, the single value popover still works as
expected:
<img width="562" alt="image"
src="https://github.com/user-attachments/assets/9041a922-b055-4310-ab60-93ad219981a4"
/>


As a side note: I'm adding a comment to anyone coming after as to why
focus handling on escape doesn't work correctly on the single value
button. I was about to go down a rabbit hole on that before I read my
own comment on the previous PR. So I thought I'd put that here too.
2025-07-04 14:57:52 +02:00
Thomas Heartman
37aaf60aa5
feat(1-3873)/warn you when adding existing values (#10310)
Makes it so that the constraint value input gives you an error if you
try to add one or more values that **all** exist in the set of values
already. E.g. if you have `a` and `b`, and try to add `a`, it'll tell
you that "`a` has already been added". Likewise, if you try to add
`a,b`, it'll tell you that all these values already exist. However, if
at least one of the values does not exist, then it will allow you to
submit the values (we already do deduplication before storing anyway).

The background for this is that a user was confused thinking that just
one specific value didn't get added to their constraints. As it turns
out, they'd already added the value previously, so when it didn't show
up at the end of the list, they thought it didn't work at all.

<img width="863" alt="image"
src="https://github.com/user-attachments/assets/12195e0a-04bc-4b41-bd44-432120c768a6"
/>

<img width="816" alt="image"
src="https://github.com/user-attachments/assets/433a64d7-aec0-482d-8544-574656c266ce"
/>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-04 12:18:02 +00:00
Thomas Heartman
8e0e9c834e
chore: Use fixed-width sidebar instead of dynamic modal. (#10315)
Uses a fixed-width sidebar component instead of the dynamic sidebar
component for the change request sidebar. This fixes a case where the
modal would suddenly grow narrower when a change was sent to review
(introduced in https://github.com/Unleash/unleash/pull/10307):

Before submitting (in main)

![image](https://github.com/user-attachments/assets/a8409cf1-b066-4f97-8e28-cd2470646a9f)

After submission (in main)

![image](https://github.com/user-attachments/assets/1735a07f-5792-452f-9a22-2309da9e28fa)

Before submitting (on this branch)

![image](https://github.com/user-attachments/assets/4ffff55d-cb8a-4cb6-a22e-54da8182771b)

After submission (on this branch)

![image](https://github.com/user-attachments/assets/1569163a-a8d6-4e2c-8239-6e99b9dcfdd0)

I don't see any reason why the CR sidebar should be dynamic, so making
it fixed width with the solution we already have seems pretty sensible
to me. Keeps things consistent and prevents us from solving the same
problem multiple times in multiple ways.

Yes this change makes the sidebar a little wider, but I think that's
fine. It's also closer to what it was previously, I think. Again, we can
rethink this if necessary. And of course, the modal still smooshes
together when it needs to:
<img width="431" alt="image"
src="https://github.com/user-attachments/assets/54f31284-75a4-4038-9943-c3b42363ecb4"
/>
2025-07-04 13:44:17 +02:00
Thomas Heartman
e516bbf14c
chore: renames "Change" tab to "View change" to align with "View diff". (#10314)
There was some confusion whether the options were related or not. This
is a quick and easy solution that may solve the problem. If it doesn't,
we can make further changes later.

<img width="1045" alt="image"
src="https://github.com/user-attachments/assets/6b186b24-c4a7-491b-acbf-0e022a94493c"
/>
2025-07-04 13:32:46 +02:00
Thomas Heartman
51a895b660
Chore(1-3894): update old/new name display + remove strategy type names (#10305)
This PR updates how we show old/new strategy/segment names in change
requests, and also removes the name of the strategy type from the
change.

For the old/new names: instead of showing them stacked vertically, we
show them side by side (old name first, then new name).

Compare before:
<img width="967" alt="image"
src="https://github.com/user-attachments/assets/d3e36f49-4abc-4cd4-8ba9-752515740185"
/>


with after:

<img width="974" alt="image"
src="https://github.com/user-attachments/assets/d0f85264-b055-4c44-b985-f992f09d8dab"
/>


Only affects the new components (legacy CR view is untouched). If we get
negative feedback while rolling it out because the strat type name is
missing, we can always add it back.
2025-07-03 12:58:13 +00:00
Thomas Heartman
2b780e0120
Set a max width on the CR sidebar instead of a min width. (#10307)
The max width is set to `max(40vw, 1000px)`, so that if you're on a very
wide window, then it'll take up at most 40% of the horizontal space.
Once your window is smaller than 2500px, however, the sidebar will stop
shrinking and stay at 1000px (or as close to that as the window allows).
It'll keep shrinking with the window size.

This came up because in certain cases, such as if you have a release
template with a long description, the modal would just keep growing
until it took up 98% of the window width.

I have not set a min width for now. I don't think there is any need for
it, but if we find there is, we can add it back later.

Before:

![image](https://github.com/user-attachments/assets/815b014b-765f-4670-8724-dc70a71b3c17)


After: 

![image](https://github.com/user-attachments/assets/d2b59410-0907-4606-81b3-8103dfbcb44c)
2025-07-03 12:49:36 +00:00
Thomas Heartman
dcce90ccb1
fix segment changed name not showing (#10304)
Fixes a bug where we wouldn't show the changed segment name in segment
changes. This bug appears to have been around for a while, but this fix
does not touch the legacy version. Reintroduces the ChangeSegmentName
component to make the names stack correctly (vertically instead of
horizontally)

Before: 
<img width="993" alt="image"
src="https://github.com/user-attachments/assets/4bc24ad4-f754-4015-ba7b-4793c570fae8"
/>


After:
<img width="1010" alt="image"
src="https://github.com/user-attachments/assets/0e4d5956-3553-4ef2-979c-bdbb89b3c376"
/>
2025-07-03 13:58:56 +02:00
Thomas Heartman
44d778f7a5
Add "feature status will change" (#10302)
Updates handling of default changes by letting the change components
themselves handle adding necessary text instead of passing it down as
"actions" (when text isn't really an action ...).

There's two cases where we add default changes to a CR:
1. If you enable an environment that has no strategies, then we add the
default strategy.
2. If you disable or remove the last strategy on an active environment
(such that the environment would now have 0 active strategies), then we
disable the environment too and add that to the change request.

Here's what they look like in the new design:
<img width="985" alt="image"
src="https://github.com/user-attachments/assets/e986e79f-041a-43d2-bfae-e5ecff11012d"
/>

<img width="981" alt="image"
src="https://github.com/user-attachments/assets/6a0dfe69-899f-4bc9-ae36-9553673dba06"
/>


And because it seemed the easiest way to do it, I've also updated the
old design to do the same thing. It looks the same as it used to:
<img width="998" alt="image"
src="https://github.com/user-attachments/assets/b41612ab-22f3-4225-be24-092ca8584d9c"
/>


<img width="995" alt="image"
src="https://github.com/user-attachments/assets/3d00be93-1347-491f-a689-328178d9a8c3"
/>
2025-07-03 13:35:03 +02:00
Thomas Heartman
2dc7cbaa31
chore: prepend changes with "change:" (#10276)
Adds "change:" to the beginning of all changes and does some work to
align the use of compononents and structure across them (supersedes
https://github.com/Unleash/unleash/pull/10260).

In doing so, I have also added new and legacy variants for all different
change components, because this has required some hierarchy
restructuring every now and then. A reason for doing that was adding the
correct wrapping behavior for components, such that on smaller screens,
we wouldn't entirely blow out and make the kebab menu invisible and
inaccessible.

It also makes it so that we switch to full-width change view earlier (at
breakpoint md instead of sm), because at sm, a lot of stuff got hidden
before we switched to full-width.

Most changes are trivial updates; I've called out bits of the code that
are not in comments.

Rendered, it looks like this:
<img width="1203" alt="image"
src="https://github.com/user-attachments/assets/36bed974-99da-4d8d-a881-ea9df7797210"
/>

One interesting and potentially quite useful side-effect, is that all
change types now use the exact same set of components in the same
fashion, as evidenced by this screenie where I've added outlines to the
hierarchy:

<img width="1020" alt="image"
src="https://github.com/user-attachments/assets/685fefcc-af7e-4697-b8f3-8260af1e2a84"
/>

The one difference is that components without a diff place the "more"
kebab menu one layer further inside to facilitate prettier wrapping (the
kebab menu can stay on the same line as the other text when wrapping):
<img width="238" alt="image"
src="https://github.com/user-attachments/assets/2b8d3174-06a8-4ad4-b366-cea97720deda"
/>
2025-07-03 11:14:04 +02:00
Tymoteusz Czech
082a6fdb16
Feat: impact metrics grid layout (#10253) 2025-07-03 09:09:03 +00:00
unleash-bot[bot]
f7fcd1c4df
chore(AI): registerFrontendClient flag cleanup (#10297) 2025-07-03 10:52:48 +02:00
David Leek
bed467520d
chore: limit requested approver count to 10 (#10279) 2025-07-03 09:25:58 +02:00
Jaanus Sellin
abe943951a
feat: add id as removable param for event list (#10289)
Also added ID as removable param, which can not be added from badge, but
can be added as query param.


![image](https://github.com/user-attachments/assets/fdb75dfa-b164-41b4-a57e-5cf5d2d9efea)
2025-07-03 09:27:01 +03:00
Jaanus Sellin
30fbc62f9b
feat: group id clickable in event search (#10277)
Now when pressing the group id, the query params get updated.
Also the FilterItem appears and it is possible to discard the group id
selection through it.


![image](https://github.com/user-attachments/assets/83d5446f-4823-4c25-9fdc-870c2e4811d8)
2025-07-02 14:16:40 +03:00
Thomas Heartman
bb473001c0
chore: remove view diff links in new components + remove colons (#10262)
Removes the view diff hover links (and strategy icons) in the new views
and removes trailing colons.

In removing the hover links, I have split up the content of their files
(`StrategyTooltipLink` and `SegmentTooltipLink`) into
`Change{Segment|Strategy}Name` and `{Segment|Strategy}Diff`. I have
reverted the existing tooltip files to their state before I began
changing this and added deprecation notices. These old tooltips are only
used by the old components, so we don't need to work on them after all.

In doing this work, I've also updated the strategy change diff to handle
the new functionality (tabs instead of hover)

The removal of the trailing colons (so that it's `adding strategy
gradual rollout` instead of `adding strategy: gradual rollout` is in
preparation for the remaining changes to the header that we're
introducing with this change. The removal of these is not behind a flag,
so I've also done it in the legacy components. This feels like a very
low risk change, so it felt like more work to have to check a flag for
each of the different instances where we use it.

<img width="839" alt="image"
src="https://github.com/user-attachments/assets/b29b8073-c282-4b4b-948f-9a545082ac31"
/>
2025-07-02 09:42:59 +02:00
Jaanus Sellin
7e85de8f65
feat: now it is possible to search events by group id (#10275)
Now when you put group ID as query param, it will filter based on
transaction id.

I am not sure if its best naming, whether it should be groupId or
transactionId, I will leave as group for now, but its simple change
later.


![image](https://github.com/user-attachments/assets/e0caaf57-f93f-40ee-a332-d3aed249c4ca)
2025-07-02 10:16:13 +03:00
Tymoteusz Czech
3f073ad457
feat: impact metrics page with multiple charts (#10252) 2025-07-01 14:54:25 +02:00
Jaanus Sellin
0e5080fac5
feat: start showing CR id in UI and make it clickable (#10259)
![image](https://github.com/user-attachments/assets/72c631aa-0b60-42c1-b546-870962a3e885)
2025-07-01 12:50:49 +03:00
Thomas Heartman
f6ab7460c6
Remove the red coloration of deleted strategy change boxes (#10246)
We don't want deleted strategies to have the red background color
anymore with the new change/diff view. As such, we can remove it in the
new component and add a todo to delete the css for it after it's gone.

<img width="1050" alt="image"
src="https://github.com/user-attachments/assets/083cbcac-5df9-47cd-bd78-2501c3bbf64e"
/>
2025-06-30 14:56:15 +02:00
Thomas Heartman
d7c465fd20
chore: use pre-wrap for whitespace to break when necessary. (#10245)
Use `white-space: pre-wrap` on event diff lines instead of just `pre`.
This prevents us from getting a horizontal overflow and will instead
wrap the lines if it needs to, but preserve indentation and other spaces
(as explained in [MDN's white-space
docs](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space)).

Means that instead of getting a horizontal overflow and a scroll bar, we
get something like this instead:

![image](https://github.com/user-attachments/assets/d2fab200-6f14-47bc-8d4a-bcbb424fa762)
2025-06-30 12:44:51 +00:00
Thomas Heartman
88514077f5
Chore(1-3882)/add diff border (#10244)
Adds a border around all the JSON diffs panels to align better with the
sketches and to mesh better with the existing change cards in CRs.

<img width="1051" alt="image"
src="https://github.com/user-attachments/assets/b4e81c34-630b-436b-8de2-9e6e6893b3fb"
/>
2025-06-30 14:17:49 +02:00
Thomas Heartman
f18509665d
add tabs to strategy sort order (#10243)
Adds the same tab interface to env execution order changes as to other
diffable changes. Instead of creating a new file, this one just
duplicates and changes the component that we wanna touch.

Change 
<img width="799" alt="image"
src="https://github.com/user-attachments/assets/2cd54f50-c4e6-43ef-a413-ed61973cf889"
/>

Diff
<img width="997" alt="image"
src="https://github.com/user-attachments/assets/ef0379f5-0084-4c38-a713-373ccfacee0e"
/>
2025-06-30 11:40:28 +00:00
Thomas Heartman
7c0bd12a24
add tabs to milestone start (#10237)
Adds changes/view diff tabs to release plan changes that show diffs. The
only instances I found where we show JSON diffs today was starting
milestones and adding a new release plan if you already have one.

I've moved the old file into a legacy file because we're touching two
out of three internal components, so it seemed like leaving it all in
one file would be a bit of a hassle. plus, this way it's consistent with
segments and strategies.

Start milestone:
<img width="1035" alt="image"
src="https://github.com/user-attachments/assets/2b4616f6-8452-4976-8101-11a94d6d5828"
/>

<img width="1054" alt="image"
src="https://github.com/user-attachments/assets/0ba58c72-b3dc-48fa-95bf-a3980dc620fe"
/>

Plan replacement:
<img width="1006" alt="image"
src="https://github.com/user-attachments/assets/9381a48f-e23e-435e-8fa5-02fcb5050bfd"
/>

<img width="818" alt="image"
src="https://github.com/user-attachments/assets/c5ceb9db-b095-4d05-88e8-fd8a70776479"
/>
2025-06-30 13:18:18 +02:00
Thomas Heartman
e2bb894f68
feat(1-3878)/diffable segment changes (#10234)
Adds change / view diff tab buttons to segment changes too. Extracts the
tab definitions and stylings into its own file so that it's easier to
share across CR change components. Moves the old segment change details
into the legacy segment change file.

Change views:
<img width="999" alt="image"
src="https://github.com/user-attachments/assets/26e2a987-f582-449d-b61c-bf2ec5c1edd4"
/>

Diff views:
<img width="1011" alt="image"
src="https://github.com/user-attachments/assets/95621234-1352-4164-8f74-775bdb0e61dd"
/>
2025-06-30 09:53:21 +00:00