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

3328 Commits

Author SHA1 Message Date
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
Mateusz Kwasniewski
439ee63387
feat: Synced last viewed projects (#7208) 2024-05-29 12:58:14 +02:00
Thomas Heartman
0e7f1aab50
fix: sort segments before comparing in cr diff calculations (#7202)
This change fixes a bug where we would show the list of segments as
changed (causing a conflict) if their order wasn't the same in the
change as in the original.

By sorting the segments before comparing them, we can avoid this issue.

To avoid modifying the objects that are passed in (in case that has
knock-on effects anywhere), we copy the objects. And because `toSorted`
"only" has about 89% coverage now, I chose to use `sort` and spread the
arrays instead.
2024-05-29 12:46:51 +02:00
Jaanus Sellin
e79e36daae
fix: show 2 insights components to pro (#7207)
Currently it was showing only users. Now showing 2.
2024-05-29 12:42:53 +03:00
Mateusz Kwasniewski
25177e55f9
feat: Remove accordion line (#7205) 2024-05-29 11:28:51 +02:00
Mateusz Kwasniewski
75114e52f7
fix: footer overflow (#7203) 2024-05-29 11:11:36 +02:00
Jaanus Sellin
ef9f09b58c
feat: insights out of beta and expose 2 widgets to pro (#7177)
1. Remove beta badge
2. Remove exposure from oss
3. Expose 2 widgets to pro and rest to enterprise
2024-05-29 11:55:01 +03:00
Mateusz Kwasniewski
8d898c2ac9
feat: smart sticky expand/hide button (#7201) 2024-05-29 10:47:57 +02:00
Thomas Heartman
82d401be1b
fix: get rid of horizontal scrollbar on narrow screens in CreateProjectDialog (#7198)
This PR hides horizontal overflow in the dialog.

The pop-up docs that we have on small windows was causing a tiny bit of
overflow, giving us an annoying (and pretty useless) horizontal
scrollbar. We can hide that scrollbar by hiding horizontal overflow.
2024-05-29 08:55:11 +02:00
Thomas Heartman
0f3d93099d
fix: CR button shows docs for change requests when selected (#7196)
The props had been left out of the config button by mistake.

It also puts the CR table in a scrollable div that had been removed by
mistake.
2024-05-29 08:38:00 +02:00
Thomas Heartman
3aa7e89a3e
chore: fix button design on narrow screens for new project form (#7195)
This PR contains a few fixes for button designs on small screens for the
new project form.

It makes all buttons (config and actions) full-width and addresses some
sizing stuff.

It also caps the width of the stickiness button on non-small screens to
avoid shifting.




![image](https://github.com/Unleash/unleash/assets/17786332/83af0a1c-8eb0-4a6b-aa5c-491bbcfab8e9)
2024-05-29 08:37:52 +02:00
Thomas Heartman
06de5de85c
chore: code cleanup for new project form pt 2 (#7190)
This is the second part of the code cleanup job. It primarily consists
of breaking apart large files and organizing the code better
2024-05-29 08:10:47 +02:00
Mateusz Kwasniewski
2649c8e7cd
Fix: overflow sidebar cr banner (#7193) 2024-05-28 16:46:09 +02:00
Mateusz Kwasniewski
8e0b75102b
feat: Expand admin settings (#7192) 2024-05-28 16:09:23 +02:00
Mateusz Kwasniewski
dbc14fa7e9
feat: last viewed project (#7191) 2024-05-28 15:47:26 +02:00
Thomas Heartman
ff377cd704
chore: new project dialog code cleanup 1 (#7113)
This PR implements some initial cleanup work for the new project
creation dialog.

The primary focus here is to remove unused props and to use the same
logic for the configuration buttons regardless of the content (mode,
stickiness, envs, change requests).
2024-05-28 14:01:59 +02:00
Mateusz Kwasniewski
029d43bbcc
feat: project insights out of beta (#7188) 2024-05-28 12:53:50 +02:00
Simon Hornby
f16f8594f5
chore: deprecate custom strategies (#7186) 2024-05-28 12:33:53 +02:00
Mateusz Kwasniewski
0c4d4643bd
feat: Content padding matches top nav (#7187) 2024-05-28 12:33:21 +02:00
Mateusz Kwasniewski
d5730e1e8b
feat: Sidebar nav tweaks (#7185) 2024-05-28 12:15:40 +02:00
Mateusz Kwasniewski
5a9b015022
feat: currently selected nav item (#7182) 2024-05-28 12:03:52 +02:00
Thomas Heartman
c8fa7e477a
chore: allow CR selection when no envs are enabled (#7183)
This PR allows you to configure change requests for all environments
when no environments are enabled explicitly. This is the default state
of the form and makes it so that you can configure CRs even if you want
all envs enabled.

Additionally, it preserves the case where you configure CRs for an
environment and then disable all envs.

This is logic only. It's not available in the UI yet.
2024-05-28 11:35:06 +02:00
Thomas Heartman
2c7a654860
fix: use a fixed-width button label for CR selector in new project creation form (#7179)
This change makes the button label for the CR selector in the new
project creation form have a fixed width. It adds a missing wrapper
element.
2024-05-28 09:48:30 +02:00
David Leek
bc6b23c740
fix: attempt a react friendly fix of summing (#7151)
## About the changes

Summing on Billing page got a little wonky after changing how the
summing worked when the estimation flag is off. This attempts to return
it to previous way of showing numbers when flag is off

If you go directly to the billing page it will not add user calculations
to the total. If you however interact with the UI, like change tabs back
and forth, it will suddenly show the correct sum:


![image](https://github.com/Unleash/unleash/assets/707867/af6eeddf-be3f-42ae-a588-f57c30d739ca)


![image](https://github.com/Unleash/unleash/assets/707867/b4a0b832-a550-4e87-aa69-7b27f96d3beb)

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2024-05-28 09:08:23 +02:00
Jaanus Sellin
73f0cb6180
chore: switch insights ui flag to kill switch (#7166)
The flag is already set up in our Unleash instance.
2024-05-28 09:44:52 +03:00
Thomas Heartman
2698ddf704
fix: change request environment selector button label (#7176)
This change makes it so that the button for change request
environments reads correctly when:
1. You have no envs configured: "Configure change requests"
2. One env configured: "1 environment configured"
3. More than one env configured: "`n` environments configured"
2024-05-28 08:40:58 +02:00
Thomas Heartman
5f3eae7035
chore: rename component to match file name and american spelling (#7174)
Renames the create project dialog component to match the name of the
file (both using the same spelling of dialog)
2024-05-28 08:30:11 +02:00
Thomas Heartman
be0f073b89
chore: fix create project form environment selector button width (#7175)
This commit sets the width of the environment selector button to a
fixed width (wide enough to display "all environments").
2024-05-28 08:22:58 +02:00
Thomas Heartman
cae3d78ced
fix: make CR button wider always (#7173)
This change makes the CR button wider when you have environments
selected, reducing the difference between "no environments" and "envs
configured" states, thereby reducing the difference in the layout.
2024-05-28 07:23:49 +02:00
Thomas Heartman
10155935ae
fix: minor UI adjustments (#7117)
This PR contains two small UI improvements for the new project creation
form:

1. Wrap the action buttons when necessary (so that they don't become
unavailable when the window gets narrow enough.)
2. Make the change request table scrollable horizontally, so that it can
still be configured on narrow windows.

---------

Co-authored-by: sjaanus <sellinjaanus@gmail.com>
2024-05-28 07:10:50 +02:00
Thomas Heartman
9a51f68f5f
chore: new create project dialog UI fixes (#7167)
This PR addresses several related fixes to the new project creation
dialog to prevent unnecessary growing and shifting:

- use a fixed width for the guidance sidebar
- use a fixed height for the guidance code snippet
- use a fixed height for the mobile guidance
- use a fixed width for the mode selector button
- cap description height

This is a little tricky because we don't want the changes for the dialog
to affect other forms. As such, I've added some new options you can use
when you create the guidance components / sidebar.
2024-05-28 07:10:34 +02:00
Mateusz Kwasniewski
f7214c6cd0
test: navigation sidebar (#7172) 2024-05-27 17:00:10 +02:00
Mateusz Kwasniewski
08629e9041
refactor: navigation sidebar (#7171) 2024-05-27 16:29:20 +02:00
Mateusz Kwasniewski
c8db321b3e
feat: Persist expand collapse (#7169) 2024-05-27 15:36:24 +02:00
Mateusz Kwasniewski
67148dbdc9
feat: UI tweak new sidebar (#7165) 2024-05-27 13:35:27 +02:00
Mateusz Kwasniewski
02c0744fc2
feat: user profile preview (#7150) 2024-05-27 12:32:21 +02:00
Mateusz Kwasniewski
17720d6185
feat: adjust change request banner for new layout (#7160) 2024-05-27 11:08:23 +02:00
David Leek
9ea66e8850
chore: remove deprecated legacy features endpoint (#7129)
This PR is part of #4380 - Remove legacy `/api/feature` endpoint.

## About the changes

### Frontend
- Removes the useFeatures hook
- Removes the part of StrategyView that displays features using this
strategy (not been working since v4.4)
- Removes 2 unused features entries from routes 

### Backend
- Removes the /api/admin/features endpoint
- Moves a couple of non-feature related tests (auth etc) to use
/admin/projects endpoint instead
- Removes a test that was directly related to the removed endpoint
- Moves a couple of tests to the projects/features endpoint
- Reworks some tests to fetch features from projects features endpoint
and strategies from project strategies
2024-05-27 09:24:09 +02:00
Mateusz Kwasniewski
68427f841b
feat: Persist navigation settings (#7144) 2024-05-24 13:21:12 +02:00
Mateusz Kwasniewski
8b5e39c997
feat: hide top nav (#7140) 2024-05-24 12:08:08 +02:00
Mateusz Kwasniewski
242f31c251
feat: More spacious layout (#7138) 2024-05-24 11:18:11 +02:00
Mateusz Kwasniewski
ebce31066a
feat: New mobile sidebar (#7135) 2024-05-24 09:35:03 +02:00
Mateusz Kwasniewski
292f43031a
feat: Navigation switch (#7132) 2024-05-24 08:55:05 +02:00
Mateusz Kwasniewski
79ed56ecfc
feat: Mini navigation sidebar (#7131) 2024-05-23 16:09:45 +02:00
Mateusz Kwasniewski
b783e89c88
feat: plan specific navigation (#7126) 2024-05-23 12:44:00 +02:00
Jaanus Sellin
a4c48a16a4
chore: update orval types after renaming (#7127) 2024-05-23 13:37:56 +03:00
Jaanus Sellin
b3dd460d2f
chore: rename toggle to flag #7 (#7125) 2024-05-23 13:19:49 +03:00
Mateusz Kwasniewski
be6837b53a
feat: navigation sidebar stub (#7121) 2024-05-23 10:49:11 +02:00
Jaanus Sellin
29e7c4035d
chore: rename toggle to flag #4 (#7114) 2024-05-22 16:26:22 +03:00
Thomas Heartman
be4bb86b92
fix: add accessible descriptions to the dropdowns (#7112)
This PR adds accessible descriptions to the dropdown widgets in the new
project creation form. The description is the same as we show in the
background
2024-05-22 14:02:05 +02:00
Thomas Heartman
57f66f3b55
fix: prevent single-select lists from reopening when you select an item from the search bar (#7111)
We have this very specific edge case in the new project form
dropdowns. It only occurs for the single-select lists and only if you
select an item via search.

When the search input is non-empty, you can use enter to select the
first item in the list.

For some reason, this also triggers a click on the underlying button
that opens the dropdown (I'm guessing this is to do with an underlying
focus).

To work around it, we create a variable that prevents you from opening
the dropdown if it is true. We set it to 'true' when you close it (for
single-selects), but also set single-millisecond timeout that sets it
to false thereafter.

This is much to short for the user to notice anything, but it prevents
the browser from noticing the click.
2024-05-22 13:53:35 +02:00
Thomas Heartman
78fcdbf132
feat: show docs with icons in sidebar (#7109)
Adds icons to sidebar documentation and removes the link when you can't
interact with it.

I'm a little concerned that this won't be very accessible at the moment,
because we don't announce that anything has changed (i.e. there's no way
to find out that the text has changed if you can't see it), and the text
isn't labeled as describing anything. (this is being addressed in #7110
)


![image](https://github.com/Unleash/unleash/assets/17786332/2f482aa1-b74d-4b0f-97aa-2dbc1d1f82f9)

There's a few caveats to this:
1. we don't set a min height at the moment. I've avoided this because we
use the sidebar a number of other places and I wanted to touch as little
as possible. This means we can still get height adjustments
2. The new project icon doesn't have the same proportions as the mui
icons. This adds some additional jank. We should probably look at this,
though.
2024-05-22 13:45:47 +02:00
Thomas Heartman
688bac9f87
chore: update input field text sizes (#7107)
Make sure that the main input fields have enough space between them and
that their size is correct in both light and dark modes.
2024-05-22 13:26:22 +02:00
Thomas Heartman
4a46c8adbf
fix: set min-height on dropdown item list (#7106)
This ensures that the dropdown items without checkbox are the same
height as the dropdown items with checkbox.
2024-05-22 13:25:39 +02:00
Thomas Heartman
c47154b939
fix: make dialog the right height and make it scroll if it's smaller (#7103)
I've marked the project creation dialog as "compact", so that it's only
as tall as it needs to be.

However, by default, compact forms don't scroll because they have
overflow set to hidden. This is a problem on very short windows. To get
around this, I've set overflow to unset on compact forms.

I've also removed `min-height: 0` which has some weird side effects on
the centered dialog. Instead, I'm setting `min-height` to `unset` if
it's compact.


![image](https://github.com/Unleash/unleash/assets/17786332/e7d5db52-32d3-47d9-b31f-c73a5bb8e00f)

This task also uncovered some inconsistencies and some borders that only
show up sometimes, so I've removed them too.
2024-05-22 13:24:42 +02:00
Jaanus Sellin
2fb95339ef
chore: change toggle to flag #3 (#7101) 2024-05-22 09:58:53 +03:00
Thomas Heartman
14fd624faa
fix: don't send change request info unless using the new form (#7102)
I realized that, in an oversight, the form now shows and sends project
CR config, even if the new form isn't active. The API just ignores it if
it doesn't understand it, so it's not very harmful, but it's better if
we don't send it at all. This PR does that.

It does not actually test that change request info isn't included (but
it does test ID inclusion). This is because:
- change request info is only included if we're enterprise. The rendered
version of the hook isn't by default.
- Setting up module mocking and making it work seems like a lot of work
for a small gain, considering we're probably going to be removing the
old form anyway.
- I've tested it locally.

Also adds some testing for the hook related to name validation and
payload creation
2024-05-22 08:44:39 +02:00
Jaanus Sellin
8542cafc9f
chore: rename toggle to flag #2 (#7097) 2024-05-22 08:20:11 +03:00
Mateusz Kwasniewski
ce67c4d944
fix: no requests before project loaded (#7096) 2024-05-21 15:54:09 +02:00
Jaanus Sellin
8897f2ea75
chore: rename toggle to flag #1 (#7092)
Rename feature toggle to feature flag in the UI and code.
Starting with low hanging fruits.
Trying to keep these ~100 LoC.
2024-05-21 15:18:00 +03:00
David Leek
c14fc54e33
fix: also check includedTraffic before calculating overage and showing warning (#7091)
## About the changes

Fixes a bug that would display the overage warning on
network/traffic-usage when included traffic was 0. (it assumed all
traffic was overage)


![image](https://github.com/Unleash/unleash/assets/707867/793f8cb2-7c1d-4f67-b0e9-45c32fcb78e6)
2024-05-21 12:41:19 +02:00
Jaanus Sellin
4f46f03843
fix: small improvements (#7090)
Fixing isAdmin method. It is not that critical, because that is mostly
for system users not real usage.
Also fixing wording for outdated sdks.
2024-05-21 12:40:52 +03:00
Mateusz Kwasniewski
8a6daeee1e
refactor: replace useProject with useProjectOverview (#7087) 2024-05-20 15:15:24 +02:00
Mateusz Kwasniewski
ee92001bf5
fix: deprecate useProjectNameOrId (#7086) 2024-05-20 14:20:13 +02:00
Mateusz Kwasniewski
0537d3d5f6
feat: switch to hook without features list (#7085) 2024-05-20 13:52:21 +02:00
Jaanus Sellin
3768331e9a
fix: make numbers in chart to locale string (#7084)
To get correct formatting to number, in our codebase we call
toLocaleString(). Added it also to this component.

From

![image
(20)](https://github.com/Unleash/unleash/assets/964450/f941a592-4b86-4b64-99c5-4e7e5d4ccaf2)

To 

![Screenshot from 2024-05-20
14-06-19](https://github.com/Unleash/unleash/assets/964450/abac4570-30be-4fa4-a6fd-24b3f70902e0)
2024-05-20 14:27:53 +03:00
Jaanus Sellin
17e340ab40
feat: project level outdated sdks, project level banner (#7083)
At first, I was creating a new component, Project Banner, which was 90%
of the old banner and 10% new code, but it did not feel right. The
current banner is actually smart enough to be used in any container. So
now, I have moved the outdated SDK banner to the project level.

I like the simplicity of the change.


![image](https://github.com/Unleash/unleash/assets/964450/e57c1ace-e8f9-4866-a063-6f9ae561c6c0)
2024-05-20 14:15:39 +03:00
Mateusz Kwasniewski
659b3391c3
fix: refresh project after import (#7082) 2024-05-20 12:25:23 +02:00
Mateusz Kwasniewski
50ee7fa779
fix: new strategy using default strategy (#7075) 2024-05-20 09:50:44 +02:00
David Leek
dfc0c3c63f
feat: refactor data usage into hooks, estimate monthly added fees (#7048)
- Refactors data processing and overage calculations to separate hooks
- Adds support for estimating traffic costs based on monthly usage up to
current point
- Adds accrued traffic charges to the billing page


![image](https://github.com/Unleash/unleash/assets/707867/39a837c2-5092-49b8-8bbf-46d8757635c0)


![image](https://github.com/Unleash/unleash/assets/707867/55ecfa5e-afe1-4cb6-9aa4-7dd67db4248c)
2024-05-17 15:27:32 +02:00
Mateusz Kwasniewski
08e05141f3
chore: remove e2e tests for legacy env variants (#7071) 2024-05-17 10:55:22 +02:00
Mateusz Kwasniewski
88e3b1b79e
feat: deprecate feature toggle variants at environment level (#7058) 2024-05-16 10:57:32 +02:00
andreas-unleash
9fc01233c6
fix: disable the create button when api call is made (#7063)
Prevends duplicate calls to api

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-05-16 10:52:12 +03:00
andreas-unleash
28ca626bac
fix: loading is causing a glitch that changes the size of the dialog for a split second (#7062)
The loading state of the FormTemplate is causing the form glitch. This
fixes it by removing the loading

Closes #
[1-2362](https://linear.app/unleash/issue/1-2362/fix-visual-glitch-when-you-submit-the-form)


https://github.com/Unleash/unleash/assets/104830839/1782ca09-a8b4-4fd1-92c1-111843869b25

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-05-16 09:59:56 +03:00
David Leek
793cd76e93
feat: move SCIM config into separate tab (#7055)
Moves SCIM config back into separate tab


![image](https://github.com/Unleash/unleash/assets/707867/910f2128-08de-4460-a9e8-a606342669cd)
2024-05-16 08:01:32 +02:00
Mateusz Kwasniewski
701c845f09
feat: uncomplete tracking (#7053) 2024-05-14 15:04:31 +02:00
Mateusz Kwasniewski
668cb81384
fix: omit yes no from stale data comparison (#7052) 2024-05-14 12:42:39 +02:00
Mateusz Kwasniewski
b2b8d94617
feat: lifecycle column extracted (#7049) 2024-05-14 09:24:54 +02:00
Mateusz Kwasniewski
56f2dd658e
feat: track complete event (#7047) 2024-05-13 14:51:28 +02:00
Thomas Heartman
20c3ef30f3
fix: make name validation work properly. (#7042)
Instead of using the `required` attribute, we manually make it
required. This is indicated visually by red error text if the value is
empty (or whitespace only). To indicate to screen readers that it is
required, we add the `aria-required` attribute.

We didn't previously validate if the name
was whitespace only.

Also: if no envs are selected, indicate that all will be included

This prevents this form value from ever being invalid.
2024-05-13 14:43:49 +02:00
Mateusz Kwasniewski
dfc065500d
feat: kept and discarded read model (#7045) 2024-05-13 14:24:31 +02:00
Jaanus Sellin
4241e36819
fix: lifecycle improvements/fixes (#7044)
1. Now completed modal works from project view
2. Changed text for modal
3. Now variant selection will only appear if there are any variants
2024-05-13 13:41:36 +03:00
Thomas Heartman
fddb78380e
fix: make the project submission work from the project creation modal (#7040)
It seems the code that was copied was copied from before we changed
the validation logic, so it wouldn't submit. This fixes that to remove
any ID validation in the new form.
2024-05-13 10:49:05 +02:00
Thomas Heartman
40e4e355e3
Chore: visually hide labels in the create project form (#7015)
This PR visually hides the labels in the new create project form.
They're still rendered for screen readers, however.

It means it looks like this now:


![image](https://github.com/Unleash/unleash/assets/17786332/718772e7-4691-41d6-a70a-bbfc795d60ec)
2024-05-13 07:33:06 +02:00
Mateusz Kwasniewski
74b943721c
fix: center last seen column (#7035) 2024-05-10 14:52:24 +02:00
Mateusz Kwasniewski
56ae53a4da
feat: pre-live should include disabled prod (#7031) 2024-05-10 13:53:01 +02:00
Mateusz Kwasniewski
60a67d4775
fix: Adjust meta data icons (#7026) 2024-05-10 11:46:32 +02:00
andreas-unleash
9fbb041bfd
feat: create project dialog (#7012)
Adds a redirect to `/projects?create=true` to keep the `projects/create`
url still usable.
Loads the form in a modal

Closes
[1-2296](https://linear.app/unleash/issue/1-2296/project-creation-move-to-modal)

<img width="1537" alt="Screenshot 2024-05-09 at 14 06 50"
src="https://github.com/Unleash/unleash/assets/104830839/c108c7ee-5751-4380-9766-11368281a11a">

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-05-10 11:01:49 +03:00
Jaanus Sellin
3f983d061a
feat: mark completed ui selector (#7025)
![image](https://github.com/Unleash/unleash/assets/964450/c6baa90b-5abb-4ba4-a3d9-36af6b426ed6)
2024-05-09 16:55:09 +03:00
Mateusz Kwasniewski
3fc7714e78
feat: Lifecycle in project overview (#7024) 2024-05-09 13:38:18 +02:00
Mateusz Kwasniewski
476959df8e
refactor: extract feature lifecycle component (#7023) 2024-05-09 12:19:24 +02:00
Jaanus Sellin
79739a1d7f
feat: add completed status backend (#7022)
1. Implemented controller, service, store for status saving
2024-05-09 12:05:19 +03:00
Jaanus Sellin
28a7797aea
feat: feature lifecycle completed schema (#7021)
1. Added new schema and tests
2. Controller also accepts the data
3. Also sending fake data from frontend currently

Next steps, implement service/store layer and frontend
2024-05-09 09:51:44 +03:00
Thomas Heartman
b043bcdd4a
feat: front end can create projects without ids (#7009)
This PR updates the new project creation form to not include the project
ID in the payload (because it's generated by the back end now).
2024-05-08 14:57:07 +02:00
Thomas Heartman
9f532834c8
chore: update orval schemas (#7010)
Main purpose is to get the new deprecated `id` property in the project
creation payload required for
https://github.com/Unleash/unleash/pull/7009 to pass.
2024-05-08 14:44:27 +02:00
Ivar Conradi Østhus
ea9a232acc
fix: removed dupliacted component (#7013) 2024-05-08 14:44:21 +02:00
Ivar Conradi Østhus
64c10f9eff
poc: many strategies pagination (#7011)
This fixes the case when a customer have thousands of strategies causing
the react UI to crash. We still consider it incorrect to use that amount
of strategies and this is more a workaround to help the customer out of
a crashing state.

We put it behind a flag called `manyStrategiesPagination` and plan to
only enable it for the customer in trouble.
2024-05-08 14:20:51 +02:00
Jaanus Sellin
81439d23f3
feat: lifecycle is now navigatable by tab (#7005)
![image](https://github.com/Unleash/unleash/assets/964450/ef5677e0-36c7-4cd6-a908-baa164190367)
2024-05-08 15:19:12 +03:00
Mateusz Kwasniewski
f6e85171d9
feat: completed stage lists all environments (#7007) 2024-05-08 14:16:10 +02:00
Mateusz Kwasniewski
f30910f628
fix: optimize table placeholder loading (#7002) 2024-05-08 09:40:37 +02:00
Thomas Heartman
6477ccf34b
test: test how the project form deals with project envs and cr env interaction (#6997)
This PR adds some tests around how project envs and change request envs
interact in the new project form. It tests that:
1. If you remove an env from the project setup, that env is also removed
from the change request list.
2. If you try to enable CRs for an env that isn't enabled, nothing
happens.
2024-05-08 07:26:49 +02:00
Mateusz Kwasniewski
843aab7447
fix: remove columns from the search api query (#6996) 2024-05-07 14:44:09 +02:00
Mateusz Kwasniewski
8ae78236d2
chore: remove project overview refactor flag (#6897) 2024-05-07 13:58:56 +02:00
Jaanus Sellin
b69c294272
feat: pass metrics to feature component (#6994)
![image](https://github.com/Unleash/unleash/assets/964450/39bb4551-dc03-4931-8a7f-cd9c0ceda056)
2024-05-07 11:52:38 +03:00
Mateusz Kwasniewski
a45be8d10c
test: move tests from cypress to rtl (#6987) 2024-05-07 09:03:40 +02:00
Thomas Heartman
913f81b40c
feat: show documentation relating to the specific thing your configuring in the new project form (#6993)
This PR updates the documentation text in the new project form to show
the documentation relating to the specific thing you're configuring.
2024-05-07 08:56:53 +02:00
Thomas Heartman
07871e73e5
feat: configure CRs when creating projects (#6979)
This PR adds the ability to configure CRs when creating a project.

The design is unfinished, and the code certainly needs cleanup, but I'd
like to get this into sandbox so we can look at it.

Things that still need to be done:

1. What do we do about this button when the user has no environments
selected? As a rough draft, I've disabled it. However, we should make it
possible to navigate to and give you an explanation why it was disabled,
e.g. "You have no project environments selected. Please select at least
one project environment.".
2. The form design is not done: the width should be constant and not
jumpy the way it is now. Also, the search field is too wide.
3. I've made the desicion that if you deselect a project env, we also
remove that env from your CR config it it's in there.
4. Potential improvement: if you enable and then disable CRs for an env,
we *could* probably store the data in between, so that if you set
required approvers 5 and then disabled it, it'd still be 5 when you
re-enabled it. That sounds like a good user experience. We should also
be able to extend that to adding/removing environments from project
envs.
2024-05-07 08:14:28 +02:00
Mateusz Kwasniewski
5c27e75014
test: move 2 table tests from cypress to rtl (#6984) 2024-05-06 15:00:53 +02:00
Mateusz Kwasniewski
d01100fbf0
test: move import test from cypress to RTL to make it less flaky (#6982) 2024-05-06 14:40:47 +02:00
Jaanus Sellin
d698eccb4a
fix: badge should render children 0 value (#6981)
When passing 0 in as child, the 0 was not rendred. Fixed the badge
component and added tests.


![image](https://github.com/Unleash/unleash/assets/964450/d681b70c-5d55-4818-86ea-7d05fa86c7b3)
2024-05-06 13:24:52 +03:00
Jaanus Sellin
233b882c7b
feat: merge feature toggle details with feature meta info box (#6977)
![image](https://github.com/Unleash/unleash/assets/964450/5286eb36-311d-42f9-90da-832724cc41d0)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: andreas-unleash <andreas@getunleash.ai>
2024-05-06 12:17:54 +03:00
Thomas Heartman
bd0cd018c9
support setting mode and stickiness in new project form (#6972)
This PR is a combination of two PRs:

This PR adds a functioning environment selection button to the new project creation form. Selected environments are added to the payload and to the API preview.

The implementation is mostly lifted from the existing FilterItem component we have for search filters. However, our need here is less complex, so I've removed some of the things we don't need. There is still more cleanup to be done, however, but I'd like to implement the rest of the submenus first, to see what we really do need in the end.

---

This PR adds support for stickiness and project mode in the new project
creation form.

Achieve this, it does a few things:

1. Moves `resolveStickinessOptions` from
`frontend/src/component/feature/StrategyTypes/FlexibleStrategy/StickinessSelect/StickinessSelect.tsx`
and into a separate hook. This component was used by the old project
creation form. Because the new form has a different input, but needs the
same option, moved that code into a reusable hook.
2. It adds functioning buttons for project stickiness and mode.
3. It adds labels to the search inputs for the dropdowns. Inputs *must*
have labels to meet a11y requirements. However, the designs don't have
labels, so we can hide them visually. Though that leads to another issue
(refer to the screen shot below).
4. It updates the `SelectionButton` component to handle both single- and
multiselect cases. It instead exports these two subcomponents. These are
currently in one file, but I'll split them out into their separate files
in a later PR.

As a side effect of working with the selection buttons, it also improves
how we handle keyboard interaction for these buttons.

Here's what it looks like for single-select lists. Notice the missing
part of the input's border around the top (where the label *would* be if
we showed it). We should figure out how best to handle it. I've done
like this for now, but we can sort it out later.


![image](https://github.com/Unleash/unleash/assets/17786332/5af979c2-6635-481e-8d3e-5aad1c0ab46f)
2024-05-03 07:27:13 +02:00
Thomas Heartman
44e86fc068
chore: fix failing test; don't rely on a single item only (#6974)
This test is breaking right now because it tests a date picker, week 21
is approaching, and `findByText` only expects a single element. Checking
that we have *at least* one element fixes that breakage and I don't
think it should cause any issues.

Of course, that means that right now, this test would also pass even if
the expected button wasn't there, but it would stop passing in about
four weeks time.
2024-05-02 15:03:49 +02:00
Tymoteusz Czech
0bacd60caf
refactor: badge icon spacing (#6962)
Simplified after previous modifications
2024-04-30 14:14:04 +02:00
Thomas Heartman
4fea198d6c
chore: add project icon to new form (#6965)
Imports and uses the same project icon used on the project cards. Also
aligns the header better and makes the text lighter.


![image](https://github.com/Unleash/unleash/assets/17786332/bf5082b0-1f00-45bb-a639-864963b6fe77)
2024-04-30 13:18:27 +02:00
Thomas Heartman
cdbe26330e
feat: enable project creation through new form (#6961)
This PR allows very simple project creation. You can add a name and
description. The ID is generated for you at the moment (we'll fix this
later). Nothing else works, but the project is created successfully.
2024-04-30 13:00:58 +02:00
Thomas Heartman
f77f8a71f8
rough layout of the new form (#6960)
This PR adds a very rough first implementation of the look of the new
project form. *It is not final and does not work yet*.

The important part here is that the layout is roughly right (we'll
adjust spacing etc later) and that we've got all the basic elements
present.

I'll hook it up to actually work in an upcoming PR. 


![image](https://github.com/Unleash/unleash/assets/17786332/b941702f-ec1b-4d16-9628-ba560b0919f2)

The missing icon, text alignment, etc, will also be solved later.
2024-04-30 08:09:07 +02:00
Thomas Heartman
a66b3c65c1
chore: add flag for the new project creation form layout (#6959)
Add a flag to enable/disable the new UI for project creation.
This flag is separate from the impl on the back end so that we can
enable one without the other (but uses flag dependencies in Unleash, so
that we can never enable the new UI without the new back end).

I have not set the flag to `true` in server startup because the form
doesn't work yet, so it's a manual step for now.
2024-04-29 13:52:56 +02:00
David Leek
c048156e19
fix: disable SCIM for OIDC, nothing to test it on (#6937)
disable SCIM for OIDC, nothing to test it on
Also checks scim enabled before saving
2024-04-29 13:14:39 +02:00
Tymoteusz Czech
b6865a5a9d
feat: Project owners UI (#6949)
---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-04-29 11:51:44 +02:00
Ivar Conradi Østhus
3978c690e0
fix: Data usage metrics chart included per day annotion (#6941)
Added a small annotation to the chart on how much data is included in
the pro plan on average per day to make it easier to spot when a
customer average above the included threshold.


![image](https://github.com/Unleash/unleash/assets/158948/c3105f87-03e0-4b27-9e3f-53c749c78078)
2024-04-29 10:35:01 +02:00
David Leek
0ac9624caf
fix: fix UI issues with SCIM new token button (#6948)
Makes the regenerate token button in SCIM settings behave like the rest
of the grid (remove margin left, add margin bottom)


![image](https://github.com/Unleash/unleash/assets/707867/ff3ac26e-87b3-4862-aebd-cdba0011ddad)
2024-04-26 14:31:53 +02:00
Jaanus Sellin
9f6badf5df
feat: add ui test for mark completed button (#6953)
Co-authored-by: kwasniew <kwasniewski.mateusz@gmail.com>
2024-04-26 14:31:20 +02:00
Tymoteusz Czech
514a18bf93
Update OpenAPI generated types for frontend (#6950) 2024-04-26 13:31:15 +02:00
Jaanus Sellin
7022ce8afb
feat: rever to live connected to backend (#6951)
![Screenshot from 2024-04-26
13-30-48](https://github.com/Unleash/unleash/assets/964450/03c57c62-bf51-440b-935d-46da729e3157)
![Screenshot from 2024-04-26
13-15-45](https://github.com/Unleash/unleash/assets/964450/c5ac44be-39dc-4b6c-97ec-5fc56b0cc111)
2024-04-26 13:43:38 +03:00
Jaanus Sellin
7d01dbb748
feat: feature completed connected to backend (#6947)
Connects feature complete to backend
2024-04-26 12:20:34 +03:00
Mateusz Kwasniewski
675e1a9f8b
feat: archive feature from lifecycle (#6938) 2024-04-26 09:29:07 +02:00
David Leek
d1bb65bebd
feat: scim assume control UI - move scim into sso configs (#6929)
- Adds support for the configuration option for SCIM taking over control
of users and groups
- Moves SCIM settings into SSO config pages (OIDC and SAML). SCIM
registers a callback to be invoked when saving in a parent SSO config
page
2024-04-25 15:39:56 +02:00
Mateusz Kwasniewski
19055b1e33
test: lifecycle tooltip (#6932) 2024-04-25 15:22:59 +02:00
Mateusz Kwasniewski
0eaf725e82
feat: lifecycle stage dates (#6926) 2024-04-25 13:30:00 +02:00
Mateusz Kwasniewski
44521c1c74
chore: remove variant dependencies flag (#6896) 2024-04-25 11:07:16 +02:00