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

3697 Commits

Author SHA1 Message Date
Thomas Heartman
b021e7cf85
feat: show strategies used by segments (#5407)
This PR displays change request usage of segments when such usage is
returned from the API. It expects at least #5406 to have been merged
before it can be merged.


![image](https://github.com/Unleash/unleash/assets/17786332/c74bb1c9-07f9-4bca-95bb-4ca020398444)
2023-11-27 10:34:34 +00:00
Thomas Heartman
90915cfdd7
Chore: add strategy sorting algorithm (#5406)
This PR adds a strategy sorting algorithm to be used for the segment
deletion dialog. It assumes that you have a list of existing strategies
and a list of change request strategies. Based on the content of these
two lists, it will create one unified list sorted after a number of
criteria (as listed in the test).

# Discussion point: 

This impl does the sorting on the front end, but could we do it on the
back end? Instead of adding a new property to the segment data, could we
simply fold the change request strategies in with the existing segment
strategies and return it using the old property? If the only place we do
that is in this view, then that might be a good suggestion.

Response:

I'll leave this in the front end for now. The reason is that we can't add change request strategies to the existing `strategies` property of the API payload without it being a breaking change. The OpenAPI schema says that `id` is a required field on a strategy, and that field doesn't exist on strategies that have only been added in change requests, but not yet applied.
2023-11-27 11:23:10 +01:00
renovate[bot]
5816c57bd3
chore(deps): update dependency cypress to v13.5.1 (#4896) 2023-11-27 10:07:22 +01:00
Chris Hepner
ef46b042cc
fix: typo in Unleash playground frontend (#5389)
## About the changes

- Change "undestand" to "understand"
- Capitalize "Unleash"

Co-authored-by: Chris Hepner <chris@healthtensor.com>
2023-11-27 09:30:00 +01:00
Tymoteusz Czech
dbd897e3bd
Feat/new paginated table (#5371)
## About the changes
2023-11-24 17:50:58 +01:00
Nuno Góis
47e214d96f
fix: enable toggle with disabled strategies dialog (#5416)
https://linear.app/unleash/issue/UNL-283/improve-dialog-when-there-are-disabled-strategies-and-we-want-to

Improves the "enable toggle when there are disabled strategies" dialog.
Also implements passing in the missing `disabledStrategiesCount`
property to the dialog.


![image](https://github.com/Unleash/unleash/assets/14320932/95d9110e-8c1c-47ce-8e1b-389607115a54)
2023-11-24 14:57:03 +00:00
Nuno Góis
aa8347eb7a
fix: delete archived feature toggles in the UI (#5411)
This PR addresses 2 tasks that aim to fix and improve the UI/UX on
archived feature toggle deletion:

-
https://linear.app/unleash/issue/UNL-260/delete-feature-toggle-dialog-update-word-toggles-to-singular-toggle
-
https://linear.app/unleash/issue/UNL-282/deleting-multiple-toggles-in-the-project-archive-the-batch-selector

Essentially:

- Makes it clearer that we're deleting a single feature toggle by
changing the text to singular toggle
- Improves clarity further by adding a list of feature toggles about to
be deleted
- Fixes a bug where the batch selector would not be cleared after
deleting multiple feature toggles

## Deleting one feature toggle (singular)

![image](https://github.com/Unleash/unleash/assets/14320932/c956f459-ef18-4153-97f7-ffdd6b11613c)

## Deleting multiple feature toggles (plural)

![image](https://github.com/Unleash/unleash/assets/14320932/14f875a4-7f56-4db9-81db-cd06526e5bd5)
2023-11-24 09:35:13 +00:00
Tymoteusz Czech
ffe37ac709
Basic filter label (#5387) 2023-11-24 10:07:42 +01:00
Nuno Góis
7d2fd172a5
fix: role permissions UI improvements (#5388)
https://linear.app/unleash/issue/2-1657/role-permissions-improvements

This PR includes 3 improvements:
 - Sort permissions alphabetically
 - Ensure we don't display duplicate permissions
 - Improve alignment of columns by using a proper grid


![image](https://github.com/Unleash/unleash/assets/14320932/7cb4a70e-8e39-4077-95a0-66f29b3c2e55)
2023-11-23 09:43:15 +00:00
andreas-unleash
937a605888
chore: remove variantTypeNumber flag (#5382)
Closes #
[1-1648](https://linear.app/unleash/issue/1-1648/clean-varianttypenumber-flag-for-release)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-23 11:12:56 +02:00
andreas-unleash
1dafc85eaa
chore: remove playgroundImprovements flag (#5384)
Closes #:

[1-1647](https://linear.app/unleash/issue/1-1647/clean-playgroundimprovements-flag-for-release)

[1-1665](https://linear.app/unleash/issue/1-1665/flaky-test-playgroundconnectionfieldsettesttsx)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-23 10:50:19 +02:00
andreas-unleash
3e12c2b5b6
Chore: remove disableEnvsOnRevive flag (#5391)
Closes #
[1-1646](https://linear.app/unleash/issue/1-1646/clean-disableenvsonrevive-flag-for-release)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-23 10:10:37 +02:00
Fredrik Strand Oseberg
5414fa6663
Refactor/remove last seen at flag (#5394)
This PR removes the feature flag for displaying the new last seen by
environments component.
2023-11-22 13:32:38 +01:00
Nuno Góis
5dc3e830a8
feat: add CREATE_TAG_TYPE permission (#5386)
https://linear.app/unleash/issue/2-1164/update-tag-type-covers-both-creation-and-update

Adds a new `CREATE_TAG_TYPE` permission instead of using
`UPDATE_TAG_TYPE` for both actions.
2023-11-22 10:20:19 +00:00
andreas-unleash
8ffc92af5b
fix: Only show strategy variant changes if there is a diff in the variants (#5353)
What it says on the box

Closes #
[1-1652](https://linear.app/unleash/issue/1-1652/remove-the-variants-from-change-request-page-when-not-modified)

![Screenshot 2023-11-16 at 11 26
05](https://github.com/Unleash/unleash/assets/104830839/8f25b82c-4dbc-46fb-bdd6-0e0049659c72)

![Screenshot 2023-11-16 at 11 25
46](https://github.com/Unleash/unleash/assets/104830839/e6366622-3a50-4a0e-bba2-6c1d34e64077)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-22 09:50:03 +02:00
Fredrik Strand Oseberg
83fe430a14
Feat/private project badge (#5373)
Adds an icon with tooltip for private projects in ProjectCard and
Project header:

<img width="528" alt="Skjermbilde 2023-11-21 kl 10 58 13"
src="https://github.com/Unleash/unleash/assets/16081982/28004c11-a20d-4740-98f4-127f41639896">
2023-11-21 11:49:50 +01:00
Tymoteusz Czech
d5049e6197
feat: useTableState hook (#5362)
Simplified logic for handling interaction between URL (query), table state and localstorage.
2023-11-21 11:25:31 +01:00
Fredrik Strand Oseberg
11533bf97a
refactor: remove feature flag for Dora (#5367) 2023-11-21 08:18:00 +01:00
Thomas Heartman
90d6c7c0ba
chore: remove usage of feature naming pattern flag (#5364)
In preparation for this feature going GA
2023-11-20 12:42:24 +01:00
Gastón Fournier
4801b64824
feat(banners): enable customer banners (#5348)
## About the changes
This feature allows our Enterprise customers to configure banners to be
displayed on their Unleash instance for all their users to see and
interact with. Previously known as "internal message banners".
2023-11-17 13:56:09 +00:00
Thomas Heartman
be699962b1
chore: remove segments oss splash (#5359)
This change removes the oss segments splash screen that was introduced
in https://github.com/Unleash/unleash/pull/5053.
2023-11-17 13:39:43 +00:00
Gastón Fournier
572610a0d8
chore: remove tsc when running tests (we do in GHA) (#5357)
Not needed for tests
2023-11-17 11:42:32 +01:00
andreas-unleash
0dc5f306cc
Feat: change request scheduled timeline (#5346)
Adds the scheduled state to the timeline

Closes #
[1-1632](https://linear.app/unleash/issue/1-1632/update-the-progress-bar-for-scheduled-changes)

![Screenshot 2023-11-16 at 10 51
03](https://github.com/Unleash/unleash/assets/104830839/6267299e-d5c3-4cbf-9ab2-25da53f2d526)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-17 11:20:14 +02:00
Nuno Góis
f8a9d7f355
fix: take into account project segments permission in form (#5352)
https://linear.app/unleash/issue/SR-184/ticket-1106-users-with-createedit-project-segment-dont-see-all-the

https://github.com/Unleash/unleash/pull/5304 did not take into account
permissions further into the Segment form.

This PR fixes the remaining permission checks to take into consideration
the project-level permission: `UPDATE_PROJECT_SEGMENT`.
2023-11-16 11:54:56 +00:00
Fredrik Strand Oseberg
2dd2d520e3
Feat/exp project features (#5351)
This PR adds feature toggle list on the project on a separate page as an
experiment
2023-11-16 12:41:31 +01:00
Jaanus Sellin
4e1040c849
feat: connect sort table to backend (#5338)
Now FE sorting is done in backend.
2023-11-15 16:01:02 +02:00
Fredrik Strand Oseberg
db77962a72
fix/usefeaturesearch cache (#5340)
Fixes a bug where the closure over the useFeatureSearch hook would not
account for projectId and return the wrong total/initial load
2023-11-15 11:09:13 +01:00
Fredrik Strand Oseberg
357af740c8
refactor: new table styling for project overview (#5334)
This PR alters the table styling for the Project Overview table so that
we utilise more of the surrounding space:
2023-11-14 13:57:06 +01:00
Jaanus Sellin
069d90d8cb
fix: date should sort asc/desc properly (#5335) 2023-11-14 14:47:28 +02:00
Tymoteusz Czech
fd3a7f12cb
chore: remove featureSwitchRefactor flag (#5329)
Cleanup. This change has been rolled out to significant number of
customers already, and we have another parallel version behind a flag.
2023-11-14 13:03:23 +01:00
Jaanus Sellin
cdebf9aa28
fix: sort order should be persisted and used from local storage (#5332) 2023-11-14 11:08:04 +02:00
Fredrik Strand Oseberg
ddd718fd23
refactor/reshape table (#5328)
This PR fixes a couple of issues with the pagination bar:

* Fixes an issue where padding bottom would be broken due to disabling
padding on the parent container
* Remove padding on the entire table to create more space and remove
header bar border radius as per discussion with @nicolaesocaciu
2023-11-14 08:44:36 +01:00
Fredrik Oseberg
0f7360c1e8
fix: conditionally show pagination bar 2023-11-13 14:47:51 +01:00
Fredrik Strand Oseberg
834ae1d8a4
Feat/pagination loading (#5325)
This PR makes changes to how the project overview skeleton screen works.
Important changes:

- Add skeleton screens to missing elements, creating a more
comprehensive loading screen
- Split the page into different loading sections, so that we can load
the table when we fetch the next page without affecting the rest of the
page.

https://www.loom.com/share/e5d30dc897ac488ea80cfae11ffab646

Next steps:
* Hide bar if total is less than 25
* Add FE testing
2023-11-13 14:08:48 +01:00
Fredrik Strand Oseberg
7f4df19660
Feat/pagination bar (#5309)
Initial implementation of the sticky pagination bar.
2023-11-10 14:16:31 +01:00
Nuno Góis
15f77f5b8b
fix: project settings flag limit not properly set (#5317)
https://linear.app/unleash/issue/SR-169/ticket-1107-project-feature-flag-limit-is-not-correctly-updated

Fixes #5315, an issue where it would not be possible to set an empty
flag limit.
This also fixes the UI behavior: Before, when the flag limit field was
emptied, it would disappear from the UI.

I'm a bit unsure of the original intent of the `(data.defaultStickiness
!== undefined || data.featureLimit !== undefined)` condition. We're in
an update method, triggered by a PUT endpoint - I think it's safe to
assume that we'll always want to set these values to whatever they come
as, we just need to convert them to `null` in case they are not present
(i.e. `undefined`).
2023-11-10 09:57:20 +00:00
andreas-unleash
180c0dceae
Fix/scheduled request UI (#5318)
Change timezone format
Fixes a bug where the Edit button on hover being elongated

Before:
<img width="755" alt="Screenshot 2023-11-09 at 21 36 01"
src="https://github.com/Unleash/unleash/assets/104830839/189f21d5-8a68-4d6b-b094-b518749a9b2f">

After:
<img width="812" alt="Screenshot 2023-11-09 at 22 09 26"
src="https://github.com/Unleash/unleash/assets/104830839/9056f995-bd2b-4353-8526-77160e49e990">

Adds the missed onClick to the edit button to show the dialog

Fixes a bug with ScheduleChangesDialog onClose

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-10 11:22:03 +02:00
andreas-unleash
77db9f3258
feat: add Changes Scheduled badge to feature variants (#5312)
Adds the Changes Scheduled badge to environment variant when appropriate

Closes #
[1-1625](https://linear.app/unleash/issue/1-1625/show-a-badge-when-variant-in-scheduled-request)
<img width="1006" alt="Screenshot 2023-11-09 at 15 42 37"
src="https://github.com/Unleash/unleash/assets/104830839/118a3f0b-9acf-4a49-92d2-49bbe49a4c91">

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2023-11-09 14:58:58 +00:00
andreas-unleash
100c22b42a
Feat: scheduled change request badges (#5300)
Adds a new badge to strategies that have changes in an a scheduled
change request

Closes #
[1-1620](https://linear.app/unleash/issue/1-1620/create-a-new-badge-for-flag-that-is-part-of-scheduled-change)
<img width="1671" alt="Screenshot 2023-11-09 at 11 49 53"
src="https://github.com/Unleash/unleash/assets/104830839/596abbc0-f9ab-4642-9ed2-79ef50fb6c05">

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2023-11-09 13:48:29 +02:00
Nuno Góis
4d1f76e61b
fix: take into account project segments permission (#5304)
https://linear.app/unleash/issue/SR-164/ticket-1106-user-with-createedit-project-segment-is-not-able-to-edit-a

Fixes a bug where the `UPDATE_PROJECT_SEGMENT` permission is not
respected, both on the UI and on the API. The original intention was
stated
[here](https://github.com/Unleash/unleash/pull/3346#discussion_r1140434517).

This was easy to fix on the UI, since we were simply missing the extra
permission on the button permission checks.

Unfortunately the API can be tricky. Our auth middleware tries to grab
the `project` information from either the params or body object, but our
`DELETE` method does not contain this information. There is no body and
the endpoint looks like `/admin/segments/:id`, only including the
segment id.

This means that, in the rbac middleware when we check the permissions,
we need to figure out if we're in such a scenario and fetch the project
information from the DB, which feels a bit hacky, but it's something
we're seemingly already doing for features, so at least it's somewhat
consistent.

Ideally what we could do is leave this API alone and create a separate
one for project segments, with endpoints where we would have project as
a param, like so:
`http://localhost:4242/api/admin/projects/:projectId/segments/1`.

This PR opts to go with the quick and hacky solution for now since this
is an issue we want to fix quickly, but this is something that we should
be aware of. I'm also unsure if we want to create a new API for project
segments. If we decide that we want a different solution I don't mind
either adapting this PR or creating a follow up.
2023-11-09 09:37:47 +00:00
andreas-unleash
3e9d88f789
Feat/scheduled cr UI tests (#5296)
Ui tests scheduled change requests

Closes # [1-1598](https://linear.app/unleash/issue/1-1598/e2e-ui-tests)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2023-11-08 14:28:16 +02:00
Jaanus Sellin
24f9fa3058
feat: connect search and filter with server api (#5297) 2023-11-08 14:19:40 +02:00
Jaanus Sellin
4bacd3e055
feat: introduce offset based search instead of cursor (#5274) 2023-11-08 11:12:42 +02:00
Tymoteusz Czech
06d62278dc
fix: change request table sort type (#5295) 2023-11-07 17:13:43 +01:00
andreas-unleash
addda5b022
feat: schedule changes dialog (#5285)
Closes: # 

[1-1585](https://linear.app/unleash/issue/1-1585/reschedule-changes-dialog)

[1-1582](https://linear.app/unleash/issue/1-1582/change-apply-changes-apply-or-schedule-changes)

Manually tested e2e -> Approve -> Schedule -> Reschedule ->
Apply/Reject: ui tests verifying it in next pr

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-11-07 10:59:49 +02:00
Fredrik Strand Oseberg
92e2b1890c
Refactor/project overview api calls (#5279)
This PR reduces the overhead of making API calls on pages with heavy
renders. We forego loading states and default error handling in favor of
more speed by avoiding triggering multiple re-renders from the API call.
2023-11-07 09:19:55 +01:00
andreas-unleash
2262ca1be6
Feat: scheduled change request dialogs (#5267)
Creates the Apply and Reject scheduled change request dialogs

Closes #
[1-1584](https://linear.app/unleash/issue/1-1584/add-modal-for-apply-now)

Closes #
[1-1586](https://linear.app/unleash/issue/1-1586/reject-changes-dialog)

<img width="1669" alt="Screenshot 2023-11-03 at 14 43 17"
src="https://github.com/Unleash/unleash/assets/104830839/832edb8e-1da1-4d96-a5c3-4fa0cd336fea">
<img width="1669" alt="Screenshot 2023-11-03 at 14 43 28"
src="https://github.com/Unleash/unleash/assets/104830839/f9028671-e5e1-441c-886b-1e562c83f214">

UI e2e tests will be in a follow up PR

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-06 11:13:50 +02:00
andreas-unleash
6b637d5fa9
feat: scheduled change request state (#5261)
Adds the scheduled state to ChangeRequestOverview.tsx

<img width="1523" alt="Screenshot 2023-11-03 at 12 52 07"
src="https://github.com/Unleash/unleash/assets/104830839/710b5f26-04a0-4ee9-b646-8ff3090ad86a">

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-03 15:02:51 +02:00
Fredrik Strand Oseberg
ddb9b5c20f
Refactor/rename constraint button (#5260)
This PR changes the button type and text for constraint accordions
2023-11-03 11:34:15 +01:00
Thomas Heartman
7cf998c509
fix: move useUiFlag before "return null" to avoid rendering more hooks on the first render (#5258)
Move the hook to before the first return to avoid React erroring out.
2023-11-03 10:04:03 +00:00