1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
Commit Graph

3458 Commits

Author SHA1 Message Date
Mateusz Kwasniewski
3a9b9e9e55
feat: fixed full mode navbar width (#8001) 2024-08-28 11:57:29 +02:00
Mateusz Kwasniewski
bed4f66fa2
feat: fixed full mode navbar width (#7999) 2024-08-28 11:07:55 +02:00
Mateusz Kwasniewski
d5e4544fad
feat: new in unleash summary text (#7996) 2024-08-28 10:30:03 +02:00
Mateusz Kwasniewski
c8f20196e0
feat: Signals preview img (#7993) 2024-08-28 08:24:12 +02:00
Mateusz Kwasniewski
09e619ee25
fix: copy strategy should always add a new strategy (#7994) 2024-08-28 08:23:30 +02:00
Mateusz Kwasniewski
c69036c5a9
feat: new in unleash tooltip (#7991) 2024-08-27 15:47:55 +02:00
Tymoteusz Czech
742504793c
refactor: make avatar group more customizable (#7989) 2024-08-27 14:37:45 +02:00
Tymoteusz Czech
25617f7a24
refactor: prepare project card iteration (#7990)
Copy/rename files in preparation for new ProjectCard iteration.
2024-08-27 14:11:07 +02:00
Jaanus Sellin
fc86f5b2fe
feat: align insights charts (#7984)
Now the left widget will use the same that as the last data point on the
right chart.
With this change, flags/users object never needs to be passed in.

**Next step is to remove the flags/users from the endpoint.**

Previous


![image](https://github.com/user-attachments/assets/b938e568-e32e-4ae8-beb9-d8de8aa2c5ec)

Now


![image](https://github.com/user-attachments/assets/182dfbbb-bf2e-42f9-a024-0c545c604f74)
2024-08-27 11:06:08 +03:00
Mateusz Kwasniewski
07f9935433
feat: make hide nav info always visible (#7981) 2024-08-26 15:57:33 +02:00
Tymoteusz Czech
80a9591d37
Fix/metrics chip adhock improvement (#7976)
On flag metrics page
2024-08-26 12:28:21 +02:00
Jaanus Sellin
08b0bfe291
chore: move flags widget 2 widgets down (#7977)
Moving flags 2 widgets down
2024-08-23 16:35:39 +03:00
Jaanus Sellin
f7d5c8e12d
feat: introduce new icons for import/export (#7970)
We found good one for export from MUI, but needed to created similar one
for import.


![image](https://github.com/user-attachments/assets/f8ed2f07-5c8b-4829-a298-4b5e7311b059)
2024-08-22 15:04:50 +03:00
gitar-bot[bot]
4615ff40ce
[Gitar] Cleaning up stale flag: resourceLimits with value true (#7964)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.co)
  
  ---
This automated PR was generated by [Gitar](https://gitar.co). View
[docs](https://gitar.co/docs).

---------

Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-08-22 13:20:53 +02:00
Thomas Heartman
b0541a0af2
feat: add remaining resource usage to instance stats (#7958)
Updates the instance stats endpoint with 
- maxEnvironmentStrategies
- maxConstraints
- maxConstraintValues

It adds the following rows to the front end table:
- segments (already in the payload, just not used for the table before)
- API tokens (separate rows for type, + one for total) (also existed
before, but wasn't listed)
- Highest number of strategies used for a single flag in a single
environment
- Highest number of constraints used on a single strategy
- Highest number of values used for a single constraint


![image](https://github.com/user-attachments/assets/57798f8e-c466-4590-820b-15afd3729243)
2024-08-22 13:09:26 +02:00
Jaanus Sellin
cb8d689bd8
feat: command menu docs (#7963)
Also rebranded command bar to command menu, because that seems more
suitable.
Command bar is more like a horizontal/vertical list/bar of icons, like
sidebar. Command menu is more of a dropdown.


https://unleash-docs-git-command-docs-unleash-team.vercel.app/reference/command-menu

---------

Co-authored-by: melindafekete <melinda.fekete@getunleash.io>
2024-08-22 14:07:15 +03:00
Jaanus Sellin
4a4dafcc3f
chore: remove create feature component (#7959)
After we implemented new feature flag creation flow, this are not used
anymore.

Creation is now handled by **CreateFeatureDialog**.

Also edit component can be minified, because it does not need so many
fields anymore.
2024-08-22 11:30:41 +03:00
Melinda Fekete
341703978a
docs: Update projects docs (#7941) 2024-08-21 14:56:17 +02:00
gitar-bot[bot]
3a15fa7689
[Gitar] Cleaning up stale flag: integrationEvents with value true (#7940) 2024-08-21 14:25:24 +02:00
Mateusz Kwasniewski
2a13139215
fix: project owner name overflow (#7949) 2024-08-21 13:12:42 +02:00
Tymoteusz Czech
6c5ce52470
Refactor: Remove react-timeago (#7943)
Remove dependency 🫡
2024-08-21 12:03:03 +02:00
gitar-bot[bot]
43100f9561
Cleaning up stale flag: insightsV2 with value true (#7896)
Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2024-08-21 12:01:35 +02:00
Mateusz Kwasniewski
ee1d8ee8cd
fix: misc fixes for project archive (#7948) 2024-08-21 10:34:13 +02:00
Mateusz Kwasniewski
51f61d5103
feat: prevent revive feature to archived project (#7939) 2024-08-20 15:09:37 +02:00
David Leek
37dd2ebc4c
fix: only show addon delete button when editing addons (#7930) 2024-08-20 14:36:27 +02:00
Tymoteusz Czech
0d97f8b7c1
fix: react-timeago issue (#7936) 2024-08-20 14:03:05 +02:00
Thomas Heartman
8e2ae6c6c7
fix: update the customer success email for limits (#7933)
The previously used email address doesn't actually exist 😳 It was taken
from the sketches and we just never verified it.
2024-08-20 11:58:25 +02:00
Tymoteusz Czech
c363fdcfc4
Expired invite link style (#7928) 2024-08-20 09:52:59 +02:00
Mateusz Kwasniewski
4e11e57f7f
feat: project actions count metric (#7929) 2024-08-20 09:46:39 +02:00
gitar-bot[bot]
662c7ab4dc
[Gitar] Cleaning up stale flag: changeRequestPlayground with value true (#7920) 2024-08-19 15:33:55 +02:00
Tymoteusz Czech
004038e872
update project archive and revive dialogs (#7918) 2024-08-19 13:33:00 +00:00
Thomas Heartman
cf3379d0b3
fix: avoid awkward overlaps of group cards with lots of members, long project names, and small cards (#7915)
This PR updates the styling of the group cards to better handle edge
cases where you have a lot of assigned projects, long project names,
lots of members, etc.

In particular, it does the following things:
- aligns the avatars along the bottom of the card, so that even if
there's a lot of projects, the avatars stay close to the bottom edge
- adds word breaks for the project names, so that long names can break
when they need to
- adds some spacing between the two columns in the bottom row, so that
even when you they get close, they never quite touch.

Note: there is one more thing I'd like to address in a follow up: as
shown in the top row of the after image, there's some extra wrapping of
the first "This group has no users", even though it has the room to
grow. I'll keep looking into this and make a follow-up.

Before:

![image](https://github.com/user-attachments/assets/d612a1de-0aa7-4813-8e73-9345f449238d)

After:


![image](https://github.com/user-attachments/assets/a85308b3-dc42-4777-ab1e-4a89429507d2)
2024-08-19 12:58:46 +00:00
Mateusz Kwasniewski
141720d9b8
feat: adjust archived card styling (#7917) 2024-08-19 14:22:58 +02:00
Mateusz Kwasniewski
2050cb0b76
feat: static link to archived flags in archived project (#7913) 2024-08-19 11:24:39 +02:00
Thomas Heartman
abd077aaf7
chore: add flags projectListImprovements and useProjectReadModel (#7905)
These are both related to the work on the project list improvements
project.

The `projectListImprovements` flag will be used to enable disable the
new project list improvements.

The `useProjectReadModel` flag will be used to enable/disable the use
of the new project read model and is mostly a safety feature.
2024-08-16 11:54:11 +02:00
Tymoteusz Czech
b9ea24be8d
fix: orphaned token label only for items without projects (#7901)
Orphaned token label was incorrectly assigned.
Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-08-16 10:58:44 +02:00
Tymoteusz Czech
f2e2952c31
fix: projects archive search (#7898)
Filter projects when searching
2024-08-15 16:19:29 +02:00
Mateusz Kwasniewski
a3decb543f
feat: Show project archived message (#7899) 2024-08-15 14:56:12 +02:00
gitar-bot[bot]
977f969b80
[Gitar] Cleaning up stale flag: improveCreateFlagFlow with value true (#7895)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.co)
  
  ---
This automated PR was generated by [Gitar](https://gitar.co). View
[docs](https://gitar.co/docs).

---------

Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: sjaanus <sellinjaanus@gmail.com>
2024-08-15 15:53:36 +03:00
gitar-bot[bot]
413df42555
[Gitar] Cleaning up stale flag: commandBarUI with value true (#7894)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.co)
  
  ---
This automated PR was generated by [Gitar](https://gitar.co). View
[docs](https://gitar.co/docs).

---------

Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: sjaanus <sellinjaanus@gmail.com>
2024-08-15 14:29:07 +03:00
Tymoteusz Czech
3baeb4c541
feat: dialogs for project revive and delete (#7863)
Dialog needed to confirm revive/delete actions
2024-08-15 07:25:49 +00:00
Tymoteusz Czech
1e66fedb7e
chore: update openapi (#7881)
Auto-generated types
2024-08-14 14:31:32 +00:00
Thomas Heartman
f59b77571c
chore: code cleanup: event log filters (#7870)
Adds tests for event log filters (to ensure we show the right filters)
and refactors the implementation of eventlogfilters.

Primary goal of refactoring:
- Make it so that all filters are created in one single list (instead of
injected from different variables)
- Avoid making a requests for features (and to a lesser extent:
projects) if you can't use them for filters
- Improve code structure
2024-08-14 15:27:22 +02:00
Thomas Heartman
dad30a08f0
fix: cap number of collaborators displayed (#7879)
Caps the number of collaborators to display to a constant (currently
set to 99).

Above that, it'll always show "+99".

However, we also add a tooltip that shows you a prettified version of
the extra collaborators (using the `millify` package that we already use
for metrics)

Screenies:

< 1000 collaborators:

![image](https://github.com/user-attachments/assets/b030e77e-e23d-4cac-a1d1-7841a4ba86e7)


1000 - 1M collaborators:

![image](https://github.com/user-attachments/assets/b72ca22e-513d-4d69-b78d-c675951c894a)

1M+ collaborators:

![image](https://github.com/user-attachments/assets/6341e87d-17da-4359-bce3-e31df637cd5c)

Update, it now shows the total number of collaborators instead of the
overflow:

![image](https://github.com/user-attachments/assets/67a459c5-91b8-475d-b0e3-c5c19aaf62d7)
2024-08-14 13:27:05 +00:00
Simon Hornby
f276728688
feat: allow editing root role/description on SCIM group (#7874) 2024-08-14 15:11:56 +02:00
Thomas Heartman
5e82e47d94
fix: add collaborators to ignored props for feature diff notif (#7877)
Fixes a problem with demo saying you've got outdated data when someone
else has worked with ya
2024-08-14 13:46:03 +02:00
Jaanus Sellin
778413d4c0
feat: plausible for events export (#7868)
Plausible for events exports. And small cleanup.
2024-08-14 11:56:03 +03:00
Thomas Heartman
764d03767b
chore: begin front end cleanup (#7865)
Begins cleaning up the front end.

Removes the "legacy" event log component in favor of only using the new
one. What we do is simply not to show the filters if you're not on
enterprise.

This means that we'll get pagination (and maybe exports?) for everyone.

It also means that you can reverse-engineer the filters and use them
even on non-enterprise, as long as you're happy editing URLs manually.
However, putting it behind a flag on the front end always exposed that
kind of risk, so I don't think this is a bad move.
2024-08-14 10:03:28 +02:00
Jaanus Sellin
8ce594ba52
feat: exporting events as csv (#7860)
Adding csv library that also makes nested properties into columns.
2024-08-13 16:28:03 +03:00
Tymoteusz Czech
ccb29a5acf
refactor: project archive card (#7859)
- Refactored "favorites" action, and fixed issue with "favorite" prop
- Refactored "owners" - simplified footer
2024-08-13 15:19:13 +02:00
Thomas Heartman
9f0fd7e200
chore: create skeleton loading for new event screen (#7861)
Updates the new event log to show a skeleton loading screen while the
search results are being fetched.

The placeholder size is based on the standard event size.


![image](https://github.com/user-attachments/assets/fce51445-2b73-40dd-9452-29a415ec278a)
2024-08-13 15:18:47 +02:00
Tymoteusz Czech
f2b7e0278d
Projects archive UI (#7842)
Closes
[issue/1-2666](https://linear.app/unleash/issue/1-2666/archived-projects-view)
2024-08-13 14:33:11 +02:00
Gastón Fournier
ea92081545
fix: remove another scimApi flag (#7858) 2024-08-13 14:03:52 +02:00
Gastón Fournier
376012ddd1
fix: remove flag from UI (#7857) 2024-08-13 11:44:16 +00:00
Thomas Heartman
1b892979d3
feat: add event creators data to filter (#7822)
Adds event creator data to the event creator filter.

It uses a new useEventCreators hook to fetch event creators from the new
API, and uses that to populate the event creators filter.
2024-08-13 10:41:55 +02:00
Thomas Heartman
245bdeae1e
chore: generate orval for event creators (#7823)
Updates our orval config to include event creator data
2024-08-12 15:07:26 +02:00
Jaanus Sellin
b194393dae
feat: export events as json (#7841)
![image](https://github.com/user-attachments/assets/7e24339d-fa59-4b80-a322-05323e01eabe)
2024-08-12 15:30:20 +03:00
Thomas Heartman
fa96ff1450
fix: display feature naming patterns in dialog (#7837)
Updates the dialog form template to include a `namingPattern` prop that
can be used to display the naming pattern of whatever the form is used
for.

Also updates the create feature dialog to display the naming pattern in
the current project.

The naming pattern component re-uses the pattern that we have in place
for feature naming patterns, but puts it in an expandable dialog
instead.

Screenies:

Naming pattern closed:

![image](https://github.com/user-attachments/assets/145e4268-1aa0-4c1b-8f08-97857447e2f5)


![image](https://github.com/user-attachments/assets/1613c846-e7d4-41c8-a1c8-a66ab87b6e5f)



Naming pattern open:

![image](https://github.com/user-attachments/assets/1aa37162-500b-4b83-926f-07aa777e8017)
2024-08-12 13:56:07 +02:00
Tymoteusz Czech
8091987aaa
manually clear DependencyActions (#7827) 2024-08-12 12:00:46 +02:00
Tymoteusz Czech
e77bb1b2e7
Fix: time to production (#7835)
- filter out time to production data points of `0 days to production`
- allow for gathering data for quickly enabled feature flags
2024-08-12 09:47:06 +00:00
Thomas Heartman
99f878d725
fix: don't always fetch all flags on project flag screen (#7834)
There's a bug where the UI will fetch all features every time you load a
project screen (including every time you filter the project results).

The reason is that the create flag dialog was rendered (just not open)
every time. To solve it, we instead wrap it in an extra component that
prevents all the fetching and setup from running when the dialog isn't
open.

Additionally, we'll lower the page size for the global fetch limit to 1,
so that we send less data.
2024-08-12 11:07:36 +02:00
gitar-bot[bot]
5aaa4920dd
chore: [Gitar] Cleaning up stale flag: featureCollaborators with value true (#7820)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.co)
  
  ---
This automated PR was generated by [Gitar](https://gitar.co). View
[docs](https://gitar.co/docs).

---------

Co-authored-by: Gitar <noreply@gitar.co>
Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-08-09 11:12:26 +02:00
Thomas Heartman
258909db39
fix: Update avatar usage in change requests (#7818) 2024-08-09 09:54:16 +02:00
Alvin Bryan
274d314b28
chore: Fixed typo (#7774)
Looks like it got missed during the Great Feature Flag Renaming 😄
2024-08-08 13:53:33 +02:00
Mateusz Kwasniewski
b65e593c23
chore: remove featureLifecycle and featureLifecycleMetrics flags (#7808) 2024-08-08 13:45:23 +02:00
Mateusz Kwasniewski
3fe385e127
chore: remove flagCreator flag (#7807) 2024-08-08 12:19:32 +02:00
Mateusz Kwasniewski
ce30c069ee
fix: playground env column spacing made bigger (#7806) 2024-08-08 11:42:52 +02:00
Tymoteusz Czech
cb4e447d69
fix: show environments page as enterprise feature (#7796)
Not available with menu, URL only, and actions are not working with OSS
and Pro.
2024-08-08 10:03:02 +02:00
Mateusz Kwasniewski
a01305040d
feat: archive project form (#7797) 2024-08-08 09:29:28 +02:00
Tymoteusz Czech
4daede8e1c
fix: allow for empty groupId in form (#7798)
`groupId` parameter because of the change in validation wasn't parsed
correctly. Intent was to fill it when it is empty, when the form is loaded.
By mistake the same logic applies when you manually remove all
characters from the text field.
2024-08-07 16:34:30 +02:00
Thomas Heartman
ff9b7298b6
feat: add paging to event log (#7793)
Adds sticky pagination to the event log:


![image](https://github.com/user-attachments/assets/c426f30d-bb64-44a5-b3b4-8c295207b249)

This PR uses the sticky pagination bar that we use on other tables to
navigate the event search results.

## Decisions / discussion points

The trickiest issue here is how we calculate the next and previous page
offsets. This is tricky because we don't expose the page number to the
API, but the raw offset itself. This abstraction makes it possible to
set an offset that isn't a multiple of the page size.

Say the page size is 25. If you manually set an offset of 30 (through
changing the URL), what do you expect should happen when you:
- load the page? Should you see results 31 to 55? 26 to 50?
- go to the next page? Should your next offset be 55 or 50?
- previous page: should your previous page offset be 5? 25? 0?

The current implementation has taken what I thought would be the easiest
way out: If your offset is between two multiples of the page size, we'll
consider it to be the lower of the two.
- The next page's offset is the next multiple of the page size that is
higher than the current offset (50 in the example above).
- The previous page's offset will be not the nearest lower page size,
but the one below. So if you set offset 35 and page size 25, your next
page will take you back to 0 (as if the offset was 25).

We could instead update the API to accept `page` instead of offset, but
that wouldn't align with how other tables do it.

Comparing to the global flags table, if you set an offset that isn't a
multiple of the page size, we force the offset to 0. We can look at
handling it like that in a follow-up, though I'd argue that forcing it
to be the next lower multiple of the page size would make more sense.

One issue that appears when you can set custom offsets is that the
little "showing x-y items out of z" gets out of whack (because it only
operates on multiples of the page size (seemingly))

![image](https://github.com/user-attachments/assets/ec9df89c-2717-45d9-97dd-5c4e8ebc24cc)

## The Event Log as a table

While we haven't used the HTML `table` element to render the event log,
I would argue that it _is_ actually a table. It displays tabular data.
Each card (row) has an id, a project, etc.

The current implementation forces the event log search to act as a table
state manager, but we could transform the event list into an events
table to better align the pagination handling. The best part? We can
keep the exact same design too. A table doesn't have to _look_ like a
table to be a table.
2024-08-07 15:08:01 +02:00
Thomas Heartman
4fac38ce01
fix: select an item only from the filtered list of options (#7789)
Fixes a bug where the `handleSelection` function would select the
wrong item under certain conditions.

Because we always sent the unfiltered list of options to the function,
but took the index of the filtered items, the index would be off when
you have filtered the list and items before the selected items were
hidden.

This addresses that and also ports in some improvements I made when
setting up the config buttons for the new dialogs:

1. You can now use the space bar to select items that you have
focused (this is consistent with regular form interactions for
checkboxes)

2. When you have added text to the search field, pressing Enter will
select the top-most item (this is consistent with how these fields
work in linear, for instance) as long as your focus is still in the
search field. If you have moved it to the list, enter will still
select an item on that list as expected.

Potential other addition: if you press "Enter" with an empty search
field, we could close the box but keep your selection the same. Again,
this is how Linear does it, but I don't personally know what I'd
expect to happen there, so I'm happy to leave it as is.
2024-08-07 14:46:37 +02:00
Thomas Heartman
bb84ef21ad
fix: don't delete projects screen from history (#7787)
Fixes a bug in the navigation when you create a project. It used to be
that we'd replace the current entry in the browser history when we
took you to a separate form for it. However, now that we instead
use a dialog, we don't want to replace the history.

Before: if you created a project and navigated back, you'd be taken to
the page you were at BEFORE you went to the projects page, whether
that was in Unleash or otherwise.

Now you'll be taken back to the projects page.
2024-08-07 09:31:50 +02:00
Thomas Heartman
d70c279d3d
refactor: split EventLog into separate components and hook up new Event search (#7777)
Hooks up the new Event search and filtering capabilities to the new
Event Log component. In doing so, it also splits the existing EventLog
component into two: `LegacyEventLog` and `NewEventLog`. The naming is
probably temporary, as the old EventLog isn't really legacy yet. But we
can rename them later.

The other half of #7768 .
2024-08-07 08:48:59 +02:00
Thomas Heartman
2556bd0cf6
feat: Front end filter state management for event search (#7776)
This is just the state management part of #7768.

Adds a useEventLogSearch hook.

All the filters work except for the date filters. They don't work
because the query parameters in the API don't match what's here, but an
update to the API is coming in a follow-up.

It's a little tricky to handle this because the three different event
logs should have slightly different filters, which makes making the type
checker happy a bit of a pain. However, I'd like to revisit this in a
follow-up PR.
2024-08-06 15:11:10 +02:00
Thomas Heartman
76bc7bf250
refactor: rename createdAtFrom/To to from/to (#7773)
Update the query parameter of the new event search API to match the
query parameters of the insights API
2024-08-06 15:02:44 +02:00
Mateusz Kwasniewski
f9665233cc
chore: archive projects flag (#7772) 2024-08-06 14:59:49 +02:00
Mateusz Kwasniewski
41c6d06093
fix: missing space in delete project message (#7771) 2024-08-06 14:11:37 +02:00
Tymoteusz Czech
29975a62c4
feat: link to release notes from orphaned tokens (#7731)
Adding a link "Read more in [release
notes](https://github.com/Unleash/unleash/releases/tag/v6.1.0)" to
orphaned tokens.

This needs to be added on v6.1, with the following changelog entry:


> **SDK tokens for deleted projects**
> 
> In previous versions of Unleash, when a project was deleted, the
associated SDK tokens were not removed. This issue has been addressed in
the current version of Unleash.
> 
> Unfortunately, if you deleted a project in the past without manually
removing the associated tokens, these "orphaned" tokens were
automatically converted to “wildcard” tokens, granting access to all
feature flags across all projects.
> 
> Our assessment indicates this poses a minor security concern due to
the following reasons:
> 
> This issue only affects tokens whose entire project scope has been
deleted. 
> 
> Access requires knowledge of the token.
> 
> SDK tokens have limited read access and must be assigned to a single
environment.
> 
> In the SDK tokens overview, orphaned tokens are flagged with a
warning. We recommend discontinuing the use of these tokens and creating
new, dedicated tokens instead.
> 
> With the latest version, when a project is deleted, all API tokens
scoped to that project will be removed as well. If you need further
assistance, please contact customer support.
2024-08-06 14:12:33 +03:00
Mateusz Kwasniewski
c7ececc429
feat: link to frontend api url (#7770) 2024-08-06 13:09:37 +02:00
Thomas Heartman
cd7697db62
feat: new useEventSearch hook (#7757)
Creates a new useEventSearch hook based on the useFeatureSearch hook.
Moves the old useEventSearch hook into useLegacyEventSearch and updates
references to it.

I don't know yet whether this'll work entirely as expected, but I plan
on making any necessary configurations when I implement the state
management in a follow-up PR.

But because this is pretty much a straight copy-paste from
useFeatureSearch (only adjusting types, I think), I also think it might
be possible to turn this into a generic search template. Not sure if now
is the time, but worth thinking about, I think.
2024-08-05 13:12:45 +00:00
Thomas Heartman
dd71fe32bb
Update front end schemas for new event search (#7758)
Updates the orval spec for the new event search.
2024-08-05 12:48:01 +00:00
Mateusz Kwasniewski
ecdae7fee7
feat: playground try configuration mode (#7752) 2024-08-05 12:34:24 +02:00
Thomas Heartman
6dde9082f1
refactor: simplify event log filters component and adds more data (#7736)
This change primarily adds all flags to the flag filter and restructures
the filters component. Instead of splitting into three smaller
components, we now handle more data in the main component.

We might wanna turn them back to smaller components later, but I think
this'll be easier to work with.
2024-08-05 10:07:23 +00:00
Tymoteusz Czech
c37c86f7a0
fix: show api token on playground (#7753)
Fix CR condition preventing API token from showing up
2024-08-05 09:52:49 +00:00
Thomas Heartman
f89b8249f7
fix: decrease collaborator font size (#7754)
Decreases the collaborator font size to make it less eye-catching.

Before:

![image](https://github.com/user-attachments/assets/9a55d7fc-13eb-4656-aead-ca9e25100a63)

After:

![image](https://github.com/user-attachments/assets/3b1e0f26-9fa7-4ae2-ad2c-dc68839c8197)
2024-08-05 09:48:57 +00:00
Tymoteusz Czech
11612931b9
fix: insights health info link placement (#7750)
Fixing link placement on smaller screens.
2024-08-05 10:39:48 +02:00
Thomas Heartman
0284daf2ba
fix: Avoid collaborators being smooshed together (#7741)
Fixes an issue where the collaborator component would be smooshed
together when you have too many collaborators and too many flag tab
items.

The primary things I have done are:
1. Limit the amount of collaborators we show to 6 instead of 8. I
believe the number 8 was arbitrary, so let's go with 6 for now.
2. Instead of using a fixed gap, use a separator element that grows up
to a certain limit. I've added a `Separator` component, which is an
empty div with flex-grow. It feels like you should be able to do that
with gap too, but I can't think of how right now.
3. Don't allow collaborator component text (or avatars) to wrap. We
don't have a lot of space in this header, so let's keep it tight.

Additionally, I've added the `className` prop to the AvatarGroup
component so that it can be styled externally. I also cleaned up some
naming that was left in while I was at it.

Before:

![image](https://github.com/user-attachments/assets/98525a23-c086-433a-8f60-3e281805409f)


After:

![image](https://github.com/user-attachments/assets/559f8975-9cbe-4260-ba5a-409a303375ed)
2024-08-05 10:33:10 +02:00
Tymoteusz Czech
301454838b
fix: strategy edit required param error (#7747)
Fixing error "Missing required path param: featureId", on editing
default project strategy.
2024-08-03 10:03:10 +02:00
Tymoteusz Czech
ebd9c5111e
tests: flexible strategy component stickiness and groupId (#7735)
Follow-up for #7713
2024-08-02 18:52:44 +00:00
Mateusz Kwasniewski
4c55632313
chore: generate orval types (#7742) 2024-08-02 14:55:46 +02:00
Tymoteusz Czech
43c8152515
feat: Change request preview integration (#7743)
Use API to check change request evaluation
2024-08-02 14:35:48 +02:00
Thomas Heartman
993d87516d
fix: show "System" for system users, instead of "User ID n" where n is the project's number in the order. (#7734)
Fixes a bug introduced with the new tooltips where the system user was
shown as "User ID n" instead of "System". The "n" in this case is
actually the user's index number in the list of project owners
(including duplicates).

There's a few things happening: 
1. Change the object for system owners: use `name` instead of
`description`. At the same time, remove the `description` property
completely because it's not used at the moment.
2. Remove the assignnment of `id: objectId(user)` to the user sent to
the User Avatar component. This was a leftover from when we split out
the AvatarGroup component, and is not something we use anymore.

Before:

![image](https://github.com/user-attachments/assets/bd348daf-c81e-4ea9-b8a9-f10af71a0da7)

After:

![image](https://github.com/user-attachments/assets/d147f7c7-d683-43ac-9ee2-6116f155dad6)
2024-08-02 11:29:31 +00:00
Tymoteusz Czech
4b6813aa5e
Playground fields with Change request (#7724)
using `changeRequest` value from URL
2024-08-02 11:01:29 +00:00
Mateusz Kwasniewski
65131727c1
feat: add projects and environments to cr preview (#7740) 2024-08-02 12:56:29 +02:00
Thomas Heartman
ca35ca1b24
chore[demo]: update handling of strategy deletion for demo walkthrough (#7719)
This PR makes some small changes to how we handle strategy deletion in
the demo environment, which has become extra important with the recent
soft limits.

The changes are:
- lower the strategy limit from 30 to 25. The standard limit is 30, so
we want to make sure we're below that.
- when checking whether we should delete a strategy, check whether we're
**at or above** the limit. It used to only check if we were above, but
if soft limits would prevent you from adding more, then you'd never be
able to go above the limit.
- Also delete strategies for step3.
2024-08-02 11:13:42 +02:00
Tymoteusz Czech
a676b1bc20
fix: strategy parameters UI (#7713)
Old versions of Unleash allow for creating "Gradual Rollout" strategies
without `groupId` or `stickiness`. UI will now populate those fields,
not getting stuck when editing strategies without said fields.
2024-08-02 11:11:58 +02:00
Thomas Heartman
2d0fb765f0
fix: align event log filter buttons (#7726)
Fixes an issue where the filter buttons were both too far down and too
far to the right.

The issue was that the wrapper body imposed a pretty substantial bit
of padding. However, the filter buttons already came with their own
bit of padding. The result of this was alignment issues.

To fix it I have:
- opened the `Filters` component up to be styled with styled components

And conditionally (when isEnterprise and the flag is on):
- set the page body to have no padding.
- added a wrapper with padding around the event search results for 

This feels a little messy to me, but I also think that because it's
still in heavy development, it might change later. I'd be happy to have
suggestions forbetter implementations.

What makes this extra tricky is that the top padding differs depending
on whether you have the filters there or not, so I couldn't find a way
to just remove that component and be done with it. I may very well have
missed somehing, though.

Before:

![image](https://github.com/user-attachments/assets/1552d1ec-2c14-450f-9ce8-8e74389f11a1)

After: 

![image](https://github.com/user-attachments/assets/d58b6fe5-437f-4488-bf01-cabfef669e2e)
2024-08-02 11:09:55 +02:00
Thomas Heartman
643cfeb5bb
chore: use EventSchema instead of IEvent (#7732)
Changes the type used by the useEventSearch hook to be `EventSchema`
from OpenAPI instead. This is more accurate with what we're actually
getting. And crucially for the event log search, it contains the
`createdByUserId` property that we need to filter out events.

It's mostly a straightforward find and replace except for one instance
where we need to do some extra fiddling. There's an inline comment
explaining that.
2024-08-02 11:05:42 +02:00
Thomas Heartman
6458d461b9
feat: add event types to filter button (#7733)
Add event types to the event log filter button.

The event types are taken from the OpenAPI definition.
2024-08-02 10:25:25 +02:00