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

3374 Commits

Author SHA1 Message Date
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