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

3171 Commits

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