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
5cd657065f
feat: copy strategy to current environment (#7730) 2024-08-02 09:46:57 +02:00
Tymoteusz Czech
8aa812e0f5
feat: Orphaned tokens - new API tokens list icon (#7693)
Moving warning icon from "projects" column, to left icon.
2024-08-01 14:31:42 +00:00
Mateusz Kwasniewski
5668bfb7d4
feat: preview changes button (#7722) 2024-08-01 11:59:35 +02:00
Tymoteusz Czech
4aa3a64530
feat: UI for playground of change requests (#7721)
## About the changes
UI draft
2024-08-01 11:16:35 +02:00
Thomas Heartman
f1e95108d1
Wip: split out avatar group; use same tooltip for all avatars (#7681)
Extracts the Avatar Group component into a `common` component and adds a
standard tooltip to all avatars.

Relates to linear issue 1-2606

This is a suggestion / proof of concept for how we can solve it. While I
think we can merge this as is, I'd also be happy to take any discussions
on other ways to approach it etc.

## Why are these changes made together?

Because extracting the avatar group without adding the new tooltip data
made the existing tooltip misbehave (it'd show up in the top left of the
screen, not synced to the avatar in any way).

I probably could have (and still can if you think it's prudent) split it
out such that the avatar gets a standardized tooltip first (and disable
it for the group card avatars), and split out the avatars in a
follow-up. Happy to do that if you think it's better.

## What does this mean? 

It used to be that we had no consistent way of dealing with avatars and
tooltips. Some places had them, some places didn't. This change makes it
so that all avatars that we can show tooltips for will get the same
tooltip.

Previously, we had at least 4 different ways of dealing with tooltips:
- The HTML tooltip (that would be standardized with this PR) in the
project flags table

![image](https://github.com/user-attachments/assets/91098d31-a5e3-4091-9125-332fe5d106fd)
- The "title" that you'd get on your user avatar

![image](https://github.com/user-attachments/assets/39062b61-db8c-4bd5-9fa3-3ecc9bc192ee)
- The group card list tooltip

![image](https://github.com/user-attachments/assets/0d4a696a-e944-446c-8bff-4dcec02d8afb)
- And sometimes you'd get nothing at all

![image](https://github.com/user-attachments/assets/8975afaf-9ca1-4eb6-b443-9ab94b52bbd8)

with this change, we'll always show the same kind of tooltip if we can:


![image](https://github.com/user-attachments/assets/974c592c-c844-4b65-8a55-05e84d3df130)

## What goes in the tooltip? 

We use the `UserAvatar` component for a fair few different things and I
didn't want to extract separate components for all the different use
cases. Instead, I wanted to get an overview over what we use it for and
what is relevant info to show.

I found all the places we used it and tried to form an opinion. 

This tooltip will work with a user's email, name, username, and id. If
there is no user (such as for empty avatars and avatars displaying only
"+n" for remaining members), we show no tooltip.

Following the example set by the group card avatars, we'll try to use
email or username (in that order) as the main bit of text. If the user
has an email or a username and also a name, the name will be used as
secondary text.

If the user does not have an email or username, but has a name, we'll
use the name as the main text.

If the user does not have an email, a username, or a name, we'll try to
show "User ID: N" if they have an id.

If they do not have a username, a name, an email, or an ID, we bail out
and show nothing.

## Why can you disable the tooltip?

In some cases, you might want to disable the tooltip because you have
more information to feed into it. An example of that is in the project
flags table, where we want to show more information in cases where the
user is 'unknown':


![image](https://github.com/user-attachments/assets/758b4e86-e934-47e3-91ce-ce900f76bc54)


## Additional fixes

This PR also adds a few lines of CSS to fix a minor avatar layout bug.

Before:

![image](https://github.com/user-attachments/assets/0150efbf-c51a-40bb-898f-7ddd3565ce21)


After:

![image](https://github.com/user-attachments/assets/f337cf68-c572-4610-b1de-a27749325da8)
2024-08-01 10:45:24 +02:00
Thomas Heartman
7db42453b1
feat: add filter dropdowns to event log pages (#7711)
Adds placeholder filter buttons (that don't work at all) yet to the
three event logs.

Flag logs get to choose to and from dates, created by, and event type.

Project logs get all that flag logs get + a filter for flag.

The global log gets all project log filters + a project filter.

There's still work to be done to add data to createdBy, eventType, to
hook it up to the API, and to finalize the layout, but I wanted to get a
rough outline in to iterate on later. The eventType icon will also need
to be decided on.


![image](https://github.com/user-attachments/assets/06a65301-9cc5-45ed-b753-2b9235d64ea6)
2024-08-01 08:23:22 +02:00
Thomas Heartman
2822746fc1
refactor: Make event log look and act like other pages (#7704)
Updates the way the event log works. Previously, we'd use the
`displayInline` parameter to disable padding and border. However,
recent pages (including project overview etc) have moved away from
this look.

By bringing the event log into line with how those other pages look,
it'll be easier to make designs for the new filtering capability align
with other Unleash filters.

## Changes

The eventlog is used in three places. In two of them, it used to not
have a separating border. However, when we look at other screens that
have seen recent work (such as feature flags), we see that they *do*
have a separator, so bringing the event log in line seems like a
reasonable change.

Project flags list (notice the separator):

![image](https://github.com/user-attachments/assets/9b56a53d-38ef-4492-b1f8-f40ad5f3b6eb)


Here's what they look like before and after the change:

### Global event log
Before: 

![image](https://github.com/user-attachments/assets/ccf428f6-3491-4c60-a853-13c50ae771f0)

After (no change):

![image](https://github.com/user-attachments/assets/cfc74538-285c-4565-bd38-dfb5e421e966)


### Project event log

Before:

![image](https://github.com/user-attachments/assets/80ef1a36-3b13-4e76-8d59-534d63f0e6bd)


After:

![image](https://github.com/user-attachments/assets/7380518c-f6dc-4d4f-b085-48ed3761bb20)


### Flag event log

Before:

![image](https://github.com/user-attachments/assets/345a5d72-d358-49fd-967c-f6cb0706a4f6)


After:

![image](https://github.com/user-attachments/assets/b4e0d8e9-e79c-477e-8fc4-181c366207fc)
2024-07-31 09:46:47 +02:00
Jaanus Sellin
24e2c4030b
feat: new event search flag (#7699)
Add `newEventSearch` flag
2024-07-31 08:59:42 +02:00
Tymoteusz Czech
b585ead6df
fix: avoid react key warnings in tables (#7694)
Refactoring to get rid of `A props object containing a "key" prop is being spread into JSX` warning
2024-07-30 13:09:12 +02:00
Thomas Heartman
08aba91832
fix: flex layout used the wrong axes for layout. (#7696)
This change fixes an issue where the flex layouts for collaborator
info used the wrong axes for layout (row instead of column and vice
versa), causing the component to look wonky.

Before:

![image](https://github.com/user-attachments/assets/695a9f67-ef07-4b3c-936f-69b2f2d62a28)

After:

![image](https://github.com/user-attachments/assets/a0a2c73a-2787-4985-807b-012bb4db94a4)
2024-07-30 09:17:02 +02:00
Thomas Heartman
344e599b09
fix: don't cut off hover-color of favorite button (#7691)
This PR fixes a minor visual issue where the "favorite project" button's
hover outline would get cut off due to its container having `overflow:
hidden`.

The overflow value was introduced in
[#7575](https://github.com/Unleash/unleash/pull/7575) as way to handle
long project names. We didn't discover the hover issue back then because
it's not apparent unless you hover the fav star.

I found the solution in the CSS-tricks post [Preventing a Grid
Blowout](https://css-tricks.com/preventing-a-grid-blowout/). To quote
the article, the reason this works is that:

> the minimum width of a grid column is auto. (The same is true for flex
items, by the way.)
>
> And since auto is entirely based on content, we can say it is
“indefinitely” sized, its dimensions flex. If we were to put an explicit
width on the column, like 50% or 400px, then we would say it is
“definitely” sized.
>
> To apply our fix, we need to make sure that there is the column has a
definite minimum width instead of auto.

Before:

![image](https://github.com/user-attachments/assets/d9296afd-326e-4712-a389-f1bc3a1f821e)


After:

![image](https://github.com/user-attachments/assets/2fd88a51-08be-4bc4-8969-cd6ebbaf255c)

Additionally, I've removed a duplicate declaration of font size,
removing the deprecated version.
2024-07-29 17:03:47 +02:00
Mateusz Kwasniewski
21ab80b753
feat: health stats insights explanation (#7690) 2024-07-29 15:19:20 +02:00
Thomas Heartman
0fe0079053
fix: use nested flexboxes instead of grid area (#7654)
This change removes the use of grid area from the collaborators
component, replacing it with a nested flexbox setup.
2024-07-29 12:55:52 +02:00
Tymoteusz Czech
d825b49f43
fix: health stats number (#7688)
Prevent showing "undefined%" in new Health statistics.
2024-07-29 12:49:03 +02:00
Tymoteusz Czech
5c4bc6f7a0
fix: FeatureForm - not jsx comment (#7689) 2024-07-29 11:32:14 +01:00
Mateusz Kwasniewski
94588c12d4
feat: human readable project names in insight charts (#7686) 2024-07-29 11:52:14 +02:00
Thomas Heartman
1cd1f982ee
fix: allow editors to submit flag form (#7687)
This change is a follow-up to
https://github.com/Unleash/unleash/pull/7685 and fixes another
instance of the same issue.

It wasn't caught previously, because the permissions are passed as
props here, and not used directly.


![image](https://github.com/user-attachments/assets/e8c4cb90-92e3-42ca-9c15-458b5b9d37c2)
2024-07-29 09:45:52 +00:00
Thomas Heartman
80cff0a5fa
fix: allow editors to create flags again (#7685)
This change fixes a bug where editors were suddenly unable to create
flags. The issue is that the new project creation dialog used a
permission button, but didn't supply the project ID.
2024-07-29 09:24:32 +00:00
Thomas Heartman
f24f8a896c
fix: break long project/flag names in the event log to prevent overflow (#7684)
This change sets the `overflow-wrap` property for the definition list
values in the event log. This is to prevent long project/flag names
from making the left-hand side of the card suuuper wide, causing
overflow of the whole container.

Before: 

![image](https://github.com/user-attachments/assets/4f813d71-731d-4bb8-86b0-89ff235b2244)

After:

![image](https://github.com/user-attachments/assets/6739d3f0-552b-47c7-8dca-4235a737367e)
2024-07-29 08:54:43 +00:00
Thomas Heartman
a42970a153
fix: Avoid weird spacing between title and collab mode icon (#7683)
This change fixes an issue where the title of the project would be
pushed all the way to the right when the project was set to "private".

The cause was that the container with the project mode and the title
was a flex box with `justifyContent` set to `space-between`.

Removing that line fixes the issue, and the contents align to the
start of the box. There are no other elements in that container, so it
does not affect anything else.

Before:

![image](https://github.com/user-attachments/assets/e8024e3f-8c68-4ed8-b135-ae49f24664b4)


After:

![image](https://github.com/user-attachments/assets/c5039e59-4ea4-49bb-b391-89864e7520d0)
2024-07-29 08:18:52 +00:00
Thomas Heartman
3a3aaad37d
feat: Use a toggling button for impression data on/off (#7682)
Instead of using a dropdown list for impression data, this PR introduces
a new config button that is a switch type button. It will be filled
(contained) when impression data is on and will be outlined when
impression data is off.

Off:

![image](https://github.com/user-attachments/assets/4710c8aa-a853-43c3-bf3b-86dbbf1a2779)


On:

![image](https://github.com/user-attachments/assets/08316155-83d1-45a2-941f-1c49c254a02b)
2024-07-29 08:05:35 +00:00
Jaanus Sellin
4df8fd3810
feat: redirect to new feature flag creation (#7679)
Currently found only one instance that is using `create-toggle`. So
changed behaviour for that.
2024-07-26 14:27:02 +03:00
Thomas Heartman
9b2c0bf55b
fix: shorten max project name width in feature toggles creation form (#7678)
This change sets the max project name label width to 20ch instead of
30ch.

At 30ch, the button is wide enough that it causes the buttons always
to overflow. At 20, it's about as wide as the impression data button,
and it renders on one line.


Before:

![image](https://github.com/user-attachments/assets/8d28a948-dfa1-4f75-bc8d-473ceb322631)

After:

![image](https://github.com/user-attachments/assets/c73ccc58-13ab-4b33-a82e-275130494c3d)
2024-07-26 12:08:58 +02:00
Thomas Heartman
39cda30dab
chore: update description/docs for the new feature creation dialog fields (#7677)
This PR updates the text used to describe the different fields used in
the new creation dialog.

It also removes a redundant aria attribute (that MUI already handles).
2024-07-26 09:57:22 +00:00
Thomas Heartman
c7bb6c5179
fix: prevent long project names from blowing out the form (#7673)
This change prevents long project names from blowing the form out of
proportion.

To do so, it:
1. sets `whitespace: no-wrap` on the button labels. Judging by the other
styles, this was the intention all along, but it didn't really come up
until now.

2. It also sets the label width for projects to 30ch,so that you'll get
to see quite a bit of the project name before it gets cut off.

It would be possible to set a dynamic width for this button based on the
longest project name, but I'm not sure it adds much value, so I'm
leaning towards keeping it simple.

Here's what the dynamic width would look like:

``` tsx
    const projectButtonLabelWidth = useMemo(() => {
        const longestProjectName = projects.reduce(
            (prev: number, type: { name: string }) =>
                prev >= type.name.length ? prev : type.name.length,
            0,
        );
        return `${Math.min(longestProjectName, 30)}ch`;
    }, [projects]);
```

What it looks like:

![image](https://github.com/user-attachments/assets/51bca3f6-aeb3-4a41-b57e-5ebd9baa3ef6)
2024-07-26 11:39:43 +02:00
Thomas Heartman
c0d7be040d
fix: make config dropdown list generic over values (#7676)
This PR makes the config dropdown list generic over its values, so that
you can pass stuff that isn't strings.

It also updates the existing impression data button to use booleans
instead.
2024-07-26 11:38:29 +02:00
Jaanus Sellin
b55d6f46d0
feat: add tags selection to feature creation (#7674)
![image](https://github.com/user-attachments/assets/539bd2a0-d036-4a8d-9752-fd60c7e4bf24)
2024-07-26 12:13:56 +03:00
Thomas Heartman
6e34ae4ada
fix: project icon sizing and color (#7672)
This PR fixes the project icon sizing and color in the create feature
form. However, it includes a little more cleanup work.

1. I've switched out the previous project icon with a new one. The
difference? The old one had lots of whitespace around it, which made
sizing it awkward.
2. I've added a wrapping Icon component to common. The idea was taken
from this thread on the MUI GitHub about how to make imported icons
behave consistently with MUI icons.
3. Because I've switched the icon and added a new component, I've also
gone and updated the other places we used the old icon, so that we're
consistent about the usage.

In create dialog form:

![image](https://github.com/user-attachments/assets/9b5caed7-cd50-437b-82bb-1d7ccbfaac3f)

Updated icon in:
Project card component

![image](https://github.com/user-attachments/assets/4ce809f4-4083-4554-ac4c-3597d9bf42df)


Project creation form

![image](https://github.com/user-attachments/assets/4227416f-a56d-41ed-96a4-99b71a11dbf7)


Sidebar and command bar (it's actually larger here, but maybe that's
okay? Previous project was kinda small):

![image](https://github.com/user-attachments/assets/72b8aa2e-6970-4c11-9a4d-250648b44ad9)

(Previous sidebar and command bar):

![image](https://github.com/user-attachments/assets/bcef9208-9819-4742-87a1-3a20d50d741c)


I'd be willing to leave the sidebar and command bar for now if we think
it's better to leave them using the same size as previously, but we can
talk about that. I think it's better in the sidebar; undecided about the
command bar.

Bonus changes: I fixed some typos
2024-07-26 10:26:16 +02:00
Thomas Heartman
d96da453a4
fix: show the selected project's name on the button, not its ID (#7671)
This change makes it so that we show the name of the project that is
selected on the selection button instead of the ID. There is a chance
that the name is not unique, but I'm willing to take that risk (plus
it's how we do it today).

I've used a useMemo for this, because we have to scan through a list
to find the right project. Sure, it's always a small list (less than
500 items, I should think), but still nice to avoid doing it every
render. Happy to remove it if you think it obfuscates something.

We *could* also use a `useState` hook and initialize it with the right
value, update when it changes, but I actually think this is a better
option (requires less code and less "remember to update this when that
changes").
2024-07-26 09:27:25 +02:00
Thomas Heartman
464568dace
fix: Hide project selection option in CreateFeatureDialog when OSS (#7669)
This change wraps the project selection option in the
CreateFeatureDialog in a conditional that hides it when Unleash is
OSS.

OSS doesn't have access to the project creation API, so there's no
point in showing this.
2024-07-25 17:59:47 +02:00
Thomas Heartman
2c41cbbd3c
fix: validate project names on blur (#7668)
This fix validates the project name when you blur the field in the new
project form. The only instances where it'll be wrong is if you have
just whitespace or an empty string, but you'll be notified immediately.

Also removes some unused variables and parameters that I found.
2024-07-25 12:43:38 +00:00
Thomas Heartman
dc37503b7d
fix: Capitalize input labels (#7667)
This change makes it so that all form input labels start with a
capital letter, regardless of the data we use to generate them.

Also fixes a leftover toggle -> flag renaming.
2024-07-25 12:27:46 +00:00
Jaanus Sellin
10489c7534
feat: added PoC for the new feature creation dialog (#7666)
![image](https://github.com/user-attachments/assets/82412746-34b3-48f2-95b1-1cdfdeb1ea72)
2024-07-25 15:12:48 +03:00
Thomas Heartman
eb7208025f
chore: create shared dialog form template (#7663)
This PR extracts the dialog form that we created for the new project
form into a shared component in the `common` folder.

Most of the code has been lifted and shifted, but there's been some
minor adjustments along the way. The main file is
`frontend/src/component/common/DialogFormTemplate/DialogFormTemplate.tsx`.
Everything else is just cleanup.
2024-07-25 13:41:09 +02:00
Tymoteusz Czech
369518cd7d
Feat: webhook markdown (#7658)
Add ability to format format event as Markdown in generic webhooks,
similar to Datadog integration.
Closes https://github.com/Unleash/unleash/issues/7646

Co-authored-by: Nuno Góis <github@nunogois.com>
2024-07-25 09:45:20 +00:00
Thomas Heartman
245c3e119d
chore: add flag configuration for the new flag creation flow (#7662)
Add a new flag and default it to true for local development.
2024-07-25 11:12:58 +02:00
Nuno Góis
d8c5466099
chore: show latest integration event on card (#7656)
https://linear.app/unleash/issue/2-2443/show-the-latest-integration-event-result-on-that-integrations-card

Shows the latest event on the integration card.

Also renames one of the folders to make its contents clearer.

<img width="1184" alt="image"
src="https://github.com/user-attachments/assets/2465d68b-d580-4fc9-9376-c6d55d0f19e0">
2024-07-24 14:23:29 +01:00
Nuno Góis
8a20ae999f
chore: keep latest integration events for each integration configuration (#7652)
https://linear.app/unleash/issue/2-2469/keep-the-latest-event-for-each-integration-configuration

This makes it so we keep the latest event for each integration
configuration, along with the previous logic of keeping the latest 100
events of the last 2 hours.

This should be a cheap nice-to-have, since now we can always know what
the latest integration event looked like for each integration
configuration. This will tie-in nicely with the next task of making the
latest integration event state visible in the integration card.

Also improved the clarity of the auto-deletion explanation in the modal.
2024-07-24 13:52:57 +01:00
Jaanus Sellin
3f76882465
fix: recently visit should only use main paths (#7655)
Recently visited should only be main paths, so look like this
**/segments** **/projects** and not have multiple slashes inside.
2024-07-24 15:04:33 +03:00
Jaanus Sellin
647ba7b9cb
feat: separate command bar and search hotkeys (#7651)
Currently, the command bar and search hotkeys are conflicting. I am now
separating them and assigning search an extra modifier key: Shift.
2024-07-24 12:46:03 +03:00
Thomas Heartman
e2b90ae91d
fix: add workaround for tooltip (#7649)
This PR adds the UI part of feature flag collaborators. Collaborators are hidden on windows smaller than size XL because we're not sure how to deal with them in those cases yet.
2024-07-24 09:33:29 +00:00
Nuno Góis
e63503e832
chore: add integration events modal (#7648)
https://linear.app/unleash/issue/2-2441/create-integration-events-modal

Adds the integration events modal to the UI, allowing us to visualize
them. This is the core of the UI work for this feature.

<img width="587" alt="image"
src="https://github.com/user-attachments/assets/f64cbb8c-1c01-4638-a661-5943ad7a890c">

### Example: Success

<img width="1277" alt="image"
src="https://github.com/user-attachments/assets/578bc7dc-d37d-4c0a-b74a-4bd33e859b51">

### Example: Success with errors

<img width="1255" alt="image"
src="https://github.com/user-attachments/assets/f784104d-7f11-4146-829d-6b3a3808815b">

### Example: Failed

<img width="1254" alt="image"
src="https://github.com/user-attachments/assets/543f857d-3877-4c17-92eb-58e6f038b8ac">
2024-07-24 08:14:16 +01:00
Nuno Góis
cf4435ca2d
chore: integration events hook (#7641)
https://linear.app/unleash/issue/2-2440/create-new-integration-event-hooks

Adds a frontend hook for integration events, allowing us to easily fetch
paginated integration events for a specific integration configuration
id.
2024-07-23 10:27:40 +01:00
Nuno Góis
3acaaf6719
fix: check for admin in signal endpoints hook (#7642)
This avoids a 403 on `api/admin/signal-endpoints` for non-admins when
browsing the integrations page.
2024-07-22 15:32:35 +01:00
Thomas Heartman
0f0a680af3
chore: don't ask OSS users to reach out to CS (#7633)
The limit card says to contact cs@getunleash if you're at the limits,
but we probably don't want to show that to OSS customers (it's not
terrible, just not very helpful), so let's hide it for OSS.

Instead, we'll ask them to try the community slack.

Screenie:


![image](https://github.com/user-attachments/assets/5a5dc292-3878-4181-98ac-f1ce4583d8a3)
2024-07-22 11:03:10 +02:00
Mateusz Kwasniewski
a0ba44d9f4
chore: feature collaborators flag (#7623) 2024-07-19 10:11:39 +02:00
Tymoteusz Czech
242f59ba4e
New health stats component (#7620)
New style for widget
2024-07-18 15:48:47 +02:00
Mateusz Kwasniewski
d1959dd0e2
feat: filter project flags by state (#7618) 2024-07-18 14:52:27 +02:00
Thomas Heartman
41203340fd
fix: use a fullscreen loader for the initial redirect load (#7619)
This PR fixes a minor visual glitch where the initial Unleash load might
display a jumping loading icon. The reason was that the initial
redirect's loader wasn't marked as a fullscreen loader.
2024-07-18 14:50:59 +02:00
Tymoteusz Czech
19121f234e
Insights layout (#7610)
Refactored insights page - stats and charts relevant to the same metric
are now combined into a single widget.
2024-07-18 12:43:52 +02:00
Thomas Heartman
906edec1b6
feat: show info on healthy flags in health tooltip (#7611)
This PR updates the tooltips for the health chart to also include
information on how healthy flags there are. The user could make this
calculation themselves before, but it'd require them to subtract the sum
of stale and potentially stale flags from the total. This makes it so
that they don't have to do the calculation.

I've also included a bar for the healthy flags in the overview, so that
it's easier to see how large a portion it is compared to the others.

Also: clean up some uses of the now-deprecated VFC.


![image](https://github.com/user-attachments/assets/fa33b5ec-b5aa-472d-8ee3-329c5ed0d0c6)
2024-07-18 10:24:58 +02:00
Mateusz Kwasniewski
06f5073fce
test: insights filtering (#7612) 2024-07-17 15:03:02 +02:00
Christopher Kolstad
d397819fd3
feat: Make SAML dialog aware that it might be configured via env (#7606)
Same as the OIDC changes we merged yesterday, this makes the frontend
ready for disabling SAML configuration page, if the SAML_ environment
variables are set.

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2024-07-17 10:57:34 +00:00
Tymoteusz Czech
6e4e58aee8
fix: insights sticky header (#7607)
Insights header should show below banners in insights v2
2024-07-17 10:02:55 +00:00
Mateusz Kwasniewski
39f6cbd66c
feat: insights filters (#7608) 2024-07-17 11:30:58 +02:00
Mateusz Kwasniewski
d2ef9e27ed
refactor: insights actions container relaxed width (#7603) 2024-07-16 17:27:11 +02:00
Thomas Heartman
cfd20703b2
fix: toast error doesn't tell you what the error is (#7601)
This change improves the toast error message for auth settings by
preferring the message from the error's details list if it exists. If
it doesn't it'll still fall back to the original error message.

Before:

![image](https://github.com/user-attachments/assets/6ecb425c-7d6d-4cb9-844e-c7c2ff7088b2)

After:

![image](https://github.com/user-attachments/assets/87d827a8-7f52-40c1-a2c6-ca2d1d3abfb4)
2024-07-16 15:10:44 +02:00
Mateusz Kwasniewski
248f879553
chore: remove share insights button (#7600) 2024-07-16 15:10:34 +02:00
Tymoteusz Czech
7b2532ea4f
New insights layout - feature flag (#7598)
Preparing insights component for refactoring and enhancements.
2024-07-16 12:24:30 +00:00
Christopher Kolstad
7ed1d770a8
feat: make frontend aware that OIDC can be configured through env (#7597)
Co-authored-by: Nuno Góis <github@nunogois.com>
2024-07-16 13:53:30 +02:00
Thomas Heartman
e43109a2cb
fix: prevent long names from breaking form layouts (#7591)
This PR fixes a couple instances where long resource names would break
form and input layouts.

I've added comments to the various files to explain what they're doing
and why.

## Discussion point:

I've now set the width of project selector to be as narrow as it can
with wrapped text. In the main interfaces, it's much better, but on the
page where you can move a flag, it is quite narrow. However, I still
think it's better (no chance of it being wider than the whole screen).
We might want to find another way, but regardless, it'll only show up
with real edge cases.

## Fixes (screenies)

### API token creation form

**Files**:
- `frontend/src/component/common/FormTemplate/FormTemplate.styles.ts`
- `frontend/src/component/common/FormTemplate/FormTemplate.tsx`

Before:

![image](https://github.com/user-attachments/assets/cef31208-2cce-479e-902e-ed7d3c3c9571)

After:

![image](https://github.com/user-attachments/assets/b0832193-11f5-427d-9df1-d9baca0a91e7)


### New feature flag form

**Files**:
- `frontend/src/component/common/GeneralSelect/GeneralSelect.tsx`

Before:

![image](https://github.com/user-attachments/assets/2ac6f791-af19-4f7e-a8ea-2fc356f18fb2)

After:

![image](https://github.com/user-attachments/assets/13b91812-c00a-49e8-9409-67fab4eaaf01)

### Project select popover

**Files**

- `frontend/src/component/common/GeneralSelect/GeneralSelect.tsx`
-
`frontend/src/component/feature/FeatureView/FeatureSettings/FeatureSettingsProject/FeatureProjectSelect/FeatureProjectSelect.tsx`

Before:

![image](https://github.com/user-attachments/assets/e81a4cef-1402-4b9c-b1a8-c22493c794bd)

After:

![image](https://github.com/user-attachments/assets/604dada9-6555-48e3-a81d-dda72bd9ccf0)

But also:

![image](https://github.com/user-attachments/assets/7e935fe5-b7f0-4674-8d94-a8c8a6176a3c)
2024-07-16 10:47:46 +02:00
Jaanus Sellin
7d88b901a3
feat: remove first item selection (#7596) 2024-07-16 11:27:37 +03:00
Jaanus Sellin
0a4ef3b49f
feat: select first item after query (#7592)
Now after search is done, the first item will be selected
2024-07-16 09:28:34 +03:00
Jaanus Sellin
aaf66022af
feat: show all results in the same time (#7590)
Previously, when the result box was loading, it returned projects and
menu items first. After the feature search response came back, it also
showed the features, but this made the component jump around too much.
Now, everything is shown when the feature result comes back, reducing
the jumping around.
2024-07-15 16:37:11 +03:00
Thomas Heartman
d32990ec4c
fix: make loader not exlpode to 100vh in unnecessary locations (#7589)
This change fixes an issue with the loader where it would explode its
parent component to 100vh even when that was not called for.

To do so, I've added the a new `type` prop to the component, to
distinguish between `fullscreen` and `inline` usage. The `fullscreen`
type sets the height to 100vh, while the `inline` type sets it to
100%.

Now, this doesn't directly make the loader fullscreen (it just makes
sure it's at least as tall as the screen), so maybe the prop name is
misleading. I'd be happy to change it (or to even extract this into
two separate components) if that's preferable. Other potential prop
names could be `height`, which is very direct, or `usage`, which I
think better describes what we do. Like with `type`, I'd like to
communicate the intended behavior more that the actual implementation,
so I'm leaning towards either `type` or `usage`.

## Screenies

I've gone through all the usages of the loader, and checked how each one
works. Here they are:

### Loader in environment variants

I wasn't able to trigger this manually, but it's apparently there

Old (ignore the banner placement; that's firefox's screenshot tool
acting up)

![image](https://github.com/user-attachments/assets/f5d0a709-6815-4838-9ad4-c8f79a54ad0e)

New:

![image](https://github.com/user-attachments/assets/c7538146-b8af-4253-89ed-55d1eb37d6a5)

### Project setting forms

Old:

![image](https://github.com/user-attachments/assets/f8b55899-4483-470a-8d3a-3d11761ec8c7)

New:

![image](https://github.com/user-attachments/assets/29157004-6662-494b-9939-2f34977a9c63)

### Rollout strategy

Old:

![image](https://github.com/user-attachments/assets/5c699a06-37bd-4b3b-a3e3-f613ca7c88d5)

New (no discernible change):

![image](https://github.com/user-attachments/assets/f52178fe-9d26-4ebb-bd48-8a1c4a7e2f04)

### Advanced playground

Old:

![image](https://github.com/user-attachments/assets/43f7183b-cefc-4e29-961e-5d7e18d29be9)

New:

![image](https://github.com/user-attachments/assets/082d94dc-36e0-483c-b7a9-bd75e727c0d5)

### Loading screen / initial redirect

Old:

![image](https://github.com/user-attachments/assets/dbb8b1af-d585-4d48-8431-5379afd4f653)

New (no new component props):

![image](https://github.com/user-attachments/assets/842e766f-0ea7-4396-9696-b88509e24d77)

New (with new props):

![image](https://github.com/user-attachments/assets/e6ffd303-f24e-478d-88d9-b4fa57f307e4)
2024-07-15 14:41:45 +02:00
Mateusz Kwasniewski
3ade609956
feat: user seats component (#7583) 2024-07-12 15:39:37 +02:00
Thomas Heartman
9d7eec5951
fix: update cache, even when the total is 0 (#7582)
This PR fixes a bug where we wouldn't update the `useFeatureSearch`
hook's cached `total` value if the new total was `0`. The reason this
failed is that we would only update it if `data?.total`. Because `0` is
a falsy value, the check would fail.
2024-07-12 14:47:50 +02:00
Tymoteusz Czech
e7627becec
feat: API Tokens limit - UI (#7561)
When approaching limit or limit reached for the number of API tokens, we
show a corresponding message.
2024-07-12 14:44:46 +02:00
Thomas Heartman
f0b49db06a
docs: document resource limits (#7567)
This PR adds the first version of the resource limit documentation. It
also corrects the link in the `Limit` component.

In addition to the new limits from the soft limits project, I've also
added the limits from the signals project.

## Discussion points

I've set the Pro resource limits to projects and envs to the same value
as on the [plans & pricing](https://www.getunleash.io/pricing) page
instead of the actual hard soft limit. I think that makes messaging
easier and more consistent.

However, this does present us with a bit of a problem. Because we've
been pretty consistent at saying "no, you can't have more projects" for
Pro. But we're saying it's easy to change (when in actuality the limit
isn't enforced 💁🏼 )

## Screenie

It looks a little bit like this (but check the files or preview for the
actual text content)

![image](https://github.com/Unleash/unleash/assets/17786332/56cadc00-5a8e-4820-8b11-d059112934da)
2024-07-11 14:10:49 +02:00
Tymoteusz Czech
d440d3230a
feat: show orphaned API tokens (#7569)
Add a visual indication that a token was scoped to projects that have
been deleted.
2024-07-11 14:06:22 +02:00
Thomas Heartman
d7adee3f64
chore: fix project name overflow (#7575)
Fix overflow in long project names. Show ellipsis where it overflows.


![image](https://github.com/Unleash/unleash/assets/17786332/4723134b-b667-47ab-83e8-02cb3cda9093)


![image](https://github.com/Unleash/unleash/assets/17786332/7f4f0b5b-bc03-460d-8ba1-e0cda51e9a5c)


![image](https://github.com/Unleash/unleash/assets/17786332/8b6528f0-2ed8-4a26-9d22-42fa356583c8)
2024-07-11 10:00:38 +02:00
Christopher Kolstad
f65afff6c1
feat: Disallow repeating last 5 passwords. (#7552)
We'll store hashes for the last 5 passwords, fetch them all for the user
wanting to change their password, and make sure the password does not
verify against any of the 5 stored hashes.

Includes some password-related UI/UX improvements and refactors. Also
some fixes related to reset password rate limiting (instead of an
unhandled exception), and token expiration on error.

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2024-07-09 16:18:35 +02:00
Tymoteusz Czech
f6c05eb877
API tokens - virtualized table (#7531)
API tokens table in both main list and project API tokens list can now
support more items - it doesn't slow the browser down if there is >500
items.
2024-07-09 13:22:55 +02:00
Mateusz Kwasniewski
2aea6e688c
feat: project limits ui (#7558) 2024-07-09 11:04:23 +02:00
Mateusz Kwasniewski
46b1eedcc7
feat: constraints values limit in a strategy UI (#7557) 2024-07-08 15:08:16 +02:00
Thomas Heartman
8f8ff13cc5
feat: add limit warning for feature flags (#7556)
This PR adds the Limit component to the feature flag creation form.

At the limit: 

![image](https://github.com/Unleash/unleash/assets/17786332/86f17565-5c75-4265-8e3b-5200222345ec)

Approaching the limit:

![image](https://github.com/Unleash/unleash/assets/17786332/af041d78-fcd3-4aa6-b415-9738cbfbae1b)

Below the limit threshold (no change):

![image](https://github.com/Unleash/unleash/assets/17786332/79ddc3ee-6e52-44d3-8d0b-0ebae90707a7)
2024-07-08 15:06:21 +02:00
Mateusz Kwasniewski
5ed4ccc981
feat: constraints limit in a strategy UI (#7555) 2024-07-08 13:10:00 +02:00
Thomas Heartman
ef80d7f81e
ui limits for flags (#7541)
This PR disables the "create feature flag" button when you've reached
the limits.

This one is a little more complex than the other UI limits, because we
also have to take into account the project feature limit. I've tried to
touch as little as possible, but I _have_ extracted the calculation of
both limits into a single hook.
2024-07-08 10:27:01 +02:00
Mateusz Kwasniewski
e7d07486a1
feat: limit segments component (#7553) 2024-07-08 09:03:08 +02:00
Alexandru Savin
9fae7801ed
feat: New Relic integration (#7492)
## About the changes
Add New Relic integration based on issue #878.


![image](https://github.com/Unleash/unleash/assets/1612455/05523b73-398b-413d-b760-26bf2feec2db)


![image](https://github.com/Unleash/unleash/assets/1612455/1ec01f52-0c1a-46a7-aa5b-5ca80004dcf8)


<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

<!-- Does it close an issue? Multiple? -->
Closes #878
2024-07-05 15:16:00 +02:00
David Leek
9ad7266aa1
chore: use a command bar shadow thats visible in darkmode as well (#7551) 2024-07-05 14:54:11 +02:00
Thomas Heartman
94926b7802
chore: don't prevent users from entering the env form when they're at the limit (#7549)
This change reverts the changes related to the button in particular
that were introduced in #7500. The button is now always enabled, and
the actual resource warning and creation blocking happens in the form,
courtesy of #7548.
2024-07-05 13:11:00 +02:00
Tymoteusz Czech
1d7cd2e274
feat: update description on project deletion (#7539)
Improving the project deletion experience by adding information about
API keys and refining the messaging, making it easier to comprehend.
2024-07-05 11:07:47 +00:00
Mateusz Kwasniewski
963d051632
feat: Limit environments component (#7548) 2024-07-05 13:03:51 +02:00
Jaanus Sellin
c802442846
feat: add solid border for contrast (#7550)
Now it is better to see the command bar.


![image](https://github.com/Unleash/unleash/assets/964450/a59bdabd-5a14-45a5-b8ca-594b62853c59)
2024-07-05 14:01:10 +03:00
David Leek
2f9483441f
feat: command bar up down navigation (#7546) 2024-07-05 12:57:43 +02:00
Jaanus Sellin
165f02a3a4
fix: sidebar update active when navigated via command menu. (#7545)
Currently, if the location changes, it does not update the active item.
I added useEffect to update the active item.

This is required when the user navigates via the command menu.
2024-07-05 13:28:00 +03:00
David Leek
51a2b3aa0e
feat: hide command bar when losing focus (#7544) 2024-07-05 11:22:46 +02:00
Mateusz Kwasniewski
cad8a3c2df
feat: limit component used in strategies (#7542) 2024-07-05 09:09:28 +02:00
David Leek
233bf0757e
chore: fix command bar key prop usage (#7534) 2024-07-05 08:24:51 +02:00
David Leek
96a1996b41
chore: command bar remove strategy types as page suggestion (#7543) 2024-07-04 15:51:37 +02:00
Mateusz Kwasniewski
c93bfafb7f
feat: limit component (#7538) 2024-07-04 09:49:31 +02:00
Jaanus Sellin
8dd77f3bbd
fix: remove focus on ESC (#7535)
Now when pressing ESC, command bar will lose focus.


![image](https://github.com/Unleash/unleash/assets/964450/9aea3b2b-bf06-4910-96be-0a67472945af)
2024-07-03 22:15:59 +03:00
Gastón Fournier
bf2df49bd6
feat: change billing plan get in touch to support email (#7523) 2024-07-03 16:58:04 +02:00
Thomas Heartman
c5fdaeabd9
feat: UI limit for API tokens (#7532)
This PR activates the limit for API token creation in both the global
API token window and in the project-level API token tab.

Because the same button is used in two places, I encapsulated the
fetching of flags and resource limits within the button. I can be
convinced to pass the current API token count and the limit as
arguments, but I think this is the right solution for this case.
2024-07-03 12:36:48 +00:00
Jaanus Sellin
990ea1ffb2
feat: quick suggestions click close (#7533)
Now recently visited projects, features, pages will also close the
command bar.
2024-07-03 14:41:23 +03:00
Jaanus Sellin
fc95d459d0
feat: use different cache key for command bar (#7530)
Now command bar and search do not share same cache, so they wont
conflict anymore.
2024-07-03 14:28:47 +03:00
Mateusz Kwasniewski
d924519abb
feat: segments limit ui (#7528) 2024-07-03 12:34:16 +02:00
Jaanus Sellin
57c1a6edd5
feat: track interaction with search (#7526)
Now we will start tracking how users interact with search box. Whether
they open it manually or use CTRL K
2024-07-03 12:27:20 +03:00
Gastón Fournier
5832fc7d81
feat: what's new in Unleash (#7497)
https://linear.app/unleash/issue/2-2354/new-in-unleash-section-in-sidebar

Add a "New in Unleash" section in the side bar and use it to announce
signals and actions.


![image](https://github.com/Unleash/unleash/assets/14320932/b2b5b65a-1812-4fc9-addf-c47c3cc90af3)

Inside signals page we're also including a feedback button to try to
collect some insights.


![image](https://github.com/Unleash/unleash/assets/14320932/a2edb355-55e8-4939-b29d-2ba4e1f68001)

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2024-07-03 09:54:38 +02:00
David Leek
06971375cb
chore: fix command bar missing icons in quick suggestions (#7522) 2024-07-03 09:41:12 +02:00
David Leek
a463e8b1e6
chore: command bar feedback focus and text size (#7521) 2024-07-03 09:33:28 +02:00
Mateusz Kwasniewski
e9b643761c
feat: Project limit UI (#7518) 2024-07-02 15:29:58 +02:00
David Leek
0a2f7e5a61
chore: fix searchbar styling when focus is on results (#7517) 2024-07-02 13:15:57 +02:00
Jaanus Sellin
f42e74e7c5
chore: rename command bar files (#7516)
Now we have nice logical naming


![image](https://github.com/Unleash/unleash/assets/964450/c24041bc-db94-463e-aa9c-d7ecd484ab12)
2024-07-02 13:59:18 +03:00
Jaanus Sellin
1f48f9067a
fix: command menu hover (#7515)
Now command menu hover has same styling as sidebar


![image](https://github.com/Unleash/unleash/assets/964450/22dd869f-0256-4922-b56a-826f1f37ff45)
2024-07-02 13:34:40 +03:00
Tymoteusz Czech
e916deda74
fix: prevent project cell overflow on api keys table (#7472)
Preparations for virtualizing API tokens table - projects column for tokens with a list of projects assigned will not overflow the cell.
2024-07-02 12:10:02 +02:00
Jaanus Sellin
745c5a0454
fix: improve menu styling (#7513)
Now quick suggestions padding is not bigger than for pages. 


![image](https://github.com/Unleash/unleash/assets/964450/9708faab-67d4-4159-8af4-b203f7778f6b)
2024-07-02 12:33:37 +03:00
Jaanus Sellin
4eebf49423
feat: clear search string and close box after click (#7511)
Now when selecting an item from command menu, the search string is
cleared and command menu closed.
2024-07-02 11:12:08 +03:00
David Leek
85096ba3c6
feat: command bar results key down should exit/refocus input (#7509)
Refocuses command bar input field if command bar results has focus and
user starts to type. Closes if Escape button clicked
2024-07-02 09:56:25 +02:00
Thomas Heartman
be518af228
feat: use new environment limit in Unleash UI (#7500)
This PR updates the Unleash UI to use the new environment limit.

As it turns out, we already had an environment limit in the UI, but it
was hardcoded (luckily, its value is the same as the new default value
🥳).

In addition to the existing places this limit was used, it also disables
the "new environment" button if you've reached the limit. Because this
limit already exists, I don't think we need a flag for it. The only
change is that you can't click a button (that should be a link!) that
takes you to a page you can't do anything on.
2024-07-02 06:14:15 +00:00
Mateusz Kwasniewski
57b253c050
feat: constraint values limit UI (#7501) 2024-07-01 15:05:44 +02:00
Jaanus Sellin
c907199d23
feat: command bar feedback (#7485)
![Screenshot from 2024-07-01
13-04-57](https://github.com/Unleash/unleash/assets/964450/4d5c96a2-0cfc-47a9-9323-f7ce1b27da3d)
![Screenshot from 2024-07-01
13-05-03](https://github.com/Unleash/unleash/assets/964450/79f9c289-4c62-4a3e-b612-c88ff8ca434d)
2024-07-01 14:15:51 +03:00
Gastón Fournier
79628d3e7d
chore: change get in touch email and use biome from node_modules (#7496) 2024-07-01 12:07:07 +02:00
David Leek
20da40d38d
feat: move recording recently visited into separate component (#7494) 2024-07-01 10:35:02 +02:00
Mateusz Kwasniewski
3525928fea
feat: configurable strategies limit (#7488) 2024-07-01 10:03:26 +02:00
David Leek
bdce76e84a
chore: command bar refactor of search result items for consistent styling and icons (#7483) 2024-06-28 12:40:44 +02:00
David Leek
d01aba955a
chore: rename recent and page suggestions (#7484)
Renames and moves recently visited and page suggestions to match name
pattern
2024-06-28 13:18:27 +03:00
Mateusz Kwasniewski
5bd32f264d
feat: strategy limit to 30 (#7473) 2024-06-28 11:18:44 +02:00
Jaanus Sellin
82a53fa9b3
feat: introduce large cache for swr (#7470)
Previously, clearing the SWR cache cleared all entries. Now you can
configure the cache size.

1. This makes the search more fluid. Previously, if you went back and
forth on pages, you were always sent to the loading state.
2. This also solves the issue where the command bar search cleared the
cache for all other searches.
3. Additionally, it addresses the problem where the global search
cleared the cache for project search.
2024-06-28 10:44:35 +03:00
Mateusz Kwasniewski
b67c73a578
chore: resource limits flag (#7471) 2024-06-27 14:25:07 +02:00
Christopher Kolstad
f4e3388606
task: Yarn v4 (#7457)
Moves to Yarn v4

---------

Co-authored-by: Alvin Bryan <107407814+alvinometric@users.noreply.github.com>
2024-06-27 12:52:43 +02:00
Jaanus Sellin
82822a735b
feat: command bar track events (#7469)
Start tracking plausible events

1. Log the search keywords that returned 0 results
2. Track all clicks, based on source(search/recents/pages), type etc.
2024-06-27 12:48:57 +03:00
Tymoteusz Czech
083273b49b
fix: prevent strategy variant weight from going into negative numbers on Frontend (#7460)
Added validation if sum goes over 100%. Remaining split is never negative
2024-06-27 09:06:59 +00:00
Tymoteusz Czech
1cdbd21212
fix: strategy form buttons spacing (#7468) 2024-06-27 11:04:06 +02:00
Tymoteusz Czech
4c1d8dd423
fix: banner duplication on strategy edit with change requests (#7452)
## About the changes
Only one banner info about the outcome of strategy edit should appear
when change requests are enabled.


![image](https://github.com/Unleash/unleash/assets/2625371/72e734b4-14b2-4179-9d31-6382f4c9575d)


[issue/1-2292](https://linear.app/unleash/issue/1-2292/bug-do-not-show-feature-toggle-is-currently-enabled-banner-when-change)
2024-06-27 10:04:02 +02:00
Jaanus Sellin
e8511789fd
feat: command menu items can have description as tooltip now (#7455)
![image](https://github.com/Unleash/unleash/assets/964450/7a55a1a7-7aea-4f9c-96ac-46adf2edd36f)
2024-06-26 12:39:53 +03:00
Jaanus Sellin
b5e329e22d
feat: search only features when there is search string (#7450)
Now the search hook is inside another component, so we do not get
searches without search query.
Also we had 2 state variable handing the search query. Removed one of
them.
2024-06-25 16:17:17 +03:00
David Leek
ffe306714b
feat: tweak command bar UI styles to match sketches (#7447) 2024-06-25 14:30:39 +02:00
Jaanus Sellin
ed9d0cccbc
feat: now able to search pages (#7446)
Now can search pages
2024-06-25 15:29:36 +03:00
Mateusz Kwasniewski
7e5ce08ea8
fix: long project name display (#7435) 2024-06-25 12:22:03 +02:00
Jaanus Sellin
3961c1abf0
feat: now command bar will not search behind the scene (#7443)
Previously it was doing request to search behind to scenes, when noone
was using the nav bar. This fixes it.
2024-06-25 12:53:23 +03:00
Thomas Heartman
8ef59cd45d
chore: change "toggle updated" to "flag updated" in toast message (#7439)
This message appears to have been missed when we did the previous
migration from "toggle" to "flag".
2024-06-25 09:34:44 +02:00
Thomas Heartman
0af5bbad38
chore: remove createProjectWithEnvironmentConfig and newCreateProjectUI flags (#7429)
This PR removes the last two flags related to the project managament
improvements project, making the new project creation form GA.

In doing so, we can also delete the old project creation form (or at
least the page, the form is still in use in the project settings).
2024-06-24 12:53:55 +02:00
Nuno Góis
4736084e00
fix: check for permission in group access assignment (#7408)
Fix project role assignment for users with `ADMIN` permission, even if
they don't have the Admin root role. This happens when e.g. users
inherit the `ADMIN` permission from a group root role, but are not
Admins themselves.

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2024-06-18 17:06:34 +01:00
Thomas Heartman
1f4126e495
fix: make rendering of new project form independent of rendering the project list (#7405)
This change takes the rendering of the new project form component and
puts in a child component of the project list, thereby
significantly speeding up the time it takes to render the form if you
have lots of projects (about to 10x for 50 projects on my machine).

The reason it was so slow before was that the open state of the form
component was stored in the project list component. This meant that
whenever you wanted to open or close the form, you'd have to rerender
the entire project list.

This change abstracts that process into the new ProjectCreationButton
component. This component takes care of checking the feature flag for
whether to render the dialog or to send the user to the old form, and
takes care of state management for the dialog.

Because this is a child component of the project list, it does not
cause rerenders of the entire project list.
2024-06-18 09:36:36 +02:00
Thomas Heartman
ccc332a764
chore: delete ice cream icon 🍦 (#7403)
This was added back in may 2021
(https://github.com/Unleash/unleash-frontend/pull/285), but was never
used. Maybe it's time
to remove it.
2024-06-17 11:26:06 +02:00
Jaanus Sellin
10d2a295c7
feat: menubar is not dependant on query params anymroe (#7399)
Previously since query params were changing by global search, and
menubar was also altering them, they were conflicting. Menubar does not
need query params as state. So using search hook directly.
2024-06-14 12:26:52 +03:00
David Leek
9b789ea5ef
feat: command bar pages and name resolving (#7397) 2024-06-14 11:22:55 +02:00
Mateusz Kwasniewski
7e565760f6
fix: lifecycle button permissions (#7395) 2024-06-14 10:26:54 +02:00
Jaanus Sellin
09d9676d66
feat: command bar search projects (#7388)
Now can search for projects.
Also adding debounce to not spam backend with requests. Also the UI is
less flickery.
2024-06-13 14:47:34 +03:00
Tymoteusz Czech
582b33e121
Feat: feature view created by field - frontend (#7382)
add "Created by:" to feature overview meta and align other items
2024-06-13 13:00:57 +02:00
Mateusz Kwasniewski
1c2aa128be
fix: exclude lifecycle from stale checks (#7386) 2024-06-13 12:37:29 +02:00
David Leek
50316a2f23
feat: command bar last visited: improve project/feature icons and paths (#7383) 2024-06-13 09:43:39 +02:00
David Leek
507a2bca83
chore: add some tests for the useRecentlyVisited hook (#7380) 2024-06-13 08:38:51 +02:00
Jaanus Sellin
21088b745d
feat: search features from command bar (#7378)
Now searching works in command bar

1. Currently piggybacking on the search hook, but I think it is not fast
enough, and also it is using the query params as the global search. This
causes some weird behaviour in UI. This probably means we will create
separate endpoint for this.


![image](https://github.com/Unleash/unleash/assets/964450/a24f41ae-93d7-4ebe-a92b-c20dfe7cb666)
2024-06-12 21:24:22 +03:00
Mateusz Kwasniewski
77a5b85d6b
feat: recent project by name (#7375) 2024-06-12 13:40:05 +02:00
Gastón Fournier
a0fce0ec12
Revert "fix: yarn v4 requires prepack instead of prepare script when building…" (#7373)
Reverts Unleash/unleash#7371
2024-06-12 13:25:51 +02:00
Jaanus Sellin
ffe1305934
feat: extract global feature search (#7372)
We need global search for command menu, so extracting into separate
hook.
2024-06-12 13:32:13 +03:00
Christopher Kolstad
a971c770e9
task: Yarn v4 (#7345)
Trying again, this time with correct .gitignore already setup, and a
workflow configured to try what was failing prior to our revert.
2024-06-12 11:18:21 +02:00
Thomas Heartman
4c4d6e8aeb
chore: use new ScreenReaderOnly component in config buttons (#7352)
This PR uses the new ScreenReaderOnly component in existing code,
replacing custom code with a shared component.
2024-06-12 11:04:47 +02:00
Thomas Heartman
2191de7713
chore: disable filtering for unknown users (#7369)
This PR disables the filtering capability in the front end for unknown
users.

Modifying the back end to support filtering for unknown users is not
something we want to do yet. It's possible, but it requires adding a lot
of special cases to the handling code (refer to [PR
#7359](https://github.com/Unleash/unleash/pull/7359)), which we'd like
to avoid if possible. To avoid annoying cases where the filtering
doesn't work as expected and breaks user expectations, we're disabling
the filtering capability for unknown users in the front end.

We can consider whether to enable back-end results for unknown in the future if we get
user feedback that it's important.

This PR works by changing the avatar cell component. When the user has
id 0 (and is therefore unknown), we:
- set aria-disabled to true. This alerts users with assistive tech that
the button is disabled, but it doesn't take it out of the tab order, so
it's not mysteriously missing.
- change the tooltip text, telling users that they can't filter by
unknown users.
- disable the avatar callback function, so clicking on the avatar
doesn't do anything.

The accompanying tests assert this functionality.

I considered also updating the screen reader text, but I think that
would add more confusion or be more information than the user needs.
According to MDN's article on the [aria-disabled
attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled):

> [the aria-disabled] declaration will inform people using assistive
technologies, such as screen readers, that such elements are not meant
to be editable or otherwise operable.
2024-06-12 07:41:40 +00:00
Jaanus Sellin
7fc87e1647
feat: clean up command bar props (#7368)
A lot of things were passed in for search, but since we only have single
command bar, we do not need them and it was bloating our component.
2024-06-12 09:24:16 +03:00
Tymoteusz Czech
3c109a7577
Feat/change request comments formatting (#7360) 2024-06-11 15:49:22 +02:00
David Leek
576dd04dc5
feat: command bar poc (#7350)
Command bar PoC using clone of search

---------

Co-authored-by: sjaanus <sellinjaanus@gmail.com>
2024-06-11 15:27:59 +03:00
Thomas Heartman
cfcf13980e
chore: use HTML (custom) tooltip for permission switches (#7355)
This PR changes the environment permission switch to use the HTML
tooltip instead of the default MUI tooltip. This aligns with how we've
been doing tooltips recently.

The main driver behind this change was that the project flag table used
two different tooltips. This makes it so that they all look the same,
but it also impacts other places that use the same switch.

In feature flag table:

![image](https://github.com/Unleash/unleash/assets/17786332/4d411285-c00e-41ec-95f9-9e6855d46661)

On flag page:

![image](https://github.com/Unleash/unleash/assets/17786332/11de1daf-7d0f-4214-8dc7-10b11631ce58)

In project env table:


![image](https://github.com/Unleash/unleash/assets/17786332/cc7a3a99-e48c-4989-9a14-2d5d4035a3cb)
2024-06-11 14:03:35 +02:00
Jaanus Sellin
3acb3ad2c2
feat: upgrade from react v17 to v18 (#7265)
**Upgrade to React v18 for Unleash v6. Here's why I think it's a good
time to do it:**
- Command Bar project: We've begun work on the command bar project, and
there's a fantastic library we want to use. However, it requires React
v18 support.
- Straightforward Upgrade: I took a look at the upgrade guide
https://react.dev/blog/2022/03/08/react-18-upgrade-guide and it seems
fairly straightforward. In fact, I was able to get React v18 running
with minimal changes in just 10 minutes!
- Dropping IE Support: React v18 no longer supports Internet Explorer
(IE), which is no longer supported by Microsoft as of June 15, 2022.
Upgrading to v18 in v6 would be a good way to align with this change.

TS updates:
* FC children has to be explicit:
https://stackoverflow.com/questions/71788254/react-18-typescript-children-fc
* forcing version 18 types in resolutions:
https://sentry.io/answers/type-is-not-assignable-to-type-reactnode/

Test updates:
* fixing SWR issue that we have always had but it manifests more in new
React (https://github.com/vercel/swr/issues/2373)

---------

Co-authored-by: kwasniew <kwasniewski.mateusz@gmail.com>
2024-06-11 13:59:52 +03:00
Mateusz Kwasniewski
5225452bfd
fix: remove stale stats widget (#7353) 2024-06-11 12:39:24 +02:00
Thomas Heartman
3643016a0e
feat: filter by user when interacting with the avatar (#7347)
This PR lets you filter by flag creator by interacting with the user's
avatar.


Additionally, I've switched the custom popover for the standard tooltip
that we use elsewhere in the table. This gives the table a more cohesive
feel. As such, I have also deleted the component created in a previous
PR, because it's no longer in use anywhere.

It now looks like this (when tabbed to; notice the focus ring):


![image](https://github.com/Unleash/unleash/assets/17786332/d321d9df-0b17-49c3-bea7-89331df3f994)
2024-06-11 12:15:35 +02:00
Mateusz Kwasniewski
76c8cbad0c
feat: global search by flag type (#7346) 2024-06-11 10:14:29 +02:00
Thomas Heartman
24c0976d56
feat: add popover to users in flags list (#7344)
This PR adds a popover to the user avatars in the flag list.

The popover is similar to the one used for projects and groups, but it
differs in a few ways:
- There's less padding. There's quite a lot of padding in the other
popovers, and it felt like too much for this table.
- It only shows one bit of text (the user's name/username/email). The
other popovers show email and name/username, but we don't have all that
information, so this is a stripped down version.

Flag list popover:

![image](https://github.com/Unleash/unleash/assets/17786332/6a86f638-ba6d-48e0-87e2-078b582697cf)

Group popover:

![image](https://github.com/Unleash/unleash/assets/17786332/d5fc7172-8fcb-4fac-87c4-05f211c0938c)

or if no email

![image](https://github.com/Unleash/unleash/assets/17786332/51955ead-849f-4bfc-81aa-e1852677647c)
2024-06-11 09:40:48 +02:00
Jaanus Sellin
f0f339ead3
fix: revert yarn4 (#7334)
Reverting yarn4, because we are stuck on broker build for couple of days
now.
2024-06-10 14:35:18 +03:00
Thomas Heartman
df3ca10a6d
chore: make the User Avatar size configurable (#7332)
This change makes the width of the user avatar configurable via a new
"avatarWidth" property.

It also sets the width to be `theme.spacing(3)` (currently 24px) for the
feature flag table.

It looks like this now:

![image](https://github.com/Unleash/unleash/assets/17786332/5e12ddad-234e-4e81-9eff-303b116991bb)

It used to look like this:


![image](https://github.com/Unleash/unleash/assets/17786332/357f7a52-7765-4f38-8700-c9884b6c49f0)
2024-06-10 12:43:27 +02:00
Christopher Kolstad
57ddfc9255
fix: yarnv4 requires shebangs in shell scripts to allow execution (#7323) 2024-06-07 14:29:00 +00:00
Mateusz Kwasniewski
7df1321128
test: filter by created by/author (#7307) 2024-06-06 13:20:38 +02:00
Mateusz Kwasniewski
a91b77a7ce
feat: filter by created by (#7306) 2024-06-06 12:59:11 +02:00
Mateusz Kwasniewski
bb3498adb6
chore: orval types for flag creator (#7305) 2024-06-06 12:11:41 +02:00
Mateusz Kwasniewski
2cc4b5faab
feat: display created by user in search (#7292) 2024-06-06 11:51:54 +02:00
Christopher Kolstad
63f3212624
fix: trim sso URL fields (#7301)
What the title says. There are input values that are whitespace
sensitive, so this will trim clientId and entity field, preventing the
form from sending leading or trailing whitespace. Will make a PR on
enterprise as well to trim on the backend as well.
2024-06-06 10:01:24 +02:00
Mateusz Kwasniewski
92d7d9aafe
chore: orval search created by feature (#7290) 2024-06-05 14:40:13 +02:00
Mateusz Kwasniewski
c869ea35e4
fix: project settings table overflow (#7288) 2024-06-05 14:05:41 +02:00
Thomas Heartman
05b7f6f4d9
fix: involuntarily scrolled to the top when mousing off group/project avatars (#7287)
This PR fixes a bug where if you navigated to the projects page via the
menu, scrolled down, and hovered over a project's avatars, you'd be
scrolled to the top of the page when you moused off the avatar.

Turns out this issue was also in the group cards. It seems to be that
the popover attempts to restore focus back to where you where, which, if
you navigated via the menu, is at the top of the page. Because these
popovers don't have any focusable content, we can disable that
functionality.

Additionally, I've disabled the scroll lock when the popover is open.
The scroll lock made it impossible to scroll when one of the popovers is
open, which is confusing as a user.
2024-06-05 13:46:36 +02:00
Mateusz Kwasniewski
e621c7a2a5
feat: Preview dependency (#7284) 2024-06-05 10:05:41 +02:00
Thomas Heartman
c129541df6
feat: adds information about project modes to the project creation form (#7250)
This change adds information about the project modes to the new
project creation form, using the tooltip for project creation modes.

In doing so, it updates the config button tooltip to accept extra
elements and adds styling for them.

What it looks like: 


![image](https://github.com/Unleash/unleash/assets/17786332/809fb48e-2404-416b-a867-6fa04978ccc1)

## a11y issues

This solution does present one problem: the popover doesn't get focus,
so it's impossible for you to scroll with only a keyboard. However, this
is something that's present in Unleash already, and not something that I
think would be easily solvable, so I don't think this is when we should
solve it.
2024-06-05 09:20:18 +02:00
Thomas Heartman
e5c3cc0c8d
chore: regenerate orval with new changes (#7283)
This PR generates new orval schemas with:
- new create tag schema
- updates from toggle to flag
- deprecation and obsolescence info
2024-06-05 09:14:50 +02:00
Thomas Heartman
3039fc3d59
fix: trying to create a tag that's too short gives errors (#7269)
1. Only suggest to create a tag value if the input is more than two
characters after trimming.
2. Ignore trailing and leading whitespace when considering which
autocomplete options to show
2024-06-05 08:47:50 +02:00
Mateusz Kwasniewski
fef77c1fde
feat: filter by feature type (#7273) 2024-06-05 08:17:54 +02:00
Thomas Heartman
257cd5513f
fix: display previously selected tags in dialog (#7271)
When opening a dialog where there's previously selected tags, also
render the previously selected tags.

This is consistent with how we do it for bulk tags.

So instead of showing this when you open the tag manager on a flag with
existing tags:

![image](https://github.com/Unleash/unleash/assets/17786332/c82393f6-9561-4f71-a64e-8537f10400d2)

We show this:

![image](https://github.com/Unleash/unleash/assets/17786332/8ae8acb7-fc13-4289-bae8-d58545f704f3)
2024-06-05 08:13:16 +02:00
Christopher Kolstad
0db5bc193f
task: upgraded semver dependency (and biome) (#7272)
Sorry for the extra noise here, but this seems to be the biome upgrade
altering formatting slightly.
2024-06-04 15:01:43 +02:00
Jaanus Sellin
9cb015a7db
fix: hide insights from sidebar for oss and kill switch (#7270) 2024-06-04 15:34:23 +03:00
Mateusz Kwasniewski
75529f465d
feat: clickable tags in project overview (#7263) 2024-06-04 11:08:38 +02:00
David Leek
927f911c62
chore: add a flag+ui flag for commandBarUI (#7264) 2024-06-04 08:50:13 +00:00
Thomas Heartman
048d604518
chore: update project overview to flags (#7247)
This PR changes the project screen by calling the main tab "flags"
instead of "overview". There isn't really an overview available on that
tab anymore, only a list of flags.
2024-06-04 09:35:17 +02:00
Jaanus Sellin
88dda1987f
feat: project health chart now goes from 0 to 100 to give perspective (#7249)
![image](https://github.com/Unleash/unleash/assets/964450/ab56de69-bed5-4b2c-8ff9-b1cc3db8dd4b)
2024-06-04 10:18:20 +03:00
Mateusz Kwasniewski
a1cecaf647
fix: mobile menu font size (#7252) 2024-06-03 15:28:28 +02:00
Mateusz Kwasniewski
7021763973
feat: explain stickiness (#7248) 2024-06-03 13:54:06 +02:00
Mateusz Kwasniewski
e6b0c4fdb5
fix: Prevent jumping content navbar switch (#7232) 2024-06-03 08:52:03 +02:00
Mateusz Kwasniewski
5eadce061c
feat: align list items on mode switch (#7229) 2024-05-31 13:40:35 +02:00
Mateusz Kwasniewski
6340ecd6bf
fix: demo steps should search the main table (#7227) 2024-05-31 12:29:55 +02:00
Thomas Heartman
de74faac46
chore: remove flag for new project cards (#7225)
This PR removes the flag for the new project card design, making it GA.

It also removes deprecated components and updates one reference (in the
groups card) to the new components instead.
2024-05-31 10:58:31 +02:00
Thomas Heartman
bea5929460
chore: remove project list split feature flags (#7224)
This PR removes all the feature flags related to the project list split
and updates the snapshot.

Now the project list will always contain "my projects" and "other
projects"
2024-05-31 10:38:23 +02:00
Thomas Heartman
f28989749b
fix: correctly align project card info when some cards have multi-line names (#7223)
This change updates the styling of the project card bodies so that
alignment of the project data (number of flags, members, health) stays
at the bottom of the project card body, even if some cards have longer
bodies than others. It also updates the icon placement so that it is
consistent even when the title is multi-line.

Before this change, the bottom row would be misaligned if some (but
not all) project cards on a row had names long enough to span multiple
lines. The project icon would also be misaligned

Before:

![image](https://github.com/Unleash/unleash/assets/17786332/1d1b99a3-263a-4472-8872-0ac59afd252b)

Misaligned project icon: 

![image](https://github.com/Unleash/unleash/assets/17786332/3b805728-c61d-409c-b293-45b37d096b45)



After:


![image](https://github.com/Unleash/unleash/assets/17786332/e81fcdbc-619a-4da3-a559-89af5acff656)

Icon alignment: 

![image](https://github.com/Unleash/unleash/assets/17786332/0e6f669f-1a25-4074-b8c0-6dbdcafbb828)
2024-05-31 10:37:51 +02:00
Thomas Heartman
abf4966a37
fix: handle overflowing avatars in the new project card (#7217)
This change prevents the project owner avatars in the new project card
footer from overflowing by making the number of avatars to show
configurable.

It defaults to 9, the old hard-coded number of avatars shown, but can
be configured.

The reason it overflows here is probably that the extra button in the
project card footer (the favorite) makes the footer smaller than what
we have for the group card footer.

Before: 

![image](https://github.com/Unleash/unleash/assets/17786332/972fe471-a78a-436a-a08d-18afefd2501e)

After:


![image](https://github.com/Unleash/unleash/assets/17786332/af569412-85e2-4b9b-97b8-12b91d372a70)
2024-05-30 12:01:17 +02:00
Thomas Heartman
1ac447141a
fix: handle long names in new project card footers (#7216)
This is a redo of #7215. I missed the case where you have multiple
owners, causing it to lay out weird in that case.

This version handles that by returning an empty div for the owners
instead to fill up that space.

![image](https://github.com/Unleash/unleash/assets/17786332/4d0944a8-988c-4507-a127-755bbda90921)


![image](https://github.com/Unleash/unleash/assets/17786332/14feee20-e1f7-4507-b53d-c70b7d2961dc)


There **are** edge cases where the owners wrap:

![image](https://github.com/Unleash/unleash/assets/17786332/159838e3-2ea1-4846-9d53-357b1377c8e0)


But that is also the case with the current implementation:

![image](https://github.com/Unleash/unleash/assets/17786332/3e3be245-5ca7-46d9-bb3f-a453c90b4b78)

And only happens at very specific breakpoints.
2024-05-30 10:59:44 +02:00
Thomas Heartman
669e21eef0
Revert "fix: handle long owner names for projects (#7215)"
This reverts commit 5c1cd49aaa.
2024-05-30 10:30:23 +02:00
Thomas Heartman
5c1cd49aaa
fix: handle long owner names for projects (#7215)
This change updates the new project card footer to better handle long
names. Previously, if a name was too long to fit on a single line,
it'd wrap. It didn't cause any layout shift, but it made the card look
off.

So instead of wrapping, we now truncate the name and add an ellipsis.

To achieve this, I changed the layout to grid instead of flexbox and
removed a nested flex container.

Before: 


![image](https://github.com/Unleash/unleash/assets/17786332/2074ac85-ce73-4292-beed-a3da05083a8d)

After:


![image](https://github.com/Unleash/unleash/assets/17786332/8302aae8-959f-4336-acd3-dbc207767d5a)

Other cards remain the same, as shown here (new code on left, old code
on right):


<img width="601" alt="image"
src="https://github.com/Unleash/unleash/assets/17786332/009c5d5d-3f9d-4640-86a1-3b6afcd04041">
2024-05-30 10:03:21 +02:00
Thomas Heartman
50c725e2a9
feat: add tooltips to new project creation form config buttons (#7213)
This PR adds tooltips to the new project creation form buttons to make
it clearer what they do. The tooltips tell you what the buttons do and
contains the same description that we use for docs.


![image](https://github.com/Unleash/unleash/assets/17786332/74667ff8-25b7-4daa-bb93-8938fe4e3dd2)

The tooltips will cover other buttons on narrow windows, but I think
that's an acceptable tradeoff


![image](https://github.com/Unleash/unleash/assets/17786332/9886f717-9db9-40bd-bd0b-0e6150896889)
2024-05-30 08:30:44 +02:00
Mateusz Kwasniewski
95f5f7a20b
feat: Recent flags (#7211) 2024-05-29 16:01:52 +02:00
Mateusz Kwasniewski
88c7e9aa0e
feat: move demo to the right (#7212) 2024-05-29 15:00:31 +02:00
Jaanus Sellin
6c8b1d8904
fix: when finding median time to production, ignore 0s (#7200)
We have an issue that if you open up Insights, the Time to Production
chart was showing nothing because it was taking the median across all
projects. You might have many new or empty projects where the median was
0 (no data).

For example, the median from [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.7, 50.3, 140] was 0.

Now, we will remove the 0 values to have a more reasonable median.
2024-05-29 14:17:31 +03:00