1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
Commit Graph

2083 Commits

Author SHA1 Message Date
Mateusz Kwasniewski
f0fe2368e1
feat: execution plan diff table (#4065) 2023-06-22 13:46:29 +02:00
andreas-unleash
fc35f227dc
fix: autocomplete bug when changing context field (#4064)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Fixes a bug with the Autocomplete tags not clearing when moving from on
context field with values to another
## About the changes
<!-- 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 #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-22 14:19:41 +03:00
Thomas Heartman
8cd89bb5a7
chore: update orval models (#4062)
Updates orval model based on the current enterprise changes.

Mostly doc/comment changes, but does introduce the new
strategySchemaLinks model.
2023-06-22 09:52:21 +00:00
Jaanus Sellin
e769cdd2ac
feat: plausible for new strategy flow (#4057) 2023-06-22 12:04:36 +03:00
andreas-unleash
559caee642
fix: multi env select should always have an environment selected (#4061)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- 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 #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-22 11:55:15 +03:00
Mateusz Kwasniewski
374d49f5bf
feat: ui tweaks for playground (#4058) 2023-06-22 10:13:17 +02:00
andreas-unleash
566b91e298
feat: advanced playground multi value context fields (#4053)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Makes the autocomplete component in the playground context field - when
selecting a custom context field that has legal values - able to
select/edit multiple values.

## About the changes
<!-- 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 #
[1-1006](https://linear.app/unleash/issue/1-1006/multi-value-context-field)

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-22 11:06:25 +03:00
Nuno Góis
7e9069e390
refactor: token permissions, drop admin-like permissions (#4050)
https://linear.app/unleash/issue/2-1155/refactor-permissions

- Our `rbac-middleware` now supports multiple OR permissions;
- Drops non-specific permissions (e.g. CRUD API token permissions
without specifying the token type);
- Makes our permission descriptions consistent;
- Drops our higher-level permissions that basically mean ADMIN (e.g.
ADMIN token permissions) in favor of `ADMIN` permission in order to
avoid privilege escalations;

This PR may help with
https://linear.app/unleash/issue/2-1144/discover-potential-privilege-escalations
as it may prevent privilege escalations altogether.

There's some UI permission logic around this, but in the future
https://linear.app/unleash/issue/2-1156/adapt-api-tokens-creation-ui-to-new-permissions
could take it a bit further by adapting the creation of tokens as well.

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2023-06-22 08:35:54 +01:00
Nuno Góis
5c9bf7b0e9
refactor: misc cleanups (#4022)
Misc cleanups of unused imports / variables.
2023-06-21 15:08:52 +01:00
andreas-unleash
57066cf129
Feat/multi env select (#4028)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- 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 #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-21 17:08:27 +03:00
Mateusz Kwasniewski
91f1072519
feat: initial scroll trigger (#4036) 2023-06-21 15:37:04 +02:00
Tymoteusz Czech
02ca60511f
Splitted strategy button (#4025)
## About the changes

![image](https://github.com/Unleash/unleash/assets/2625371/afaaaedf-4539-4a0b-a0fb-916d858ac6d3)


https://linear.app/unleash/issue/1-1038/strategy-creation-split-into-two-buttons
2023-06-21 15:26:07 +02:00
Jaanus Sellin
71d242a299
chore: remove variant metrics flag (#4042) 2023-06-21 15:55:21 +03:00
Jaanus Sellin
3763e1b24d
fix: default segments should only be selected when using default stra… (#4040) 2023-06-21 15:38:47 +03:00
Mateusz Kwasniewski
50d4de86dd
fix: infinite playground rendering (#4031) 2023-06-21 11:52:53 +02:00
Nuno Góis
a9e9ae8c3e
feat: use new role components in project access (#4018)
https://linear.app/unleash/issue/2-1143/adapt-project-roles-to-use-the-new-role-selector-and-role-description

This PR further unifies roles, by having a single `IRole` interface to
cover both types, and re-using the same components for project roles.
2023-06-21 08:16:37 +01:00
Mateusz Kwasniewski
a5ee50cfc9
test: advanced playground error (#4023) 2023-06-21 08:17:53 +02:00
Mateusz Kwasniewski
a0862cfc10
feat: Query complexity validation (#4017) 2023-06-20 14:28:02 +02:00
Mateusz Kwasniewski
2e4f55707d
feat: store playground settings in local storage (#4012) 2023-06-20 11:34:27 +02:00
andreas-unleash
7534ada672
Fix multiple env select (#4011)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Fixes a bug with the multiple env select breaking playground
## About the changes
<!-- 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 #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-19 17:25:10 +03:00
Mateusz Kwasniewski
11e6236c0f
feat: environment diff (#4007) 2023-06-19 14:32:39 +02:00
Mateusz Kwasniewski
15dc98b497
fix: playground link (#4008) 2023-06-19 14:02:30 +02:00
Nuno Góis
3a27f2a4bd
feat: implement better roles sub-tabs (#4009)
https://linear.app/unleash/issue/2-1145/improve-roles-sub-tabs

Improves UI/UX of the roles sub-tabs.

Some of the logic is a bit specific due to the feature flag, will be
nice to clean this up once we remove it.

Before:

![image](https://github.com/Unleash/unleash/assets/14320932/cc277920-557c-45a9-a560-6026167dab1d)

After:

![image](https://github.com/Unleash/unleash/assets/14320932/51d1b5b3-068a-4bf5-84ca-24fdf708f899)
2023-06-19 12:52:56 +01:00
Ivar Conradi Østhus
02600880d1
fix: specific actions for enterprise trial messages (#4001)
Co-authored-by: Nuno Góis <github@nunogois.com>
2023-06-19 13:48:26 +02:00
andreas-unleash
b97c6bdc7b
chore: Add advanced playground table test (#4005)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Adds a frontend test for AdvancedPlaygroundResultsTable
## About the changes
<!-- 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 #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-19 13:54:26 +03:00
Jaanus Sellin
54654c6368
feat: change CR strategy title and name behaviour (#4004) 2023-06-19 13:33:12 +03:00
Mateusz Kwasniewski
16a3f6069c
feat: Playground environment diff table (#4002) 2023-06-19 11:44:32 +02:00
Nuno Góis
eb8f16da8d
feat: roles unification (#3999)
https://linear.app/unleash/issue/2-1137/roles-unification-on-the-ui

Root and project roles should be managed in a similar manner, which
means using the same roles route and tab for both.

Additionally, this includes a big revamp to the project roles to align
them more closely with the modern and standardized custom root roles
that were recently developed. They mostly use the same components.

There are still more things we want to improve and unify, but we've left
some of that out of this PR due to PR size concerns.
2023-06-19 09:41:40 +01:00
Jaanus Sellin
60f4ce31f7
fix: usage of default strategy (#3995) 2023-06-19 11:31:08 +03:00
Jaanus Sellin
f7b0f0e410
fix: demo to use new query param (#4000) 2023-06-19 11:17:40 +03:00
Mateusz Kwasniewski
4035327d56
test: playground env table display (#3989) 2023-06-16 13:49:17 +02:00
Mateusz Kwasniewski
ce6ff2578a
fix: can review CR with skip change request (#3998) 2023-06-16 13:36:23 +02:00
Ivar Conradi Østhus
dcac61e4d9
fix: add trial expired warning for enterprise (#3997)
Adds the trial expired warning for enterprise as well.
2023-06-16 13:35:24 +02:00
Nuno Góis
58607f7f48
refactor: address custom root roles PR comments (#3994)
https://linear.app/unleash/issue/2-1135/address-3975-pr-comments-by-refactoring-some-of-the-new-custom-root

This pull request addresses the majority of the comments raised in issue
#3975 and lays the groundwork for unifying roles. The idea is for
project roles to also be managed in the "Roles" tab, and several
components, such as `RoleForm` and the `useRoleForm` can potentially be
reused.

I'll leave the further investigation and implementation of unifying
roles to be addressed in a separate task.

As a mostly unrelated UI fix, this also adds an arrow to the tooltip in
the `RoleBadge` component.
2023-06-15 14:03:47 +01:00
Mateusz Kwasniewski
c7ff3b472e
feat: Virtualized table with parent ref (#3993) 2023-06-15 14:11:04 +02:00
Tymoteusz Czech
221e3218df
fix: column initial state for project features (#3983) 2023-06-15 14:39:58 +03:00
Tymoteusz Czech
06f9e71f39
fix: show environment reorder handle (#3990)
## About the changes
Handle icon for reordering environments was not showing up.

**Before:**

![image](https://github.com/Unleash/unleash/assets/2625371/977cdda4-6cf2-4acf-affc-f812907bb543)

**After**

![image](https://github.com/Unleash/unleash/assets/2625371/ce495682-5366-4d31-8f5d-1601949d5089)
2023-06-15 13:39:22 +02:00
Jaanus Sellin
6e374be790
feat: strategy tooltip grouping and default (#3986) 2023-06-15 14:29:37 +03:00
Tymoteusz Czech
e0ed2fb830
fix: table imports (#3982)
## About the changes
Quick fix for build warnings on frontend - prevent circular
dependencies.
2023-06-15 13:02:14 +02:00
andreas-unleash
650f6cc857
feat: Advanced playground table (#3978)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Implements the Advanced Playground Table

## About the changes
<!-- 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 #
[1-1007](https://linear.app/unleash/issue/1-1007/env-aware-results-table)

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


![Screenshot 2023-06-14 at 15 04
08](https://github.com/Unleash/unleash/assets/104830839/2f76d6f5-f92b-4586-bb4b-265f26eeb836)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-15 09:29:31 +00:00
Mateusz Kwasniewski
9853aa0217
feat:playground environment table (#3985) 2023-06-15 09:56:13 +02:00
Nuno Góis
bb026c0ba1
feat: custom root roles (#3975)
## About the changes
Implements custom root roles, encompassing a lot of different areas of
the project, and slightly refactoring the current roles logic. It
includes quite a clean up.

This feature itself is behind a flag: `customRootRoles`

This feature covers root roles in:
 - Users;
 - Service Accounts;
 - Groups;

Apologies in advance. I may have gotten a bit carried away 🙈 

### Roles

We now have a new admin tab called "Roles" where we can see all root
roles and manage custom ones. We are not allowed to edit or remove
*predefined* roles.

![image](https://github.com/Unleash/unleash/assets/14320932/1ad8695c-8c3f-440d-ac32-39746720d588)
This meant slightly pushing away the existing roles to `project-roles`
instead. One idea we want to explore in the future is to unify both
types of roles in the UI instead of having 2 separate tabs. This
includes modernizing project roles to fit more into our current design
and decisions.

Hovering the permissions cell expands detailed information about the
role:

![image](https://github.com/Unleash/unleash/assets/14320932/81c4aae7-8b4d-4cb4-92d1-8f1bc3ef1f2a)

### Create and edit role

Here's how the role form looks like (create / edit):

![image](https://github.com/Unleash/unleash/assets/14320932/85baec29-bb10-48c5-a207-b3e9a8de838a)
Here I categorized permissions so it's easier to visualize and manage
from a UX perspective.

I'm using the same endpoint as before. I tried to unify the logic and
get rid of the `projectRole` specific hooks. What distinguishes custom
root roles from custom project roles is the extra `root-custom` type we
see on the payload. By default we assume `custom` (custom project role)
instead, which should help in terms of backwards compatibility.

### Delete role

When we delete a custom role we try to help the end user make an
informed decision by listing all the entities which currently use this
custom root role:

![image](https://github.com/Unleash/unleash/assets/14320932/352ed529-76be-47a8-88da-5e924fb191d4)
~~As mentioned in the screenshot, when deleting a custom role, we demote
all entities associated with it to the predefined `Viewer` role.~~
**EDIT**: Apparently we currently block this from the API
(access-service deleteRole) with a message:

![image](https://github.com/Unleash/unleash/assets/14320932/82a8e50f-8dc5-4c18-a2ba-54e2ae91b91c)
What should the correct behavior be?

### Role selector

I added a new easy-to-use role selector component that is present in:
 - Users 

![image](https://github.com/Unleash/unleash/assets/14320932/76953139-7fb6-437e-b3fa-ace1d9187674)
 - Service Accounts

![image](https://github.com/Unleash/unleash/assets/14320932/2b80bd55-9abb-4883-b715-15650ae752ea)
- Groups

![image](https://github.com/Unleash/unleash/assets/14320932/ab438f7c-2245-4779-b157-2da1689fe402)

### Role description

I also added a new role description component that you can see below the
dropdown in the selector component, but it's also used to better
describe each role in the respective tables:

![image](https://github.com/Unleash/unleash/assets/14320932/a3eecac1-2a34-4500-a68c-e3f62ebfa782)

I'm not listing all the permissions of predefined roles. Those simply
show the description in the tooltip:

![image](https://github.com/Unleash/unleash/assets/14320932/7e5b2948-45f0-4472-8311-bf533409ba6c)

### Role badge

Groups is a bit different, since it uses a list of cards, so I added yet
another component - Role badge:

![image](https://github.com/Unleash/unleash/assets/14320932/1d62c3db-072a-4c97-b86f-1d8ebdd3523e)

I'm using this same component on the profile tab:

![image](https://github.com/Unleash/unleash/assets/14320932/214272db-a828-444e-8846-4f39b9456bc6)

## Discussion points
- Are we being defensive enough with the use of the flag? Should we
cover more?
 - Are we breaking backwards compatibility in any way?
 - What should we do when removing a role? Block or demote?
- Maybe some existing permission-related issues will surface with this
change: Are we being specific enough with our permissions? A lot of
places are simply checking for `ADMIN`;
- We may want to get rid of the API roles coupling we have with the
users and SAs and instead use the new hooks (e.g. `useRoles`)
explicitly;
 - We should update the docs;
- Maybe we could allow the user to add a custom role directly from the
role selector component;

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2023-06-14 14:40:40 +01:00
Mateusz Kwasniewski
1bd182d02a
chore: upgrade orval types (#3981) 2023-06-14 14:40:24 +02:00
Jaanus Sellin
b91b7276c5
feat: split strategies table into two with new design (#3969) 2023-06-14 09:10:04 +03:00
Jaanus Sellin
41370be591
feat: update predefined strategies tooltip (#3964) 2023-06-14 08:46:15 +03:00
Jaanus Sellin
4a2867bd78
feat: context/segment usage plausible (#3956) 2023-06-12 12:41:03 +03:00
Mateusz Kwasniewski
7b8b6bceaf
feat: walking skeleton of the advanced playground (#3949) 2023-06-12 11:01:52 +02:00
Jaanus Sellin
9f0d94287e
feat: context field usage frontend (#3938) 2023-06-12 10:55:58 +03:00
andreas-unleash
69e1c73db1
fix: only show simple tag type if there are no tag types in the server (#3919)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Fixes `simple` tag type still visible in dropdown even after deleted
## About the changes
<!-- 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 #
[1-997](https://linear.app/unleash/issue/1-997/simple-tag-type-still-visible-in-dropdown-after-deletion)

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-09 09:59:27 +03:00
andreas-unleash
84a3a4cb61
fix: remove unneseccary constraint validation request (#3914)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Fixes over-validating constraint
## About the changes
<!-- 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 #
[1-949](https://linear.app/unleash/issue/1-949/fix-overvalidating-constraint)

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-06-07 15:35:20 +03:00
Mateusz Kwasniewski
44f752e714
feat: display strategy title and type (#3908) 2023-06-06 15:04:55 +02:00
Jaanus Sellin
0efaa346c4
feat: usage on context fields in list (#3906) 2023-06-06 13:59:41 +03:00
Mateusz Kwasniewski
5ec59c6e92
feat: change own password confirmation (#3894) 2023-06-05 11:58:25 +02:00
Mateusz Kwasniewski
ae1136075e
feat: autocomplete off on login password (#3901) 2023-06-05 11:29:38 +02:00
Mateusz Kwasniewski
b0a003ea58
feat: disable notifications flag (#3874) 2023-05-29 08:28:47 +02:00
Jaanus Sellin
5d269efa33
feat: segment usage ui test (#3872) 2023-05-28 21:26:09 +03:00
andreas-unleash
89df3f364e
Fix: laggy toggles (#3873)
This PR removes the `disabled` state for the feature toggle env
switches.

This is what causes the lag from when you toggle the switch to when it
becomes available for actions again.


Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: Nuno Góis <github@nunogois.com>
2023-05-26 16:42:42 +02:00
Jaanus Sellin
f73d36fda3
feat: add usage of segment in list (#3853) 2023-05-26 14:37:00 +03:00
Nuno Góis
959ac33905
fix: misc UI fixes mostly responsiveness related (#3868)
Includes:
 - https://linear.app/unleash/issue/2-1050/ui-fixes
 - https://linear.app/unleash/issue/2-1088/mobile-ui
 - https://linear.app/unleash/issue/2-1090/tablet-table

Which include things like:
 - zIndex adjustments;
 - Make the plans dialog more responsive;
 - Hide interactive demo guide on small screens;
 - Improve demo banner responsiveness;
 - Fix console error on `ResponsiveButton`;
 - Adjust sidebar header to be more consistent;
 
 

![image](https://github.com/Unleash/unleash/assets/14320932/e1fce811-a05a-42e6-abca-94789c9f3e37)![image](https://github.com/Unleash/unleash/assets/14320932/c7ce6528-25a6-4592-8c8a-aee765464873)

Co-authored-by @nicolaesocaciu
2023-05-25 20:28:08 +03:00
andreas-unleash
1ec4fd06d2
fix: rollout not reflected correctly for default strategy (#3859)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- 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 #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-24 16:17:26 +03:00
andreas-unleash
46d5e507f4
fix: default strategy screen not loading (#3857)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

Fixes the default strategy modal.  

The bug was the placement of the route component to `edit`

## About the changes
<!-- 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 #
https://linear.app/unleash/issue/1-965/fix-default-strategy-modal-re-render

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-24 15:02:56 +03:00
Nuno Góis
9f0de72e1a
fix: change password alert when password based login is disabled (#3856)
Accessing `/profile/change-password` directly would still allow you to
change your password on the UI when "password based login" is disabled.

This PR makes it so we show an alert in that scenario explaining why
you're not allowed to change your password.

We still allow users to change their password on the API level, but I
think that's fine. The UI should be consistent though.


![image](https://github.com/Unleash/unleash/assets/14320932/0406c773-7bc3-4519-83f8-9eddeb627e28)
2023-05-24 12:14:14 +01:00
Nuno Góis
ea057c0473
fix: profile should wait for loaded state before rendering (#3855)
Small change that makes it so that the profile page waits for the loaded
state before rendering.

E.g. Before this, there was a flash of the "change password" tab being
visible for a very short time before the auth settings loaded.
2023-05-24 10:33:40 +00:00
Nuno Góis
c0bcc50b28
fix: add confirmation to disable password login (#3829)
https://linear.app/unleash/issue/2-1071/prevent-users-from-disabling-password-authentication-when-there-are-no

Improves the behavior of disabling password based login by adding some
relevant information and a confirmation dialog with a warning. This felt
better than trying to disable the toggle, by still allowing the end
users to make the decision, except now it should be a properly informed
decision with confirmation.


![image](https://github.com/Unleash/unleash/assets/14320932/2ca754d8-cfa2-4fda-984d-0c34b89750f3)

- **Password based administrators**: Admin accounts that have a password
set;
- **Other administrators**: Other admin users that do not have a
password. May be SSO, but may also be users that did not set a password
yet;
- **Admin service accounts**: Service accounts that have the admin root
role. Depending on how you're using the SA this may not necessarily mean
locking yourself out of an admin account, especially if you secured its
token beforehand;
- **Admin API tokens**: Similar to the above. If you secured an admin
API token beforehand, you still have access to all features through the
API;

Each one of them link to the respective page inside Unleash (e.g. users
page, service accounts page, tokens page...);

If you try to disable and press "save", and only in that scenario, you
are presented with the following confirmation dialog:


![image](https://github.com/Unleash/unleash/assets/14320932/5ad6d105-ad47-4d31-a1df-04737aed4e00)
2023-05-23 15:56:34 +01:00
andreas-unleash
2a3f743daa
fix: default strategy screen not loading when no default strategy (#3840)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Fixes a bug where default strategy would not edit 
## About the changes
<!-- 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 # 1-953

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-23 15:34:37 +03:00
Thomas Heartman
f7006642a6
fix: Only show names as changed when titles have changed. (#3843)
Related to [linear task
1-954](https://linear.app/unleash/issue/1-954/disabling-last-strategy-in-change-request-shows-strikethrough).

This PR changes the display logic for showing titles as changed: it
previously fell back to always being `true` if there was a custom title
set for a strategy. This PR makes it so that it only shows as changed if
the title has actually changed, either from one custom title to another,
or to and from the display name.

To accommodate the last bit, it also shows display names with a
strikethrough if the strategy had no title previously, but now it does. This is consistent with how it displays the strategy name if you delete a title from a strategy.


Here's a number of different examples: 


![image](https://github.com/Unleash/unleash/assets/17786332/034bcc01-8715-4052-afec-56caf7edea51)
2023-05-23 12:16:20 +00:00
Mateusz Kwasniewski
3e84d2ed09
fix: make area behind bulk actions clickable (#3838) 2023-05-23 10:41:01 +02:00
andreas-unleash
8aadbc8ae9
Fix/cr should activate disabled lag free (#3826)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

- Adds change request option to activate disabled strategies UI
- Fixes Disable strategy bug (onSuggestDisable)

## About the changes
<!-- 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 #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-23 10:16:09 +03:00
Mateusz Kwasniewski
e34c9bc0bf
feat: disable bulk toggles flag (#3827) 2023-05-22 13:31:31 +02:00
Tymoteusz Czech
40185e9066
Update strategies table (#3811)
- split strategies table in two
  - one for predefined strategies
  - one for custom strategies
- move custom strategy button
- add guidance why custom strategies are not recommended

https://linear.app/unleash/issue/1-894/improve-the-list-of-strategies
2023-05-22 12:46:27 +02:00
andreas-unleash
adfd79c261
Revert "feat: change requests UI for activate disabled strategies (#3… (#3817)
…787)"

This reverts commit 896b63616d.

<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- 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 #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->
2023-05-20 09:40:48 +02:00
Gastón Fournier
6e847d0015
Revert "fix: laggy switch" (#3815)
Reverts Unleash/unleash#3814 forcing merge to fix issue in demo instance: https://github.com/Unleash/unleash/pull/3815#issuecomment-1554712970
2023-05-19 16:55:14 +02:00
Nuno Góis
0c538f070a
refactor: change plausible events to be more specific at the top level (#3810)
Splits the `demo` event into multiple more specific events so it's
easier to track on Plausible (fix `(none)` in Plausible).
2023-05-19 15:32:08 +01:00
andreas-unleash
e1dd1701cc
fix: laggy switch (#3814)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Fixes laggy environment switch
## About the changes
<!-- 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. -->

Stabilising the functions with useCallback seems necessary in the table
view
Changed the `checked` property to be dependent on `isChecked` which
wraps the value in useOptimisticUpdate hook made the most difference

<!-- Does it close an issue? Multiple? -->
Closes
#(1-942)[https://linear.app/unleash/issue/1-942/bug-laggy-environment-toggles-in-the-ui]

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-19 13:13:43 +00:00
andreas-unleash
6e2cd602c4
fix: Move title at the top in default strategy (#3812)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Fix for consistency
## About the changes
<!-- 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 #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-19 11:27:34 +00:00
Tymoteusz Czech
d1c3be3b9e
Tracking for default strategy (#3800) 2023-05-19 13:47:55 +03:00
andreas-unleash
896b63616d
feat: change requests UI for activate disabled strategies (#3787)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->
Change request UI fix for `shouldActivateDisabledStrategies`
## About the changes
<!-- 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 #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-05-19 13:29:58 +03:00
Nuno Góis
4adc977ba0
fix: properly handle flag resolver variants (#3808)
Variants were not being properly handled in the `flag-resolver`: The
fact that the default value of the variant is not falsy made it so we
never asked the external flag resolver for the value.

This also moves the logic from `Variant | undefined` to `Variant` where
we use the `getDefaultVariant()` helper method to return us a [default
variant](55274e4953/src/variant.ts (L37-L42)).
2023-05-18 17:04:55 +01:00
Tymoteusz Czech
149c54b0b3
fix: strategy remove menu (#3807)
![image](https://github.com/Unleash/unleash/assets/2625371/6d0f0c58-3637-4586-a0c4-aeb45e5e4a2c)

Menu was hindering the rendering of confirmation dialog.
https://linear.app/unleash/issue/1-935/fix-feature-strategy-actions-menu
2023-05-18 17:35:46 +03:00
Mateusz Kwasniewski
c3de9d7161
test: bulk enable display (#3803) 2023-05-18 14:51:49 +02:00
Mateusz Kwasniewski
92ffc387f3
feat: Bulk enable hints (#3802) 2023-05-18 12:24:31 +02:00
Mateusz Kwasniewski
980332a074
feat: bulk enable disable change requests (#3801) 2023-05-18 11:21:10 +02:00
Nuno Góis
db61a8a40c
feat: message banner (variants) (#3788)
-
https://linear.app/unleash/issue/2-546/fetch-the-payload-from-a-real-feature-flag
-
https://linear.app/unleash/issue/2-547/adapt-ui-to-use-the-feature-flag-information-were-fetching

Tackles the 2 tasks above. 

Adapts our `FlagResolver` logic to support variants, so we can use them
for our message banner project but also anything else in the future.
Also adapts MessageBanner to the new logic.

 - Add support for variants in `FlagResolver`;
 - Adapt `MessageBanner` to a variants flag;
 - Adds `sticky` support for the `MessageBanner`;
- Adds our first variants flag to `uiConfig` and `experimental`:
`messageBanner`;
- Adds a `variant-flag-schema` to make it easy to represent the variant
output that we specify in `uiConfig`;
- Adapts `experimental` to be able to represent default variants while
still maintaining type safety;
- Adds helpers to make it easy to use variants in our project, such as
`getVariantValue` and the `useVariant` hook;
 - Adapts and adds new tests in `flag-resolver.test.ts`;
 
### Notes

- ~~The `as PayloadType` assertions need
https://github.com/Unleash/unleash-client-node/pull/454 since it
includes https://github.com/Unleash/unleash-client-node/pull/452~~
(50ccf60893);
 - ~~Enterprise needs a PR that will follow soon~~;
 
 

![image](https://github.com/Unleash/unleash/assets/14320932/034ff64f-3020-4ed0-863b-ed1fd9190430)
2023-05-18 09:38:59 +01:00
Mateusz Kwasniewski
2487b990bd
feat: Bulk enabled disable (#3797) 2023-05-18 06:07:56 +00:00
Jaanus Sellin
d216c56df5
fix: fix deleting feature from global archive (#3786) 2023-05-17 16:19:19 +03:00
Mateusz Kwasniewski
8dd70e922a
feat: remove icons to prepare space for bulk toggle (#3796) 2023-05-17 12:34:28 +02:00
Nuno Góis
6d473164ab
refactor: rename demo img assets (#3795)
Small PR that simply renames `demo`-related assets for better
organization and readability.
2023-05-17 08:47:19 +00:00
Nuno Góis
6a12403eca
fix: demo QR code (#3793)
https://linear.app/unleash/issue/2-1062/update-the-qr-code

Updates the QR code to a correct one, since the last one expired.

Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#3537
2023-05-17 09:03:11 +01:00
Simon Hornby
4790a26e6f
fix: prevent variant name from containing extra whitespace (#3777) 2023-05-16 13:50:57 +02:00
Tymoteusz Czech
0cb6174f75
Fix/strategy UI improvements (#3766)
https://linear.app/unleash/issue/1-889/ui-adjustments


![image](https://github.com/Unleash/unleash/assets/2625371/e9d851e6-57b5-4deb-b3de-2c0c69fa71dd)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: andreas-unleash <andreas@getunleash.ai>
2023-05-16 11:15:59 +00:00
Nuno Góis
dabb6c00a3
fix: demo guide dialogs behavior (#3762)
Improves the dialogs behavior to address
https://linear.app/unleash/issue/2-1053/bug-when-big-dialog-is-open-if-you-click-on-a-step-the-flow-is-broken

Also prevents close on backdrop click for the welcome dialog.
2023-05-12 17:58:06 +00:00
Nuno Góis
f7b05c39f9
fix: demo userId screenshot path (#3761)
Fixes an issue where the userId screenshot did not load correctly.
2023-05-12 14:34:59 +00:00
Nuno Góis
7116b47a39
fix: point demo website links and QR to new URL (#3754)
https://linear.app/unleash/issue/2-1035/apply-changes-with-demo-instance-in-mind

Applies this item in the task:
- Ensure that the demo guide points to the URL mentioned above, with the
correct QR code;

Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#3537
2023-05-12 12:07:51 +03:00
Nuno Góis
bf4cbd24b0
fix: ensure rel=noreferrer on target=_blank (#3755)
https://linear.app/unleash/issue/2-1043/ensure-that-links-with-target=-blank-include-rel=noreferrer-to-prevent

Ensures that links with `target="_blank"` include `rel="noreferrer"` to
prevent warnings such as:


![image](https://github.com/Unleash/unleash/assets/14320932/9e64df53-b4b9-4346-9394-edb0c2d2d555)
https://mathiasbynens.github.io/rel-noopener/#recommendations
2023-05-12 09:51:33 +01:00
Nuno Góis
b8171cf909
fix: interactive demo guide adjustments (#3747)
https://linear.app/unleash/issue/2-1027/adjustments
https://linear.app/unleash/issue/2-989/add-imagegif-to-some-of-the-steps

Includes small adjustments from the tasks above:
 - Adjust zIndex values for the demo guide;
- Add a screenshot to better guide the users to their `userId` in the
demo website;

Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#3537
2023-05-11 18:01:08 +00:00
Christopher Kolstad
eaacb979d6
fix: Removed CR on variants flag (it's GA) (#3738)
This PR removes the usage of crOnVariants flag, but keeps the behaviour,
so CR are now enabled on variants.

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2023-05-10 13:46:41 +00:00
Nuno Góis
aaf15c96f9
feat: use new demo website (#3737)
https://linear.app/unleash/issue/2-1023/use-new-demo-website-for-testing-purposes

Use https://unleash-demo-app.vercel.app/ for now, which will help us
testing.
Should be reverted/updated before we release to the current `demo`
instance.

Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#3537
2023-05-10 11:48:00 +00:00
Nuno Góis
9d680a782d
fix: improve steps for demo guide toggle topic (#3728)
https://linear.app/unleash/issue/2-1006/steps-improvement-enabledisable-a-feature-toggle

Step improvements for the "toggle" topic.
Includes a smarter "Next" label that can also be "Start" or "Finish"
depending (nice-to-have).

Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#3537
2023-05-09 22:33:01 +03:00
Nuno Góis
64bae9a042
fix: improve steps for demo guide specific user topic (#3727)
https://linear.app/unleash/issue/2-980/steps-improvements-enable-for-a-specific-user

Step improvements for the "specific user" topic.

Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#3537
2023-05-09 22:30:18 +03:00
Nuno Góis
0da0b13379
fix: improve steps for demo guide gradual rollout topic (#3723)
https://linear.app/unleash/issue/2-1007/steps-improvement-adjust-gradual-rollout

Step improvements for the "gradual rollout" topic.

Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#3537
2023-05-09 18:24:28 +03:00