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

2208 Commits

Author SHA1 Message Date
Mateusz Kwasniewski
b34f00c2cb
feat: strategy variants alert (#4371) 2023-07-31 12:26:12 +02:00
Tymoteusz Czech
fc54877473
fix: stable bulk updates (#4352)
## About the changes
Prevent re-fetched state change from de-selecting rows.
2023-07-28 08:44:29 +02:00
Mateusz Kwasniewski
733159b8ec
feat: strategy variants infop (#4348)
<!-- 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

Strategy variants info and link to docs. 

Added short info about what variants allow to do, how strategy variants
relate to the feature variants, that modern SDK is required and link to
docs.

<img width="727" alt="Screenshot 2023-07-26 at 14 51 06"
src="https://github.com/Unleash/unleash/assets/1394682/6d5f8a3e-ca3e-434b-a2e7-a23861875cc5">


### 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-07-27 10:12:30 +03:00
Tymoteusz Czech
d2a4763eaa
fix: frontend variant weights distribution (#4347)
## About the changes
Unit-tested way of distributing weights between variants.
2023-07-26 16:08:11 +02:00
Tymoteusz Czech
909831db6f
Feat: strategy variant slider (#4344)
## About the changes

![image](https://github.com/Unleash/unleash/assets/2625371/835cdb1f-c0ad-4966-81a3-9e35944ee1ae)
2023-07-26 11:36:16 +02:00
Mateusz Kwasniewski
55aa15d96d
test: default strategy stickiness (#4341)
<!-- 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

Unit tests for the default strategy and fallback strategy

### 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-07-26 09:39:40 +02:00
andreas-unleash
988a3a57e8
feat: Change Request on Reorder UI (#4249)
<!-- 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 for reordering strategies with variants
## 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-07-25 14:12:35 +03:00
Mateusz Kwasniewski
36bde1b24b
fix: default strategy stickiness (#4340) 2023-07-25 12:45:42 +02:00
Tymoteusz Czech
ddbd619394
fix: Addons toggle (#4312)
## Issue
- When you you enable/disable an addon, in the same time another one is
disabled/enabled
- Sometimes, when clicking enable/disable an addon the toggle switches
quick back to the initial state

## About the changes
- Stable table sorting
- Switch toggle `key`

Closes
https://linear.app/unleash/issue/1-1154/addons-enabledisable-action-misbehaves-changing-other-items
2023-07-24 16:23:41 +02:00
Tymoteusz Czech
c8231d3efd
fix: 404 in dark theme (#4337)
## About the changes
Fix 404 error page UI in dark theme
2023-07-24 14:23:29 +00:00
Tymoteusz Czech
041c06560c
fix: drop staleness column form features archive (#4338)
## About the changes
Drop "status" (stale or active) column from features archive table.

Closes #4315
2023-07-24 14:00:59 +00:00
Tymoteusz Czech
464297d4be
feat: Feature type lifetime API integration (#4295)
## About the changes
API integration and tests.
2023-07-21 09:51:09 +00:00
Tymoteusz Czech
d3708297cf
feat: Feature toggle type - edit form (#4269)
## About the changes

![image](https://github.com/Unleash/unleash/assets/2625371/f09bb538-9bb1-4c6b-85d7-e7895486e794)


Task: https://linear.app/unleash/issue/1-1127/add-front-end


### Important files
frontend/src/component/featureTypes/FeatureTypeForm/FeatureTypeForm.tsx

## Discussion points

**`FIXME`** will be addressed when integrating with API
2023-07-20 13:00:47 +02:00
Tymoteusz Czech
77a365e667
chore: Update OpenAPI definitions generated for frontend (#4283)
## About the changes
`frontend> yarn gen:api` after recent updates
2023-07-20 12:59:55 +02:00
Thomas Heartman
2010b512e0
a11y: change the playground diff link to be a button. (#4274)
This is both more correct in terms of what it does and also fixes an
issue where you couldn't navigate to the diff preview with the
keyboard previously.

It looks exactly the same as before except there's an additional
paddingless button when you hover/focus it.
2023-07-18 15:05:29 +02:00
Tymoteusz Czech
ef495a35ee
Feature toggle types list (#4260)
## About the changes

![image](https://github.com/Unleash/unleash/assets/2625371/0f66333f-5ed9-4e44-b658-2e7c3606a2c3)
2023-07-18 13:46:06 +02:00
Mateusz Kwasniewski
276261c913
feat: Group schema updates (#4258) 2023-07-18 11:08:45 +02:00
Mateusz Kwasniewski
593f83d5d3
feat: advancedPlayground flag used only for runtime control (#4262) 2023-07-18 08:49:04 +02:00
Mateusz Kwasniewski
3f913efe14
fix: reactive stickiness strategy variants (#4255) 2023-07-17 13:42:54 +00:00
Mateusz Kwasniewski
56d5579b89
feat: Strategy variants stickiness (#4250) 2023-07-17 13:58:54 +02:00
Mateusz Kwasniewski
fb6e4906a7
refactor: error param prop (#4247) 2023-07-17 11:02:54 +02:00
Mateusz Kwasniewski
99d63cff33
feat: strategy variant UI spike (#4246) 2023-07-14 14:28:02 +02:00
Jaanus Sellin
4cd4153412
chore: remove split button strategy flag (#4245) 2023-07-14 14:23:23 +03:00
Jaanus Sellin
8de7dfc488
chore: remove context/segment usage flag (#4242) 2023-07-14 13:30:15 +03:00
Nuno Góis
383e522127
feat: Slack App addon (#4238)
https://linear.app/unleash/issue/2-1232/implement-first-iteration-of-the-new-slack-app-addon

This PR implements the first iteration of the new Slack App addon.
Unlike the old Slack addon, this one uses a Slack App (bot) that is
installed to Slack workspaces in order to post messages. This uses
`@slack/web-api`, which internally uses the latest Slack API endpoints
like `postMessage`.

This is currently behind a flag: `slackAppAddon`.

The current flow is that the Unleash Slack App is installed from
whatever source:
 - Unleash addons page;
 - Direct link;
 - https://unleash-slack-app.vercel.app/ (temporary URL);
 - Slack App Directory (in the future);
 - Etc;

After installed, we resolve the authorization to an `access_token` that
the user can paste into the Unleash Slack App addon configuration form.


https://github.com/Unleash/unleash/assets/14320932/6a6621b9-5b8a-4921-a279-30668be6d46c

Co-authored by: @daveleek

---------

Co-authored-by: David Leek <david@getunleash.io>
2023-07-14 09:49:34 +01:00
David Leek
fc9cacfb6d
chore: update demo qr (#4241)
## 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. -->

Updates to use the new Demo QR


![image](https://github.com/Unleash/unleash/assets/707867/75065a45-5462-4230-b246-53fb52ea4fb5)
2023-07-14 09:31:44 +02:00
Jaanus Sellin
3da1cbba47
feat: feature creation limit crud together with frontend (#4221) 2023-07-13 14:02:35 +03:00
andreas-unleash
846a62ecec
fix: existing stickiness value should be available in the dropdown (#4228)
existing stickiness value should be available in the dropdown even if
the context field is no longer sticky

Before: if the context field is no longer sticky
![Screenshot 2023-07-13 at 09 50
55](https://github.com/Unleash/unleash/assets/104830839/6a8afa86-7bd3-45e6-bddf-69306f02bf56)

After
![Screenshot 2023-07-13 at 09 48
53](https://github.com/Unleash/unleash/assets/104830839/e301e1ff-7624-437c-af02-9e293cae4911)

Closes #
[1-1115](https://linear.app/unleash/issue/1-1115/current-gradual-rollout-stickiness-configurations-should-take-priority)

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-07-13 10:20:16 +03:00
Jaanus Sellin
469727bb19
feat: project feature limit UI (#4220) 2023-07-11 14:55:43 +03:00
Mateusz Kwasniewski
5c4f15ea5d
feat: strategy variant test UI (#4199) 2023-07-11 09:21:01 +02:00
Jaanus Sellin
a2b06e4222
feat: project UI rework, move edit and delete buttons deeper (#4195) 2023-07-11 09:47:38 +03:00
Tymoteusz Czech
6f15eb9f4c
fix: correct escaping of ui flags for plausible (#3907)
## About the changes
Stringified JSON still needs to be escaped before being placed in an
HTML attribute.
2023-07-07 17:40:37 +02:00
Nuno Góis
82d855ea1f
fix: add focus style to vertical tabs (#4186)
https://linear.app/unleash/issue/2-1206/we-need-focus-state-for-vertical-menu

Adds a `focus-visible` style to vertical tabs in order to improve
keyboard navigation.


![image](https://github.com/Unleash/unleash/assets/14320932/e07a1b69-2134-4d76-bafe-1c87a0384e64)
2023-07-07 15:55:57 +01:00
Nuno Góis
6638a2f47d
fix: delete project dialog cancel redirect (#4184)
https://linear.app/unleash/issue/2-1204/delete-project-dialog-cancel-button-wrong-redirect

Fixes an issue where the project deletion dialog would redirect if
canceled.
2023-07-07 15:04:21 +01:00
Mateusz Kwasniewski
748bfaad7d
fix: constraint validation affecting disabled button (#4183) 2023-07-07 14:50:13 +02:00
Jaanus Sellin
5388eaf48c
fix: remove dangerouslySetInnerHTML (#4181) 2023-07-07 13:54:21 +03:00
Nuno Góis
e0f5d2c600
feat: show username and email in name column (users tables) (#4180)
https://linear.app/unleash/issue/2-1197/merge-columns-name-and-username-in-one-column-for-all-the-tables

Shows `email` and/or `username` in the `name` column of users tables.
This provides a more consistent look across the UI while saving some
space for other columns.

Before:

![image](https://github.com/Unleash/unleash/assets/14320932/b97b39ba-f5ae-4c39-aed5-d2f7574360c1)

After:

![image](https://github.com/Unleash/unleash/assets/14320932/ef79b6a8-c494-42b3-aef8-7012631e3dbd)
2023-07-07 11:24:09 +01:00
Jaanus Sellin
3c52550474
fix: bulk tags will work now with project permissions (#4177) 2023-07-07 11:55:13 +03:00
Mateusz Kwasniewski
03ddd07ed8
feat: no results on playground error (#4170) 2023-07-06 19:14:32 +02:00
Mateusz Kwasniewski
02fea44956
fix: initial playground env (#4167) 2023-07-06 16:04:33 +02:00
Simon Hornby
79dd508485
fix: project tokens can now be created with the correct permissions (#4165) 2023-07-06 15:47:03 +02:00
Nuno Góis
0dec24722d
fix: disallow deletion of all login history entries (#4159)
https://linear.app/unleash/issue/2-1191/disallow-deletion-of-all-login-entries-in-history-ui

Disallows deletion of all login history entries on the UI.


![image](https://github.com/Unleash/unleash/assets/14320932/f2378d61-0738-4614-b9c5-e81444e8dde1)
2023-07-06 12:19:48 +01:00
Nuno Góis
dd32e8ae0d
fix: disallow deletion of single login history entries (#4149)
https://linear.app/unleash/issue/2-1185/disallow-deletion-of-single-login-entries-in-history-ui

Disallows deletion of single login history entries on the UI.


![image](https://github.com/Unleash/unleash/assets/14320932/380f7e11-8151-49b1-bfd1-0042d87854b7)
2023-07-06 08:36:26 +01:00
Simon Hornby
b0e4c8a57e
chore: remove group root role toggle (#4026) 2023-07-05 14:33:33 +02:00
Nuno Góis
8707c2f7d9
fix: ensure userId context exists when running demo (#4144)
https://linear.app/unleash/issue/2-1168/demo-ensure-userid-context-field-in-setup-steps

This ensures that the `userId` context field exists when we reach
specific demo topics that require it in order to be successfully
completed. This uses the `setup` property on those topics, where we'll
check for the existence of this context field and create it if it's not
found.
2023-07-05 10:49:18 +01:00
Nuno Góis
8ff10aac29
fix: hide users list extra searchable columns (#4142)
https://linear.app/unleash/issue/2-1187/fix-two-extra-columns-in-users-list

This fixes a regression introduced in
https://github.com/Unleash/unleash/pull/4131 where two extra columns
were added for search only but were not properly hidden.

Thanks @nicolaesocaciu for the heads up!

Before:

![image](https://github.com/Unleash/unleash/assets/14320932/09db9078-7804-448a-b889-bd0c58cb2013)

After:

![image](https://github.com/Unleash/unleash/assets/14320932/f099cf42-811c-4a9b-b34a-482fd2bae478)
2023-07-05 08:39:59 +01:00
Jaanus Sellin
523122d184
feat: hovering over feature shows full feature name (#4138) 2023-07-04 15:57:07 +03:00
Mateusz Kwasniewski
1bee81b475
feat: advanced playground UI tweaks (#4136) 2023-07-04 11:37:50 +02:00
Nuno Góis
95a02158e8
fix: improve users search (#4131)
https://linear.app/unleash/issue/2-1183/improve-users-list-search

This adapts the users list to use the new `useSearch` hook so you can
have a better search that also includes "username" and "email" as
fields. It's also more extensible in case we'd like to add filters in
the future.
2023-07-04 09:30:40 +02:00
Nuno Góis
6a3965f57a
feat: improve demo welcome screen options (#4132)
https://linear.app/unleash/issue/2-1166/demo-welcome-screen-improvement

Improves UI/UX of the demo welcome screen dialog by adding the "Explore
on my own" button and renaming the "Try Unleash demo" button to "Go for
a guided tour".

This also adds UTM links to both the demo website URL and QR code.


![image](https://github.com/Unleash/unleash/assets/14320932/982063e8-b818-44a2-a867-046c6ce96a42)
2023-07-04 08:10:34 +01:00
Tymoteusz Czech
ce900830cb
Fix: change request info (#3971)
<!-- 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
- fixed spacing in sidebar
- consolidated info into one banner

closes
[#1-969/change-requests-ui-inconsistency](https://linear.app/unleash/issue/1-969/change-requests-ui-inconsistency)
2023-07-04 09:09:05 +02:00
David Leek
aa7627bc0b
feat/admin menu reorganize (#4129)
## 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. -->

Reorganizes the items in the menu to align with the tabs on the admin
page.
Also makes admin menu available to all users, they can get there anyways
when using API access link, and all admin-only pages are disabled for
non-admins.
Also adds API access to the mobile drawer menu, in accordance with how
the configure menu is laid out.
2023-07-03 12:36:49 +01:00
Nuno Góis
5dcb0f1913
fix: demo flow with split strategy button by making step optional (#4125)
This fixes the demo flow by making the strategy popup step optional. 

This way the demo works whether the flag is enabled or not. Once we make
the split strategy button GA, we can remove this step entirely.

Feel free to re-enable the flag once this is deployed to demo.
2023-06-30 11:15:25 +01:00
David Leek
78ba72d861
feat: remove experimental flag for telemetry (#4123)
<!-- 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. -->

This removes the experimental feature flag that defaulted to turn off
telemetry collection
2023-06-30 11:27:54 +02:00
David Leek
3a14b97fdd
feat/telemetry opt out (#4035)
<!-- 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. -->

Adds a UI that shows current status of version and feature usage
collection configuration, and a presence in the configuration menu +
menu bar.

Configuring these features is done by setting environment variables. The
version info collection is an existing feature that we're making more
visible, the feature usage collection feature is a new feature that has
it's own environment configuration but also depends on version info
collection being active to work.

When version collection is turned off and the experimental feature flag
for feature usage collection is turned off:
<img width="1269" alt="image"
src="https://github.com/Unleash/unleash/assets/707867/435a07da-d238-4b5b-a150-07e3bd6b816f">


When version collection is turned on and the experimental feature flag
is off:
<img width="1249" alt="image"
src="https://github.com/Unleash/unleash/assets/707867/8d1a76c5-99c9-4551-9a4f-86d477bbbf6f">


When the experimental feature flag is enabled, and version+telemetry is
turned off:
<img width="1239" alt="image"
src="https://github.com/Unleash/unleash/assets/707867/e0bc532b-be94-4076-bee1-faef9bc48a5b">


When version collection is turned on, the experimental feature flag is
enabled, and telemetry collection is turned off:
<img width="1234" alt="image"
src="https://github.com/Unleash/unleash/assets/707867/1bd190c1-08fe-4402-bde3-56f863a33289">


When version collection is turned on, the experimental feature flag is
enabled, and telemetry collection is turned on:
<img width="1229" alt="image"
src="https://github.com/Unleash/unleash/assets/707867/848912cd-30bd-43cf-9b81-c58a4cbad1e4">


When version collection is turned off, the experimental feature flag is
enabled, and telemetry collection is turned on:
<img width="1241" alt="image"
src="https://github.com/Unleash/unleash/assets/707867/d2b981f2-033f-4fae-a115-f93e0653729b">

---------

Co-authored-by: sighphyre <liquidwicked64@gmail.com>
Co-authored-by: Nuno Góis <github@nunogois.com>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-06-30 08:43:58 +02:00
Nuno Góis
73b4ae18c1
feat: responsive strategy icons (#4121)
https://linear.app/unleash/issue/2-1167/multiple-strategies-breaking-the-environment-card

https://linear.app/unleash/issue/2-1179/buttons-have-an-extra-space-if-the-icon-its-not-visible

This fixes the broken UI when we have too many strategies.

Before:
<img width="1500" alt="image"
src="https://github.com/Unleash/unleash/assets/14320932/ddf2f636-965c-4527-b879-dba5c16d9630">

After:
<img width="1303" alt="image"
src="https://github.com/Unleash/unleash/assets/14320932/852c20c9-c5f4-4aa5-b8c0-e5bc5286c572">

We also added the new strategy type to the tooltips:
<img width="519" alt="image"
src="https://github.com/Unleash/unleash/assets/14320932/117ee00f-f2a7-4ecb-8596-44486a2870a2">

<img width="422" alt="image"
src="https://github.com/Unleash/unleash/assets/14320932/4281a48c-4b6e-4100-86e2-29dfe9ce4cec">

This also fixes an extra margin we caught on our `PermissionButton` when
it had no endIcon set.

Co-authored by: @daveleek

---------

Co-authored-by: David Leek <david@getunleash.io>
2023-06-29 18:01:27 +01:00
Jaanus Sellin
b6f405d1af
fix: default strategy groupId failure (#4120) 2023-06-29 16:40:14 +03:00
Tymoteusz Czech
a073792d8c
fix: project 404 (#4114)
## About the changes
If project doesn't exist, show 404 information.

![image](https://github.com/Unleash/unleash/assets/2625371/6d7e1dfa-52f0-495b-a559-9733ec0b9340)

<!-- Does it close an issue? Multiple? -->
Closes
[issue/1-1069](https://linear.app/unleash/issue/1-1069/project-doesnt-show-404-if-it-doesnt-exist)
2023-06-29 12:48:32 +02:00
Thomas Heartman
be4c0f2578
chore: remove unused imports from yarn lint (#4082) 2023-06-29 09:08:00 +00:00
Nuno Góis
0b3ed79ecc
refactor: roles - make better plan assumptions (#4113)
https://linear.app/unleash/issue/2-1171/refactor-custom-root-roles-with-correct-plan-assumptions

This cleans up the hotfix `RoleSelect2` component and makes `RoleSelect`
take in a `roles` prop from the parent component.

This also simplifies the role hooks again to assume Enterprise plan by
default. This means, however, that we must ensure that we only call
these hooks in Enterprise features or, if we do call them in other
plans, that we provide a graceful fallback for non-Enterprise.
Non-Enterprise instances do not have this endpoint, and so they are
currently grabbing role information from e.g. `useUsers` and
`useServiceAccounts`.

I'm not sure how I feel about this. Roles are an overarching concept of
Unleash. To me, having to be extremely conscious about the exact
scenario in which you're using such a hook feels like a trap, instead of
"I need roles, so I'll grab the `useRoles` hook and not think much about
it". I also don't like the way `roles` are currently tied to the users,
service accounts, project access, (...) instead of being its own thing.

This could be solved by a `RoleController` exposing the GET endpoints in
OSS, since all of the logic we need for this use-case lives there
anyways. This would then be overridden with the Enterprise-specific
controller when wrapped. This way we could assume the endpoint is always
there, no matter the plan.
This is just an idea and not something I explored in the PR. For now I'm
just focusing on leaving this feature in a sane state.

Tested this manually on `Pro` and `Enterprise` and I believe everything
is acting the way we intend, but would love some extra eyes.
2023-06-28 16:00:14 +01:00
andreas-unleash
d10ddcb12c
Fix/default strategy group (#4110) 2023-06-28 13:18:44 +03:00
andreas-unleash
5cbbd6f798
chore: remove strategyImprovements flag (#4043)
<!-- 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! ❤️ -->
Remove strategy improvements flag 
## 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-1048](https://linear.app/unleash/issue/1-1048/remove-strategyimprovements-flag)

<!-- (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-28 11:38:21 +03:00
Ivar Conradi Østhus
d4390c8759
fix: allow roles to be selected when adding user to project (#4102) 2023-06-27 22:18:30 +02:00
Ivar Conradi Østhus
464ef5b326
fix: break toggle description niceley (#4093)
fixes: #3096
2023-06-27 09:15:16 +02:00
Ivar Conradi Østhus
b36ab58f87
fix: add timestamp to feature toggle metrics (#4094)
fixes: #2873


![image](https://github.com/Unleash/unleash/assets/158948/7d5bb8ee-6b88-49ad-8c51-474e19dc833d)
2023-06-27 09:14:45 +02:00
Nuno Góis
95a0c7748f
feat: upgrade AdminAlert to PermissionGuard (#4074)
https://linear.app/unleash/issue/2-1165/improve-adminalert-usage-to-be-more-generic-accept-non-admin

Upgrades our `AdminAlert` to a new `PermissionGuard`.

**Question**: We don't **need** to, but **should** we be specific about
the `ADMIN` permission every time?
Technically `PermissionGuard` could have `permissions` as optional and
assume `[]` by default, which will add `ADMIN` anyways. However, I feel
like we may gain some readability if we're specific about it. WDYT?

Single permission:

![image](https://github.com/Unleash/unleash/assets/14320932/eab414ae-e798-4ab6-ba96-cde2977dc98b)

Multiple permissions:

![image](https://github.com/Unleash/unleash/assets/14320932/25302442-8fcc-4aa1-9525-d54f5f9350af)
2023-06-23 13:25:35 +01:00
andreas-unleash
d2a98d0338
fix: set max height for add/replace button (#4085)
<!-- 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! ❤️ -->
Sets a maxHeight property for add/replace button in 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-23 15:22:07 +03:00
Thomas Heartman
97875f3f59
chore: remove unused values to stop linter complaining (#4078) 2023-06-23 09:32:09 +00:00
Thomas Heartman
12c00733d9
feat: count number of combinations from playground (#4077)
This PR adds plausible tracking of the number of feature combinations
that we get from the advanced playground API.

The event type has been added to plausible

 Relates to #3545
2023-06-23 09:29:13 +00:00
Gastón Fournier
89cf16f915
Feat/more granular permissions check in create apitoken (#4072)
## About the changes
This PR enables or disables create API token button based on the
permissions.

**Note:** the button is only displayed if you have READ permissions on
some API token. This is a minor limitation as having CREATE permissions
should also grant READ permissions, but right now this is up to the user
to set up the custom role with the correct permissions

**Note 2:** Project-specific API tokens are also ruled by the
project-specific permission to create API tokens in a project (just
having the root permissions to create a client token or frontend token
does not grant access to create a project-specific API token). The
permissions to access the creation of a project-specific API token then
rely on the root permissions to allow the user to create either a client
token or a frontend token.

---------

Co-authored-by: David Leek <david@getunleash.io>
2023-06-23 10:57:08 +02:00
andreas-unleash
c81de4a5bc
fix: add strategy bug when strategySplittedButton flag is on (#4071)
<!-- 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 2 bugs after the recent strategy improvements v2 changes:
- When creating a strategy the `groupId` param of the Gradual Rollout
strategy now populates the groupId (when using default strategy, the
groupId will only be overwritten when it is an empty string ) with the
feature name (as it was before)

- When editing/setting a default strategy for an environment the
`groupId` param should be an empty string, but editable.

## 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-23 07:31:29 +00:00
Mateusz Kwasniewski
175b103b12
fix: remove playground results flip (#4076) 2023-06-23 09:28:49 +02:00
Nuno Góis
4163788bba
fix: update roles permission guard (#4070)
https://linear.app/unleash/issue/2-1162/read-roles-permissions-should-give-you-access-to-read-roles

This updates the roles page permission guard to be the `READ_ROLES`
permission instead of `ADMIN`, which better reflects on the UI the real
permissions of the user.

Our current `AdminAlert` component is pretty limited however, and I plan
to improve it in
https://linear.app/unleash/issue/2-1165/improve-adminalert-usage-to-be-more-generic-accept-non-admin
to better reflect the permission we're missing (instead of alerting that
you need to be an admin).
2023-06-22 14:43:26 +00:00
Nuno Góis
40a4451818
fix: add admin guard to groups (#4069)
Adds an admin guard to groups: It is an admin feature and should be
guarded on the UI the same way other admin features are.
2023-06-22 15:37:02 +01:00
Thomas Heartman
e824d83f93
feat: link to strategy edit screens from playground strategy results (#4063)
This PR adds links from the strategy evaluation results directly to the
strategy edit screen.

If the code doesn't find any links, nothing changes.

The link text will be the name of the strategy and the title (if it
exists).


![image](https://github.com/Unleash/unleash/assets/17786332/10ddbee2-2b19-46b8-a8be-994233f759ea)
2023-06-22 11:51:38 +00:00
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