1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Commit Graph

682 Commits

Author SHA1 Message Date
Youssef Khedher
ee730e0708 Feat/custom strategy screen (#722)
* feat: setup new screen structure

* refactor: strategyParameter

* feat: add strategy input errors for required fields

* feat: add create strategy to routes

* feat: add EditStrategy component

* feat: edit strategy view and EditStrategy component

* feat: update EditStrategy component

* test: update snapshots

* fix: styles

* test: update snapshots

* refactor: rename StrategyForm and fix ts errors

* test: update snapshots

* fix: remove test route

* fix: update PR based on feedback

* fix: update PR based on feedback

* refactor: restore feature settings (#712)

* refactor: resotre feature settings

* fix: update PR based on feedback

* feat: add feature information in Metadata container

* fix: update PR based on feedback

* fix: update PR based on feedback

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>

* chore(deps): update dependency @types/react-dom to v17.0.13

* refactor: expect existing TS errors (#767)

* refactor: expect existing TS errors

* refactor: fail build on new TS errors

* fix: styles

* refactor: rename StrategyForm and fix ts errors

* fix: update PR based on feedback

* fix: cleaning up

* fix: remove errors and warnings

* fix: remove ts-expect-error and fix errors

* fix: ts errors

* Update src/component/strategies/StrategyView/StrategyView.tsx

* Update src/component/strategies/StrategyView/StrategyView.tsx

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: olav <mail@olav.io>
2022-03-04 23:39:41 +01:00
Fredrik Strand Oseberg
2c1353d0ea Feat/new constraints (#718)
* fix: add initial interface

* feat: create separate components

* feat: implement constraints for existing strategies

* feat: add searchfield

* fix: reset values on context change

* fix: key issue with duplicate values

* fix: increase auto hide duration of errors

* fix: types

* feat: resolve inputs

* fix: add date input

* fix: add filter

* fix: create strategy

* fix: remove unused deps

* feat: validation

* fix: type setError

* feat: handle currentTime based on client spec

* fix: date field

* feat: api validation

* fix: refactor

* fix: refactor

* feat: add compact

* fix: remove unused code

* feat: mobile optimisations

* fix: remove coalescing operator for constraint

* fix: clone deep

* fix: move parseDate

* fix: lift state up for value setting on dates

* fix: rename values

* fix: change type to interface

* fix: lazy initialise values

* fix: create operator type

* fix: update naming

* fix: naming

* fix: aria hidden

* fix: remove optional operator

* fix: rename new constraints

* fix: setup flag

* fix: refactor date check to date-fns

* fix: use date-fns for validation

* fix: detach validators from state

* refactor: move resolve input to it's own component

* fix: remove unused imports

* fix: change values container to overflow auto

* fix: update placeholder

* fix: update import

* fix: backwards compatability

* fix: hide paragraphs if not active

* fix: update path

* fix: update strategy text
2022-03-04 17:29:51 +01:00
olav
b3bf86ca84 refactor: expect existing TS errors (#767)
* refactor: expect existing TS errors

* refactor: fail build on new TS errors
2022-03-03 10:01:04 +01:00
Youssef Khedher
b973232116 refactor: restore feature settings (#712)
* refactor: resotre feature settings

* fix: update PR based on feedback

* feat: add feature information in Metadata container

* fix: update PR based on feedback

* fix: update PR based on feedback

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-03-02 10:15:37 +01:00
olav
b9a3be7b3a refactor: fix misc TS errors (#754)
* refactor: fix PermissionSwitch event types

* refactor: fix variant payload field name

* refactor: fix IPermissionSwitchProps extension

* refactor: add missing types in AddFeatureVariant

* refactor: remove duplicate type

* refactor: fix FeatureToggleListNewItem ref type

* refactor: fix CreatedAt date prop type

* refactor: add missing anchorEl ref types

* refactor: fix createdAt prop value

* refactor: fix IFeatureToggleListNewItemProps environments prop type

* refactor: add missing ISelectOption type

* refactor: fix ResponsiveButton prop types
2022-03-01 13:22:47 +01:00
Youssef
b58cccc7d0 fix: merge conflicts 2022-02-25 15:28:38 +01:00
Youssef Khedher
a3f439ea17 Merge branch 'main' into fix/ui-consistency 2022-02-25 13:54:11 +01:00
olav
3959e846e8 refactor: fix misc TS errors (#729)
* refactor: update test deps

* refactor: remove unused ts-expect-error annotations

* refactor: add missing arg and return types

* refactor: the loading prop is optional

* refactor: add missing arg and return types

* reafactor: fix value arg type

* refactor: fix missing array type

* refactor: the parameters field is an array

* refactor: use undefined instead of null in state

* refactor: add missing params type

* refactor: add missing children prop

* refactor: add missing array type

* refactor: add missing React imports

* refactor: use correct IProjectEnvironment type

* refactor: type errors as unknown

* refactor: the index prop is required

* refactor: fix date prop type

* refactor: fix tooltip placement prop type

* refactor: fix environments state type

* refactor: add missing arg types

* refactor: add guard for undefined field

* refactor: fix ChangePassword prop types

* refactor: fix MUI import paths

* refactor: add missing arg type

* refactor: fix showDialog prop type

* refactor: remove unused openUpdateDialog prop

* refactor: add missing non-null assertion

* refactor: remove unused types prop

* refactor: stricten API error handler types

* refactor: add missing undefined check

* refactor: add missing IProject id field

* refactor: fix ConditionallyRender condition prop types

* refactor: remove unused args

* refactor: add AddVariant prop types

* refactor: add types to UIContext

* refactor: fix event arg type

* refactor: add missing default impressionData field

* refactor: fix handleDeleteEnvironment prop args

* refactor: fix IFeatureMetrics field requirements

* refactor: add missing element types to ConditionallyRender

* refactor: remove unused ProjectAccess projectId prop

* refactor: add missing undefined check

* refactor: fix getCreateTogglePath arg type

* refactor: add missing IStrategyPayload import

* refactor: remove unused user arg

* refactor: add missing event arg type

* refactor: add missing style object types

* refactor: improve userApiErrors prop type

* refactor: the Dialogue onClose prop is optional

* refactor: fix the AddonEvents setEventValue prop type
2022-02-25 10:55:39 +01:00
olav
a4dab966a3 refactor: port date utils to TS (#720) 2022-02-25 10:40:55 +01:00
olav
19b16ed600 refactor: fix flaky Cypress tests (#746)
* refactor: normalize spec names

* refactor: make ESLint ignore dir

* refactor: port specs to TS

* refactor: wait for login redirects to finish

* refactor: remove static wait timers

* refactor: match any env name in interceptors

* refactor: move config vars to the top

* refactor: use longer IDs to avoid collisions

* refactor: misc cleanup

* refactor: disable screenshots and videos

* refactor: disable prod guard in tests

* refactor: wait for inputs before typing
2022-02-25 10:21:28 +01:00
Youssef
5371e15333 refactor: change resourceCreateButton and SaveChangesButton name 2022-02-24 09:23:07 +01:00
Youssef
af6542a291 feat: create ressources buttons and update all forms 2022-02-24 00:57:35 +01:00
olav
47f6bc5829 refactor: remove chart point filter (#743) 2022-02-23 17:23:21 +01:00
Fredrik Strand Oseberg
3d93ed44d4 fix/search-header (#742)
* fix/search-header

* fix: update snapshots
2022-02-23 16:08:04 +01:00
olav
94ecaa80a8 refactor: improve feature toggle search state (#741)
* refactor: rename createPersistentGlobalStateHook helper

* refactor: move features filter state out of localStorage

* refactor: show search state in page title

* refactor: remove unused import

* refactor: add a state chip to SearchField

* refactor: improve var names
2022-02-23 15:08:44 +01:00
Youssef
b0ba4f3a9d fix: remove tooltips 2022-02-23 13:45:37 +01:00
Youssef
aae8c4d9d9 refactor: update text in ui consistent 2022-02-23 00:10:48 +01:00
olav
ff433faad0 refactor: fix missing callback when the prod guard is hidden (#734) 2022-02-22 16:30:13 +01:00
Youssef Khedher
aeaea9602c Merge branch 'main' into feat/simplify-imports 2022-02-22 00:23:56 +01:00
olav
49c25cbaa6 refactor: remove lazy loading for metrics page (#733) 2022-02-21 15:22:37 +01:00
olav
33b5e4abac feat: add new feature metrics page (#716)
* refactor: ensure that [hidden] overrides other display styles

* refactor: use numeric font weights

* refactor: remove unnecessary Jest mock

* refactor: add a fullWidth prop to GeneralSelect

* refactor: remove unnecessary label id prop

* refactor: the showActive prop is optional

* refactor: add hooks for managing query string state

* refactor: add a hour/minute timestamp formatter

* refactor: add labels to button icons

* feat: add new feature metrics page

* refactor: remove prev feature metrics page

* refactor: use new metric boxes on overview page

* refactor: lazy-load the new metrics page

* refactor: fix type error when formatting unknown error

* refactor: extract interfaces for props

* refactor: destructure all props

* refactor: expand arg names

* refactor: reorg component dirs and files

* refactor: improve chart element label

* refactor: hide chart dots until hover

* refactor: add section titles to environments/applications

* refactor: simplify FeatureMetricsHours types

* refactor: sort chart tooltip items

* refactor: add more chart labels

* refactor: always show a dot in single point charts

* refactor: improve chart tooltip styles

* refactor: adjut metric page spacing

* refactor: decrease legend box size

* refactor: move date fmt fn inline

* refactor: improve chart legend styles

* refactor: increase Cypress timeouts

* refactor: sort environment and application chips

* refactor: format files

* refactor: use stable lists of apps and envs

* refactor: fix FeatureMetrics dir name

* refactor: avoid ScrollToTop on query string change

* refactor: use ConditionallyRender instead of inline condition

* refactor: use makeStyles instead of styled API
2022-02-21 13:47:54 +01:00
Youssef
31d6035316 feat: add baseUrl to tsconfig and update imports 2022-02-20 21:08:02 +01:00
olav
016633dae9 refactor: format files (#719)
* refactor: fix deprecated prettier config name

* refactor: add fmt scripts

* refactor: check fmt during CI

* refactor: format files
2022-02-18 09:51:10 +01:00
olav
46bf92124d refactor: remove unused code (#721) 2022-02-18 08:26:26 +01:00
Fredrik Strand Oseberg
dc5bd8dc0e Merge branch 'main' into fix/clear-query-params 2022-02-17 09:34:08 +01:00
olav
492435e1e4 refactor: restore search query string from localStorage (#715) 2022-02-17 09:19:01 +01:00
Youssef
b24456b5cf fix: clear query params when click cancel 2022-02-16 19:54:30 +01:00
olav
878f892c50 refactor: fix misc test feedback (#709)
* refactor: keep feature toggle name when changing project

* refactor: add missing permission button tooltip

* refactor: add success toast on toggle revival

* refactor: add success toast on stale toggle

* refactor: fix initial user role checkbox value

* refactor: remove duplicated error message

* refactor: fix change-password error parsing

* refactor: remove inaccurate edit toggle toast text

* refactor: truncate long names in project cards

* refactor: truncate long project name in title

* refactor: add ellipses to truncated strings

* refactor: swap truncateString with StringTruncator

* refactor: remove unnecessary truncation

* refactor: mark context fields as optional

* refactor: show all errors from tag type creation

* refactor: show all errors from strategy create/update

* refactor: filter out empty strategies on create/update

* refactor: add an edit button to the addons list

* refactor: add missing labels

* refactor: catch errors from toggling stale features
2022-02-15 10:57:57 +01:00
Youssef Khedher
b345ea45d7 Merge branch 'main' into fix/impression-data-label 2022-02-11 12:22:43 +01:00
Fredrik Strand Oseberg
c99decf5e0 remove: redux (#696)
* remove: redux

* fix: add sass back

* fix: update lock

* fix: remove fake access store import

'
2022-02-11 11:19:55 +01:00
Youssef
7fd2fef4be fix: update PR based on feedback 2022-02-11 11:13:51 +01:00
Youssef
ec9061586f fix: add label for the impression data 2022-02-11 09:34:34 +01:00
Fredrik Strand Oseberg
de8b3352e7 Fix/project select (#693)
* fix: remove container for ProjectSelect

* refactor: remove project store

* fix: update path
2022-02-10 23:45:30 +01:00
olav
213e8950d3 refactor: port login auth to TS/SWR (#680)
* refactor: allow existing tsc errors

* refactor: add missing component key

* refactor: port login auth to TS/SWR

* refactor: replace incorrect CREATE_TAG_TYPE with UPDATE_TAG_TYPE

* refactor: fix AccessProvider permission mocks

* refactor: add types to AccessContext

* refactor: fix file extension

* refactor: remove default export

* refactor: remove unused IAddedUser interface

* refactor: comment on the permissions prop

* refactor: split auth hooks

* feat: auth tests

* fix: setup separate e2e tests

* fix: naming

* fix: lint

* fix: spec path

* fix: missing store

* feat: add more tests

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-02-10 17:04:10 +01:00
Fredrik Strand Oseberg
608c82870b Fix/create feature validation (#692)
* fix: display error if bad request

* 4.7.2

* fix: resolve conflict
2022-02-10 14:33:12 +01:00
olav
93aa1ab8b8 refactor: add a MainTheme type (#686)
* refactor: add a MainTheme type

* refactor: use numbers for z-index values
2022-02-09 13:55:46 +01:00
olav
010f766de9 refactor: replace ts-ignore with ts-expect-error (#681)
* refactor: replace ts-ignore with ts-expect-error

* refactor: remove unused ts-expect-errors
2022-02-09 13:39:18 +01:00
olav
dd37100302 refactor: port unleash context to SWR (#683)
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-02-09 12:56:59 +01:00
olav
fee1894c34 refactor: port global settings to TS/hooks (#679)
* refactor: add ref support to PermissionSwitch

* refactor: port global settings to TS/hooks

* refactor: fix file extension

* refactor: format file

* refactor: fix inconsistent locationSettings prop

* refactor: use correct locationSettings hook

* refactor: use objects for settings hooks
2022-02-08 13:36:32 +01:00
Youssef Khedher
36f59b2290 fix: remove projectId from create feature form (#658)
* fix: remove projectId from create feature form

* fix: update link and fix componend header in edit mode

* fix: update url on project change

* fix: conflict

* fix: use shorthand

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-02-08 12:35:43 +01:00
olav
ff8d983d7e refactor: port FeatureToggleList to TS/SWR (#663)
* refactor: remove unused FeatureToggleListItemChip

* refactor: remove unused archive.module.scss

* refactor: remove unused ShowArchive route

* refactor: port FeatureToggleList to TS/SWR

* refactor: fix IUseFeaturesOutput interface prefix

* refactor: remove unnecessary pages files

* refactor: persist the features sort/filter state

* refactor: format files

* refactor: fix FeatureToggleListContainer file name

* refactor: fix arrow function syntax

* refactor: improve storage helper comments
2022-02-08 12:06:25 +01:00
olav
72acf2309c refactor: port EventHistory to TS/SWR (#669)
* refactor: port EventHistory to TS/SWR

* refactor: fix interface type prefix

* refactor: split useEvents and useFeatureEvents hooks

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-02-04 14:25:56 +01:00
Fredrik Strand Oseberg
18287cdbd0 Fix/cleanup unused code (#651)
* fix: remove unused context code

* fix: refactor users

* fix: rename delete user

* fix: rename frontend

* fix: update feature view path

* fix: cleanup create feature

* fix: cleanup feature views

* fix: cleanup feature strategies

* fix: update paths

* fix: remove unused strategy components

* fix strategies link

* fix: update snapshots

* fix: import paths

* fix: add name to useEffect dependency
2022-02-04 10:36:08 +01:00
Fredrik Strand Oseberg
7336bc3ef6 Fix/account for missing environments (#673)
* fix: add guards

* fix: remove console log

* fix: remove file

* fix: remove console log
2022-02-04 10:13:18 +01:00
Fredrik Oseberg
227511664b fix: text changes 2022-02-03 15:18:43 +01:00
Youssef Khedher
899a0f330e feat: add impressionData switch to create feature form (#639)
* feat: add impressionData switch to create feature form

* fix: update text

* fix: styling

* fix: conflict

* fix: update link

* fix: remove unused styles

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-02-03 12:39:43 +01:00
Ivar Conradi Østhus
9c3e300448 fix: viewers should be allowed to see strategy config (#645)
fixes #644
2022-01-29 15:18:11 +01:00
Youssef
8cbfefc47a fix: add autofocus to all new create-screens 2022-01-28 15:14:12 +01:00
Youssef Khedher
3488bb5fd6 fix: handle existing feature name (#641)
* fix: handle existing feature name

* refactor: change feature input order
2022-01-28 15:03:42 +01:00
Youssef
ee24cc813f fix: update snapshots 2022-01-28 12:08:47 +01:00
Fredrik Oseberg
e6ae8db442 fix: pnps 2022-01-28 10:51:48 +01:00
Fredrik Strand Oseberg
1d2bd717ee fix / environment-overview (#630)
* fix: icons

* fix: disabled link
2022-01-26 11:59:47 +01:00
Youssef Khedher
be3a26529a feat: update dialog to accept permissions (#627)
* feat: update dialog to accept permissions

* refactor: make dialog component accept permission button

* fix: remove unused dependencies

* fix: update button permissions

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-01-26 10:58:35 +01:00
Youssef
c6d5f4b278 fix: update testIds in the feature form 2022-01-24 23:05:11 +01:00
Fredrik Oseberg
d794fc4f5f fix: remove unused method 2022-01-24 15:45:55 +01:00
Fredrik Oseberg
3c1861590e fix: use target value 2022-01-24 15:45:01 +01:00
Fredrik Oseberg
8552a3340e fix: set current target 2022-01-24 15:45:01 +01:00
Fredrik Oseberg
8731177775 fix: add synthetic event 2022-01-24 15:45:01 +01:00
Fredrik Oseberg
125e7de91e fix: ts issues 2022-01-24 15:45:01 +01:00
Youssef
e5a9825871 fix: remove project list from edit component 2022-01-24 15:45:01 +01:00
Youssef
8c82a6bceb feat: create edit and creat feature screen 2022-01-24 15:44:59 +01:00
Youssef Khedher
624f1a84d2 feat: add dont show again when update prod env (#588)
* feat: add dont show again when update prod env

* fix: remove unused dependency

* fix: update key

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-01-17 12:39:10 +01:00
Youssef Khedher
b209368c84 feat: add create api token screen (NEW PR) (#600)
* feat: add create api token screen

* fix: update headers

* fix: remove old api create

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-01-17 11:56:53 +01:00
Youssef Khedher
182d566895 feat/rbac roles (#562)
* feat: create screen

* fix: import accordion summary

* feat: add accordions

* fix: add codebox

* feat: select permissions

* fix: permission checker

* fix: update permission checker

* feat: wire up role list

* fix: change icon color in project roles list

* fix: add color to icon in project roles

* add confirm dialog on role deletion

* feat: add created screen

* fix: cleanup

* fix: update access permissions

* fix: update admin panel

* feat: add edit screen

* fix: use color from palette and show toast when fails

* fix: refactor

* feat: validation

* feat: implement checked all

* fix: experimental toast

* fix: error handling

* fix: toast

* feat: unique name validation

* fix: update toasts

* fix: remove toast

* fix: reset flag

* fix: remove unused vars

* fix: update tests

* feat: add error icon for toast

* fix: replace wrong import for setToastData

* feat: Patch keying on ui to handle uniqueness for permissions across multiple envs

* fix: hasAccess handles *

* fix: update permission switch

* fix: use flag for environments rbac

* fix: do not include check all keys in payload

* fix: filter roles

* fix: account for new permissions in variants list

* fix: use effect on length property

* fix: set polling interval on user

* 4.5.0-beta.0

* fix: set initial permissions correctly to avoid race condition

* fix: handle activeEnvironment when it is null

* fix: remove unused imports

* fix: unused imports

* fix: Include missing project in hasAccess for deleteinng a tag

* fix: Move add/delete tag to use update feature permissions

* fix: use rest parameter

* fix: remove sandbox from scripts

* 4.6.0-beta.1

* fix: remove loading deduping

* fix: disable editing on builtin roles

* fix: check all

* fix: feature overview environment

* fix: refetch user on project create

* fix: update snaphots

* fix: frontend permissions

* fix: delete create confirm

* fix: remove unused permission

* 4.6.0-beta.4

* fix: update permissions

* fix: permissions

* fix: set error to string

* 4.6.0-beta.5

* fix: add permissions for project view

* fix: add permissions to useEffect deps

* fix: update permission for move feature toggle

* fix: add permissions data to useEffect

* fix: move settings

* fix: key on confetti

* fix: refetch project permissions on environment create/delete

* fix: optional coalescing error object

* fix: remove logging error

* fix: reorder disable importance in permissionbutton

* fix: add project roles to menu

* fix: add disabled check to revive

* fix: update snapshots

* fix: change text to select all

* fix: change text to select

* 4.6.0-beta.6

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
Co-authored-by: sighphyre <liquidwicked64@gmail.com>
2022-01-14 15:50:02 +01:00
Youssef Khedher
4f772ff2d1 feat: add strategies icons (#565)
* feat: add strategies icons with add strategy button

* fix: styling the icons

* feat: add styling for disabled button

* fix: adjust icons styling

* fix: add missing braces

* feat: remove badge from strategies icons

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-01-04 11:31:11 +01:00
Youssef
12128e9e33 feat: update metrics view in the accordion footer 2021-12-22 12:52:38 +01:00
Youssef Khedher
bc254af002 feat:new toggle screen view (#544)
* feat: change toggle view screen

* fix: revert changes for toggle status box

* fix: replace IconButton with PermissionButton and change edit icon color

* fix: change component header and replace pie chart icon in feature view

* feat: add strategies icons to accordion summary

* reverting to 9059f90 commit

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-12-10 12:04:02 +01:00
Youssef Khedher
e2a2944450 Merge branch 'master' into fix/environment-guidance 2021-12-09 00:37:53 +01:00
Youssef Khedher
31d88da08b feat: update health report (#541)
* fix: align styling with other pages

* feat: add last updat to heath report

* add feature status to last seen in health overview

* fix: add mobile style

* fix:add background color on table hover

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-12-07 13:17:32 +01:00
Youssef
93fb9fb66a fix: wrong environment name in strategy creation 2021-12-07 09:59:16 +01:00
Youssef
f4681a3883 fix: truncate environments names in project view 2021-12-06 22:43:23 +01:00
Youssef
580c22805a add strategy link to environment strategy dialog component 2021-12-06 22:13:28 +01:00
Youssef Khedher
c2b1645083 fix: truncate long environment name (#535)
* fix: truncate long environment name

* fix: truncate no strategies in NoItemsStrategies

* fix: open doc link in new tab

* fix: redirect to add new strategy view from overview tab

* fix: truncate environment name in create strategy header

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-12-06 22:13:28 +01:00
Youssef Khedher
d95400f7c2 fix: truncate long environment name (#535)
* fix: truncate long environment name

* fix: truncate no strategies in NoItemsStrategies

* fix: open doc link in new tab

* fix: redirect to add new strategy view from overview tab

* fix: truncate environment name in create strategy header

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-12-06 13:04:15 +01:00
Youssef
54d39882c3 create environment guidance dialog 2021-12-06 12:27:01 +01:00
Thomas Heartman
dd1ab1ca72 Autofocus dialog form fields, allow form submissions via pressing enter inside the form (#524)
* chore: add prettier as a dev dependency

The project has a .prettierrc, so seems to depend on that for its
formatting, but there was no prettier installed with the node modules.

* chore: add autofocus to all clearly defined first inputs on dialogs.

* fix: wrap the disable env input in a form and give it autofocus.

* fix: submit form when pressing enter

* fix: only autofocus the submit button if there is no other content.

When multiple (enabled) elements have the autofocus attribute, the
browser picks the last element in the tree. This means that if there
is a form with a text input with autofocus and a submit button with
autofocus, the button will win, causing the user to have to tab back up.

Only doing this if there are no children will cause some changes,
however:

Dialogs with textual children will no longer focus the accept-button
when appearing.

However, dialogs such as the create new api token dialog will give the
focus to the first input field instead of to the create button.

* fix: add formId prop to dialog element; adapt behavior

If the component receives a form id, it will treat the primary button
as the submit button for that form. To stop a full page reload, we
call the `preventDefault` on the submit event before calling the handler.

* chore: remove redundant spacing in component.

* fix: hook environment disable form up with the new form id system.

* chore: Update existing modal forms to pass in formId

* fix: Type the dialog event wrapper

* fix: change 'allows' => 'allow' because the noun is pluralized.

* fix: add autofocus to js add-tag-dialog-component.

I've got a feeling this component isn't in use anymore, though, as the
exact same text appears in a TS-version of this component.

* fix: add autofocus to add user form.

This seems to only be used as the main piece of a modal, so adding
autofocus seems pretty safe here, but I could be wrong.

* fix: Update snapshot test after changing wording.

* fix: add autofocus to update user form

* fix: add autofocus to the create toggle form.

This is a little besides the task's actual point. However! This form
is only ever used on the page where it's the only bit of content. I'd
argue that when the user navigates to this form, it's because they
want to create a feature. Thus, adding autofocus to the first field
makes a lot of sense to me.

* refactor: set button type to 'undefined' when it isn't 'submit'

This allows Material to use their default type based on whatever
heuristics they use. It's most likely going to be 'button' for the
foreseeable future, but in the event that they change it, passing
undefined instead should future-proof this a bit.

* fix: set type to button when formId is not present

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-11-29 15:18:12 +01:00
Youssef Khedher
165170cd5c fix/breadcrumb (#533)
* fix: remove features2 from breadcrumb

* fix: strategy names

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2021-11-29 14:29:58 +01:00
sighphyre
b85b326104 task: Add buttons for deleting/editing a constraint (#522)
* task: Add buttons for deleting/editing a constraint

* task: Improve look and feel of constraints buttons

- Make constraints fill their container
- Move constraint buttons to material ui buttons
- Move constraint buttons to top right of their container

* fix: adjust positioning

* fix: added project id to permissin button

* fix: add correct permission

* fix: update create feature path

Co-authored-by: Simon Hornby <simon@getunleash.ai>
Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2021-11-26 16:07:05 +01:00
sighphyre
3e53a64fcf fix: Remove edit click handler from variants list (#528)
Co-authored-by: Simon Hornby <simon@getunleash.ai>
2021-11-26 15:29:51 +01:00
Youssef Khedher
f2a85ebf79 fix/strategy tab (#519)
* fix: add the toggle switch inside the strategies list

* fix: styling strategy execution tab

* fix: remove visual execution from strategy tab

* fix: test fail on yarn build

* fix: add style for the strategy container

* fix: remove overlapping of switch

* fix: remove border from select strategy

* fix: remove borders and adjust icon rollout

* fix: use theme grey

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-11-26 13:36:04 +01:00
Simon Hornby
116a8e73f7 Merge branch 'master' into fix/variant-list-popup 2021-11-26 09:32:59 +02:00
Simon Hornby
e5c941c68d Fix variant list
- Fix an issue where clicking a variant in the list would popup a modal
dialog with empty details
2021-11-25 16:02:38 +02:00
Christopher Kolstad
83443627d9 feat: Use new Variants API (#518)
* feat: Use new Variants API

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-11-25 14:05:44 +01:00
Fredrik Strand Oseberg
dd2b661928 Merge branch 'master' into fix/search-field 2021-11-24 14:43:01 +01:00
Fredrik Strand Oseberg
36fcac7178 Fix/project view desc (#515)
* fix: rollout icon and disabled state

* fix: mobile position

* refactor: move into style file

* fix: description box for projects

* fix: icon placement

* fix: icon

* fix: mobile project view

* fix: add style file to disabled indicator

* fix: hide icon on mobile

* fix: description

* fix: remove project logo
2021-11-24 14:36:21 +01:00
Youssef
64aa5bde06 fix: clear search input on route change 2021-11-24 11:41:43 +01:00
Fredrik Strand Oseberg
47bfda1f7b fix: constraints scrollbars (#504) 2021-11-22 11:32:43 +01:00
Fredrik Strand Oseberg
1dd6e1d65c fix: mobile percentagecircle (#502) 2021-11-12 12:41:36 +01:00
Fredrik Strand Oseberg
3465f4c664 fix: status chip (#501) 2021-11-12 12:02:47 +01:00
Fredrik Strand Oseberg
c0da8ed6bc Feat/new toggle overview (#497)
* feat: toggle overview accordions

* feat: accordion metrics

* feat: result

* add permission button

* fix: remove feature environment container from strategies tab

* chore: delete unused code

* fix: remove console log

* fix: remove unused code

* fix: cleanup

* fix: refactor

* fix: add empty states

* fix: loading

* feat: mobile accordions

* fix: button

* fix: strategies

* fix: cleanup

* fix: remove unused params

* fix: strategy button container

* fix: alter gradual rollout id

* fix: update userid strategy item

* fix: string truncator

* fix: strategy link

* fix: strategies tab

* fix: remove unused imports

* fix: visual improvements

* fix: add border
2021-11-12 11:47:19 +01:00
Youssef
8d38b5cd7f fix: rename isProjectDeleted to projectExists and add PermissionIconButton 2021-11-08 10:22:37 +01:00
Youssef
64481e9c51 update snapshots 2021-11-05 23:35:44 +01:00
Youssef
9cc1e56f13 fix: disable revive feature when project is deleted 2021-11-05 23:21:21 +01:00
Youssef
1e47975dc8 use useProjects to check if project deleted or not 2021-11-05 10:14:52 +01:00
Youssef
7d2ea9407c fix: remove typo from UI 2021-11-05 09:19:07 +01:00
Youssef Khedher
e839155f48 Fix/strategy sidepanel (#479)
* make addButton color white when hover on strategy card

* fix: change arrow in side panel

* make sidepanel button responsive

* add ellipse to icons in sidepanel

* remove important property from css

* remove ellipse from disabled icons

* fix navigation with tab for features list in project view

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-11-04 14:40:09 +01:00
Youssef
0ad287f383 use color from palette and add highlight feat for other components 2021-11-01 23:43:55 +01:00
Youssef
3e07c4f989 add highlight to table rows for features 2021-11-01 14:28:44 +01:00
Youssef Khedher
81b82c368a update text in the drop area (#482) 2021-11-01 12:03:15 +01:00
Youssef Khedher
3ba502a3c7 fix: remove semicolon from component (#480) 2021-10-29 21:14:38 +02:00
Youssef Khedher
ed6efff643 Fix/variants: Fix delete one variant + remove switch when add first variant (#466)
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2021-10-28 13:32:29 +02:00
Youssef Khedher
d599cc55e4 make addButton color white when hover on strategy card (#467)
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-10-27 17:22:23 +02:00
Ivar Conradi Østhus
2c56f89bf2 fix: update link to environment-docs 2021-10-26 12:48:56 +02:00
Youssef Khedher
35670db919 edit project mismatch dialog and remove change button (#465)
* edit project mismatch dialog and remove change button

* add info test to solve mismatch
2021-10-25 12:47:15 +02:00
Fredrik Strand Oseberg
13884db360 Fix/cache (#461)
* fix: set strategy cache when mounting

* fix: add permission button

* fix: add permission button for discard

* fix: button type

* fix: unused imports

* fix: move setDirty

* fix: add clone deep
2021-10-22 13:38:36 +02:00
Youssef Khedher
cb0735a7a3 Merge branch 'master' into fix/clone-toggle-crash 2021-10-22 09:48:19 +01:00
Fredrik Oseberg
6a8cc1adf5 fix: pie size 2021-10-22 10:45:43 +02:00
Youssef Khedher
5e7c692e9c Merge branch 'master' into fix/clone-toggle-crash 2021-10-21 22:22:34 +01:00
Youssef
f2879cea79 disable clone button based on role in old view 2021-10-21 22:03:38 +01:00
Christopher Kolstad
83ad4041bf fix: Adds PermissionSwitch (#456)
- This adds a generic way to control permission to mutations in the same
  way as our PermissionButton and PermissionIconButton already does the
  same.

- This also switches the StrategiesList to use PermissionIconButton so
  users without ADMIN role do not believe they can deprecate/reactivate
  strategies.
2021-10-21 13:25:39 +02:00
Ivar Conradi Østhus
0ddd52a8ba fix: adjust tooltip for toggle type 2021-10-21 10:41:46 +02:00
Fredrik Strand Oseberg
fea7707551 fix: use path parameter for old ft view (#450)
* fix: use path parameter for old ft view

* fix: update snapshots

* fix: change text

* fix: add permission button to initial strategies view

* fix: remove unused imports
2021-10-21 09:50:58 +02:00
Fredrik Oseberg
c763b80569 fix: style import 2021-10-20 13:40:08 +02:00
Fredrik Oseberg
5d48ce3f03 fix: margin 2021-10-20 13:21:39 +02:00
Ivar Conradi Østhus
03230fcff9 fix: failing unit tests 2021-10-20 13:20:10 +02:00
Fredrik Oseberg
73861b0f2e fix: metrics styling 2021-10-20 13:18:33 +02:00
Fredrik Oseberg
37d04b56ba fix: scale metrics 2021-10-20 13:15:32 +02:00
Youssef Khedher
2bce93a51b Fix: improve create new feature v2 (#441) 2021-10-20 13:12:48 +02:00
Fredrik Strand Oseberg
48bae48ee0 fix: style metrics view (#448) 2021-10-20 12:55:40 +02:00
Fredrik Strand Oseberg
57928d50c6 Fix/environment list sorting (#447)
* fix: wait for api call before refetching

* fix: set active environment from feature instead of cache

* fix: remove console logs

* fix: add permission icon button to project card

* fix: remove project button

* fix: empty tooltip if it is not passed

* fix: add refresh interval

* fix: permission buttons

* fix: project permission buttons

* fix: remove unused imports

* fix: add projectId
2021-10-20 12:05:44 +02:00
Youssef Khedher
3dc7f22aaa fix switch toggle for envs after update + update link for health overview (#446)
* fix switch toggle for envs after update

* fix: React hook missing dependency error
2021-10-19 15:38:20 +02:00
Fredrik Strand Oseberg
005daa3740 Fix/login redirect (#442)
* fix: use swr with login

* fix: remove metrics poller

* fix: do not allow retry on 401

* fix: create swr provider

* fix: move accessprovider

* fix: remove metrics poller test

* fix: hide password auth if disableDefault is set

* Update src/component/project/ProjectList/ProjectList.tsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

* fix: console log

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-10-19 13:08:25 +02:00
Christopher Kolstad
ea2086a7f4 Mutate cache key for project when archiving feature. (#444)
* Use useProject hook directly instead of mutating on cache key
2021-10-19 12:36:51 +02:00
Youssef
bdc4b3cf7a fix: truncate link in body and in breadcrumb 2021-10-15 16:27:55 +02:00
Youssef
b5072928b3 fix:handle non-existing feature toggle 2021-10-15 16:27:54 +02:00
Ivar Conradi Østhus
edd6706ffe fix: new create toggle page 2021-10-15 14:16:17 +02:00
Christopher Kolstad
58ff86e3bd Use div and flexbox instead of grid for metrics tab 2021-10-15 13:30:16 +02:00
Youssef Khedher
a9d46d4ce6 fix: show side bar and disable drag and add strategy based on permissions (#426)
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-10-15 13:20:07 +02:00
Ivar Conradi Østhus
95221e7b6b fix: adjust env switch a bit 2021-10-15 12:49:14 +02:00
Christopher Kolstad
e9a63197cf fix: grids needs containers and items 2021-10-15 12:26:50 +02:00
Christopher Kolstad
3f7e43c599 Revert "Use V flag for new metrics component"
This reverts commit 566539727d.
2021-10-15 12:03:07 +02:00
Christopher Kolstad
566539727d Use V flag for new metrics component 2021-10-15 12:00:11 +02:00
Christopher Kolstad
cce0a7d465 Don't print 'Seen in application' on metrics tab 2021-10-15 11:56:44 +02:00
Ivar Conradi Østhus
d42d412bc8 fix: make toggle list sortable inside a project (#436)
* fix: make toggle list sortable inside a project

* fix: minor cleanup
2021-10-15 11:20:14 +02:00
Christopher Kolstad
4230fc98ed Feat/new metrics tab (#432)
* New metric tab if environment flag is active

* Prepare new metrics tab - need styling help!!
2021-10-15 10:05:10 +02:00
Christopher Kolstad
166c6fef0e Write a generic http thrower for status > 299 (#405)
* Write a generic http thrower for status > 299

* Perform location reload if user is no longer authorized, i.e if status === 401
2021-10-15 09:21:38 +02:00
Ivar Conradi Østhus
1058b4049c fix: envrionments should give understandable error if not possible to… (#433) 2021-10-14 19:58:57 +02:00
Youssef Khedher
bbf06725a3 fix: add ? to handle undefined for currentEnv (#431) 2021-10-14 19:49:58 +02:00
Ivar Conradi Østhus
9ad2c8f7ff fix: link to toggle view 2021-10-14 11:01:22 +02:00
Christopher Kolstad
8df225601b We know that it's since the full hour 2021-10-13 12:49:22 +02:00
Christopher Kolstad
8a9dc32bad Create hook for fetching featureMetrics (#414)
* Create hook for fetching featureMetrics
2021-10-13 10:20:34 +02:00
Ivar Conradi Østhus
cb35d73135 fix: archive should not allow viewing additional details about toggle 2021-10-12 14:18:10 +02:00
Youssef Khedher
2990fc180a fix: disable delete button tag (#413) 2021-10-12 13:06:37 +02:00
Youssef Khedher
e0250b6795 Merge branch 'master' into fix/scroll-to-top 2021-10-12 09:55:19 +01:00
Youssef Khedher
ff6affdae5 Merge branch 'master' into fix/reload-tabs 2021-10-12 09:09:25 +01:00
Youssef
cdd14206b7 fix copy link path 2021-10-12 06:11:02 +01:00
Youssef Khedher
bb8f00ea36 fix variant switch not showing correct state (#409)
* fix variant switch not showing correct state

* remove console log
2021-10-11 23:23:32 +02:00
Ivar Conradi Østhus
a6f2c332f8 fix: show feature toggle type in list (#418)
We should show the feature toggle type in all list of toggles.

Also cleaned up mobile view.
2021-10-11 22:45:59 +02:00
Christopher Kolstad
31f8b46cd2 disabled property needs to be a boolean 2021-10-11 15:14:33 +02:00
Christopher Kolstad
55c9c9a2e0 fix: Ensure Object.keys always gets an object 2021-10-11 15:11:13 +02:00
Youssef
aff77e1531 fix scroll-top when create strategy 2021-10-11 11:41:57 +01:00
Youssef
0fa46e00f7 fix copy button link 2021-10-11 11:03:37 +01:00
Fredrik Strand Oseberg
7da3573edb Feat/visual enhancements (#404)
* fix: stale style

* fix: execution plan styling

* fix: paths

* fix: remove console logs

* fix: snapshots

* fix: add comma

* fix: update snapshots
2021-10-08 16:19:06 +02:00
Ivar Conradi Østhus
6fc30d3a79 feat: add feature status (#403)
* feat: add feature status

* fix: use feature status in project feature list

* fix: text size

* fix: project view

* fix: padding

* fix: lint

* fix: snapshots

* fix: text size

* fix: snapshots

* fix: size

* fix: revert size

* fix: update snapshots

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2021-10-08 15:18:43 +02:00
Ivar Conradi Østhus
7406cbbaa7 fix: add clone feature toggle via API 2021-10-08 13:47:17 +02:00
Fredrik Strand Oseberg
37b818fce4 Feat/feature toggle view tags (#399)
* feat: new tags

* feat: archive

* wip: variants

* add support for deletion, variable/fixed weight toggle and weight editing

* Add confirmation dialogue for deleting variants

* feat: settings

* fix: recalculate on project name change

* feat: feature environment metrics

* feat: environment

* Add toggle for stale

* fix: refetch on create strategy

* fix: lint

* fix: update snapshots

* fix: add link to icon button

* fix: revert test user

* fix: increase size!

* fix: use permission attr for ResponsiveButton

* fix: dev dependency

* fix: theme

* fix: stale style

* Update src/component/feature/FeatureView2/FeatureSettings/FeatureSettingsMetadata/FeatureTypeSelect/FeatureTypeSelect.tsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

* Update src/component/feature/FeatureView2/FeatureVariants/FeatureVariantsList/FeatureVariantsList.tsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

* Update src/component/feature/FeatureView2/FeatureVariants/FeatureVariantsList/FeatureVariantsListItem/useDeleteVariantMarkup.tsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Christopher Kolstad <git@chriswk.no>
2021-10-08 11:23:29 +02:00
renovate[bot]
14ee56d914 chore(deps): update material-ui monorepo (#371)
* chore(deps): update material-ui monorepo

* fix: test snapshots and deprecation warnings

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-10-07 10:53:47 +02:00
Ivar Conradi Østhus
10fa0fd908 fix: remove console.log 2021-10-06 12:37:41 +02:00
Ivar Conradi Østhus
0dd3ada1ee fix: render new link if enabled 2021-10-01 19:38:34 +02:00
Fredrik Strand Oseberg
47579e2616 Feat/toggle view (#389)
* feat: toggle view

* fix: navigation

* eat: toggle view

* fix: resolve lint

* fix: remove console logs

* fix: reimplement feature validation
2021-10-01 13:49:18 +02:00
Ivar Conradi Østhus
fe2a8311bf feat: created project header (#388)
* feat: created project header

* fix: remove reporting from global menu

* fix: add projects to global menu for oss also
2021-10-01 12:15:02 +02:00
Fredrik Strand Oseberg
87414c1c9c feat: e2e tests and mobile views (#348)
* fix: add sidebar button

* fix: set absolute positioned sidebar button

* feat: test setup

* fix: add tests for adding strategy

* fix: add delete  strategy test

* feat: add workflow

* feat: add vercel token

* fix: update project id

* fix: increase sleep

* fix: sleep

* fix: vercel

* fix: typo

* fix: vercel preview url action

* fix: yml formatting

* fix: steps

* fix: format

* fix: runs on

* fix: team id

* fix: teamid

* fix: add workflow

* fix: remove unused import

* fix: add token

* fix: add configuration

* fix: set env variables

* fix: use with

* feat: main navigation routes

* feat: mobile views

* fix: change spec name

* fix: update cypress project id

* fix: add record key

* fix: button positioning

* feat: permissions

* fix: custom strategy

* fix: remove unused action yml

* fix: update yarn lock

* fix: keys

* fix: remove videos and screenshots

* fix: add cyrpess folders to gitignore

* fix: env variable
2021-09-30 11:44:30 +02:00
Christopher Kolstad
baa54d31f2 task: remove display name from environment (#367) 2021-09-29 16:00:02 +02:00
Fredrik Strand Oseberg
27988e4b30 Feat/environment strategies (#339)
* feat: strategies list

* feat: dnd

* fix: resolve reference issues

* feat: configure strategy wip

* feat: rearrange list

* feat: add debounce and execution plan

* feat: add separator

* feat: update strategy

* fix: feature strategy accordion key

* fix: localize parameter update logic

* feat: ts conversion

* fix: perf issues

* feat: production guard

* fix: clean up environment list

* fix: implement markup hooks for environment list

* feat: wip constraints

* fix: handle nested data structure reference issue

* fix: clone deep on child props

* fix: remove constraints check

* fix: revert to strategies length

* fix: refactor useFeature

* feat: cache revalidation

* fix: set correct starting tab

* fix: reset params on adding new strategy

* fix: refactor to use useSWR instead of local cache

* fix: check dirty directly from new params

* fix: dialogue ts

* fix: Clean-up typescript warnings

* fix: some more typescript nits

* feat: strategy execution

* feat: strategy execution for environment

* fix: refactor execution separator

* fix: remove unused property

* fix: add header

* fix: 0 value for rollout

* fix: update snapshots

* fix: remove empty deps

* fix: use constant for env type

* fix: use default for useFeatureStrategy

* fix: update snapshot

* Update src/component/feature/FeatureView2/FeatureStrategies/FeatureStrategiesEnvironments/FeatureStrategiesEnvironmentList/useDeleteStrategyMarkup.tsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

* Update src/component/feature/FeatureView2/FeatureStrategies/FeatureStrategyExecution/FeatureStrategyExecution.tsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

* Update src/component/feature/strategy/EditStrategyModal/general-strategy.jsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: UnleashTeam <79193084+UnleashTeam@users.noreply.github.com>
2021-09-27 13:35:32 +02:00
Fredrik Strand Oseberg
34df8617d2 Fix/strategy permissions (#337)
* fix: only show actions if applicable to the current user

* fix: remove API access from admin settings

* fix: update snapshot
2021-09-20 16:59:04 +02:00
Fredrik Strand Oseberg
92f3f8af08 Feat/environment crud (#335)
* feat: add env

* fix: create environment form

* feat: create environment

* feat: add deletion protection

* fix: lift up state

* feat: add ability to update environment

* fix: remove env reset

* fix: remove link

* feat: add drag and drop sorting

* fix: remove unused imports

* feat: add methods to toggle env on/off

* feat: only make api call on drop

* fix: disabled text

* fix: add disabled indicator

* fix: add edit env payload

* fix: add E flag

* fix: cleanup

* fix: update snapshots

* fix: remove useFeature

* fix: change property to errorText

* fix: update tests

* fix: change menu

* fix: update snapshots

* feat: toggle view v2

* fix: handle error on sort order api call

* fix: remove unused import

* fix: useFeature

* fix: update tests

* fix: console logs

* fix: use try catch

* fix: update snapshots
2021-09-14 14:20:23 +02:00
Fredrik Strand Oseberg
44ff61ab99 fix: sync (#334) 2021-09-01 13:22:53 +02:00
Fredrik Strand Oseberg
f04ed138ed Fix/create feature (#332)
* fix: ensure constraints exists before running check

* fix: project select

* fix: add zIndex to toast starting position

* fix: lint

* fix: hide project select in oss
2021-08-30 14:26:53 +02:00
Fredrik Oseberg
b22590600e fix: update constraint text field 2021-08-27 13:43:28 +02:00
Fredrik Strand Oseberg
e0f7a78833 Fix/minor 41 bugs (#329)
* fix: bigger buttons

* feat: dialogue on strategies

* fix: constraint errors

* fix: add constraint button

* fix: variant dialogue size

* fix: remove commented code

* fix: remove unused imports

* fix: change xs to int

* fix: verify constraint config before saving strategy

* fix: reset error when context field is removed

* fix: preserve previous state when updating

* fix: disable lint for useEffect

* fix: update snapshots
2021-08-27 13:18:11 +02:00
Ivar Conradi Østhus
d3fcd19797 fix: should not show deprecated strategies 2021-08-26 19:44:04 +02:00
Fredrik Strand Oseberg
260cec68f3 fix: add feature toggles and projects to mobile navigation (#328)
* fix: add feature toggles and projects to mobile navigation

* fix: update mobile navigation
2021-08-26 09:43:55 +02:00
Fredrik Strand Oseberg
728477e238 Feat/feature routes (#327)
* fix: setup new routes

* fix: copy toggle

* fix: link to correct project

* fix: redirect oss to default

* fix: update tests

* fix: edit path

* fix: remove invalid property

* fix: add project to test data

* fix: update paths to use features

* fix: update test data

* fix: update snapshots

* fix: only show button to add toggle if you have access

* fix: change heading

* fix: use new route

* fix: archive view

* fix: update snapshots

* fix: sorting headers

* fix: list headers

* fix: only show span if revive is present

* fix: add border to list

* fix: update snapshots

* fix: remove console log
2021-08-25 13:37:22 +02:00
Fredrik Strand Oseberg
b83418f410 Fix/routing (#325)
* fix: filter routes

* fix: add archive link to feature toggles list

* fix: strategy card name

* fix: add breadcrumb keys

* fix: update tests

* fix: menu placement

* fix: remove dot

* fix: handle 401 error

* fix: add important to styles

* fix: adjust positioning

* fix: remove unused imports
2021-08-19 13:54:28 +02:00
Fredrik Strand Oseberg
dc9d16b238 Fix/frontend projects changes (#324)
* fix: remove mouseover from navigation menu

* fix: variant tooltip

* fix: project creation navigation
2021-08-13 10:57:46 +02:00
Ivar Conradi Østhus
ae38000cf7 Fix/make sure stickiness exists (#320)
* chore: update changelog

* 4.1.0-beta.1

* fix: Project filter was trying to filter based on full project object

* 4.0.6

* fix: add user to archived toggle view

* fix: remove console log

* 4.0.7

* 4.0.8

* fix: make sure the index we're trying to access exists

* fix: load fonts from google, fallback to system fonts

* fix: snapshot

* 4.0.10

* fix: update package json

* fix update fonts

* fix: remove custom font family for archive

* fix: update snapshot

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-08-11 13:34:39 +02:00
Fredrik Strand Oseberg
cad5e1a01b Load name from url (#323)
* fix: changed loadNameFromHash to loadNameFromUrl

Co-authored-by: Shane A. Stillwell <shane@northernv.com>
2021-08-11 11:43:31 +02:00
Ivar Conradi Østhus
f168761c01 fix: variant stickiness should not revert to default when updating (#318) 2021-07-21 09:04:50 +02:00
Fredrik Strand Oseberg
1a63d91f95 Feat/new navigation (#314)
* feat: change color scheme

* feat: add navigation menu

* fix: add bg image

* fix: add archive and strategies to navigation

* fix: round corners

* feat: mobile view project details

* feat: mobile view navigation

* fix: only show menu if user is admin

* fix: rename navigation

* fix: only render relevant routes for oss context

* feat: add project actions

* feat: add icons

* feat: add breadcrumbs

* fix: place breadcrumbs absolutely

* fix: adjust breadcrumbs

* fix: toast

* fix: cleanup

* fix login

* fix: breadcrumbs

* fix: add billing link

* fix: links

* fix: feature view

* fix: path to go back

* fix: remove default value

* fix: remove unused imports

* refactor: delete outdated test

* fix: add item to filter in breadcrumb

* fix: remove console log
2021-07-16 15:41:54 +02:00
Fredrik Strand Oseberg
1c2381d9a0 fix: run use effect when value changes, not object (#315)
* fix: run use effect when value changes, not object

* fix: add user to archived toggle view

* fix: remove console log
2021-07-16 11:21:53 +02:00
Fredrik Strand Oseberg
85a7c55fdf Feat/group by projects (#308)
This PR adds support for projects as a first class citizen, and toggling features on in different environments.
2021-07-07 11:04:36 +02:00
Fredrik Strand Oseberg
10eabb366f Offline mode (#312)
* move all icons to offline mode

* Reorder imports

* revert yarn.lock to original

* resolve errors

* use ConditionalRender, revert material icon css

* add all other font weights

* fix: add library icon

Co-authored-by: Aneesh Relan <aneesh.r@lucideustech.com>
2021-06-29 10:21:54 +02:00
Fredrik Strand Oseberg
7fddf04398 Feat/pnps (#306)
* feat: animation

* feat: setup api calls

* feat: try catch

* feat: refetch user

* fix: remove unused variables

* fix: call hideFeedback

* fix: return expression
2021-06-07 10:29:08 +02:00
Fredrik Strand Oseberg
a17e2f29b2 Fix/customer journey patches (#304)
* fix: logo

* fix: move proclamation show logic to useEffect

* fix: add spacing on strategy headers

* fix: add role sorting
2021-06-07 10:15:30 +02:00
Fredrik Strand Oseberg
cbd4773cf6 Fix/customer journey (#297)
* fix: add onClose to archive toggle dialoge

* fix: add link to ConfirmUserLink component

* fix: remove icons from admin menu

* fix: move button on user list to top right

* refactor: move add new api key to header

* refactor: button order

* fix: lowercase dropdown buttons on feature toggle list

* refactor: reorganize reporting dashboard

* refactor: consistent buttons

* feat: enhance gradual rollout strategy creation

* feat: ui tweaks on project access

* fix: adjust divider

* fix: remove unused imports

* fix: update snapshots

* fix: add auth options to new user page

* fix: add divider

* fix: uncontrolled input

* fix: add data-loading to sorted by

* fix: update snapshots

* fix: navigate to project view on create and edit

* fix: rename project

* fix: add placeholder for feature toggle list component

* fix: conditonally render link
2021-05-18 12:59:48 +02:00
Fredrik Strand Oseberg
f585dcb2d7 fix: import correct component container (#296) 2021-05-12 12:30:54 +02:00
Fredrik Strand Oseberg
2f1848f6fd Fix/feedback on create (#292)
* fix: copy feature toggle instead of setting newVariants on the reference

* fix: remove console log

* fix: update messages

* fix: give feedback on strategy actions

* fix: do not allow feature toggle to be created with empty name

* fix: disable delete if only one strategy is applied

* fix: archive view

* fix: set name field on add variant required

* fix: set required on feature toggle name
2021-05-10 13:22:22 +02:00
Ivar Conradi Østhus
15ef4606b7 fix: support custom stickiness for flexible strategies 2021-05-07 09:36:15 +02:00
Fredrik Strand Oseberg
cc54fad3a4 Fix/console warn (#290)
* fix: resolve uncontrolled autocomplete

* fix: return if no strategy is present

* fix: change logic for retrieving context index

* fix: remove prop types from UserList

* fix: add default to api key name input

* fix: remove raised property from button
2021-05-07 08:42:51 +02:00
Fredrik Strand Oseberg
ad09c4039a Fix/strategy constraints (#289)
* fix: only update editable strategies if index is less than 0

* fix: add wdyr

* fix: set tracking to false as default

* chore: update readme
2021-05-07 08:31:25 +02:00
Ivar Conradi Østhus
6db15076e3 fix: tiny margin for feature toggle list item 2021-05-05 22:11:39 +02:00
Ivar Conradi Østhus
b7cea5e314 fix: should be allowed to create toggles without errors 2021-05-05 22:06:55 +02:00
Fredrik Strand Oseberg
8d525ac477 Fix: jumping screen (#288)
* fix: add overflow-y scroll to html

* fix: add tab exceptions to scroll to top

* fix: remove unused imports
2021-05-05 21:51:04 +02:00
Fredrik Strand Oseberg
9b1a07c5ab Fix/v4 corrections (#287)
* fix: remove project display check

* fix: refetch bootstrap on user change

* fix: remove console log

* fix: update test

* fix: do not allow submit if errors exists

* fix: do not allow strategies to redirect home when name is taken
2021-05-05 14:17:25 +02:00
Ivar Conradi Østhus
3f5992902d fix: constraints array can be undefined 2021-05-04 21:50:06 +02:00
Fredrik Strand Oseberg
e8de5bd816 Fix/strategy constraints (#283)
* feat: redesign strategy cards

* fix: add version check to constraints

* fix: use flags

* fix: update icon and add tooltips

* fix: remove console logs

Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-05-04 21:25:06 +02:00
Fredrik Strand Oseberg
f0d6e45361 Feat/bootstrap (#281)
* feat: add bootstrap endpoint redux integration

* fix: remove useEffect from app

* feat: add path provider

* feat: browser router

* fix: delete path formatter

* fix: return absolute path if no basepath

* fix: format seenURI

* feat: get bootstrap uri from html

* fix: remove unused imports

* fix: remove initial loading call

* fix: wrap logout in formatApiPath

* feat: import logo

* feat: remove accessor from receiveConfig

* fix: update tests

* fix: update asset paths

* fix: remove data from app

* fix: revert moving access provider

* fix: remove build watch

* fix: remove console logs

* fix: update asset paths

* fix: remove path logic from base64

* fix: remove unused import

* set uiconfig

* change notification text

* fix: match uiConfig with expected format

* feat: add proclamation

* fix: move proclamation

* fix: remove unused imports

* fix: add target _blank

* fix: allow optional toast

* fix: return empty string if default value is present

* fix: set basepath to empty string if it matches default
2021-05-04 09:59:42 +02:00
Fredrik Oseberg
d7e6219070 fix: only get legalValues if definition exists 2021-04-28 18:09:37 +02:00
Fredrik Strand Oseberg
8d003da400 Fix/variants (#278)
* fix: use autocomplete for legal values

* fix: use flag to toggle overrides

* fix: use legalvalues directly

* fix: tests

* Update src/component/feature/variant/__tests__/update-variant-component-test.jsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

* Update src/component/feature/variant/AddVariant/AddVariant.jsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

* fix: tests

* fix: remove flag for overrides

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-04-28 14:58:53 +02:00
Fredrik Strand Oseberg
f8e34d53ff Fix/bugfixes (#279)
* fix: add try catch to copy

* fix: show constraints on default strategy

* fix: require name to submit context field

* fix: require name and project id to be set in order to create a project

* fix: change documentation icon

* fix: only validate unique names on create

* Update src/component/context/form-context-component.jsx

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-04-28 14:27:25 +02:00
Fredrik Strand Oseberg
1f46d3b21b Fix/cleanup (#276)
* chore: update changelog

* 4.0.0-alpha.10

* fix: add dnd provider as top level wrapper

* fix: add forgotten password link to password auth

* fix: remove unecceesary dnd component

* fix: check for usedTokenError
2021-04-27 09:48:00 +02:00
Fredrik Strand Oseberg
b9f5585c62 Fix/optimizations (#275)
* chore: update changelog

* feat: login mobile view

* fix: lists

* fix: colors

* fix: resolve merge conflict

* fix: tests

* fix: set defualt location object

* fix: don't check password before length exceeds 2

* fix: check length
2021-04-23 15:21:24 +02:00
Fredrik Strand Oseberg
05334337c2 Feat/user profile (#274)
* chore: update changelog

* feat: user profile

* feat: onOutsideClick hook

* feat: tune user profile

* fix: refactor to button

* feat: mobile view

* fix: update tests

* feat: add link to docs
2021-04-23 13:49:42 +02:00
Fredrik Strand Oseberg
0ca753e7e5 Feat/add new user (#273)
* chore: update changelog

* chore: update changelog

* fix: refactor AddUser

* feat: add screens for email and copy

* fix: remove interface

* fix: admin constant in userlist

* chore: fix changelog

* feat: user data fetching with useSWR

* feat: flesh out dialogues

* fix: remove useRequest

* refactor: remove redux for user admin

* refactor: remove from store

* refactor: userListItem

* fix: change type

* feat: add initial loading

* fix: useLayoutEffeect in useLoading

* fix: remove useEffect

* fix: update snapshots

* fix: remove status code

* fix: remove roles from store
2021-04-23 10:59:11 +02:00
Ivar Conradi Østhus
f669f96d49 wip: frontend should understand rbac permissions (#269)
* chore: update changelog

* 4.0.0-alpha.4

* wip: frontend should understand rbac permissions

* move all feature components to hasAccess

* fix: remove all change permissions

* fix all the tests

* fix all the tests x2

* fix snapshot for node 12

* fine tune perms a bit

* refactor: rewrite to ts

* refactor: use admin constant

* fix: import

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2021-04-20 19:13:31 +02:00
Fredrik Strand Oseberg
3bf9bd73ae Fix/overall bugs (#271)
* fix: reporting

* fix: center icon

* fix: paths in featureview

* fix: revert path in passwordauth

* fix: remove console log
2021-04-20 16:22:23 +02:00
Fredrik Strand Oseberg
524936912d Feat/user flow (#267)
* feat: add new user page

* feat: passwordchecker

* fix: remove loading

* feat: reset password

* fix: move swr to devDeps

* feat: generate reset link

* feat: add reset password form

* fix: remove console log

* fix: rename to forgotten password

* feat: add simple menu

* fix: change password checker title

* fix: change text in new-user view

* fix: lint errors

* fix: add status code to constants

* fix: comment

* fix: add classes for new user component

* fix: tests

* fix: remove console log

* fix: remove retry method

* fix: invalid token constant

* fix: remove console log

* fix: dependency array on useCallback

* fix: featureview

* fix: redirect on authenticated

* refactor: progresswheel

* fix: lint deps
2021-04-19 10:55:15 +02:00
Ivar Conradi Østhus
3cca2513fb fix: small description for toggles 2021-04-16 12:59:36 +02:00
Fredrik Strand Oseberg
86631b53c9 Fix/material UI cleanup (#264)
* fix: strategy dialogue

* fix: fontweight dropdown

* fix: eventlog padding

* refactor: history

* refactor: use material ui styling conventions for history

* refactor: add empty state for features

* refactor: variant dialog

* refactor: delete unused variant config

* fix: variant typography

* fix: remove unused styles file

* fix: footer

* feat: protected routes

* fix: rename app

* fix: remove console log

* fix: convert app to typescript

* fix: add standalone login screen

* fix: cleanup

* fix: add theme colors for login

* fix: update tests

* fix: swap route with ProtectedRoute

* fix: remove unused redirect

* fix: use redirect to correctly setup breadcrumbs

* refactor: isUnauthorized

* fix: reset loading count on logout

* fix: create a more comprehensive auth check

* feat: add unleash logo
2021-04-12 15:04:03 +02:00
Fredrik Oseberg
45bce4576d fix: remove editableStrategies from useEffect deps 2021-04-07 09:26:34 +02:00
Christopher Kolstad
22795e251f Migrate to create-react-app and react-scripts (#263)
* Setup create-react-app and typescript

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2021-04-07 09:04:48 +02:00
Fredrik Strand Oseberg
b5917515d2 fix: delete strategy (#262) 2021-03-30 15:49:03 +02:00
Fredrik Strand Oseberg
dbed06f300 Feat/material UI (#250)
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Christopher Kolstad <git@chriswk.no>
2021-03-30 15:14:02 +02:00
Ivar Conradi Østhus
9ed4e08cd4 fix: lint error 2021-03-11 16:11:49 +01:00
Ivar Conradi Østhus
24d9bb03b1 fix: should fetch projects once to make sure we know about projects 2021-03-11 16:07:26 +01:00
Fredrik Strand Oseberg
10d95c36e0 fix: metrics invalid date (#248)
* fix: lint

* refactor: return fetch from create

* fix: lint

* fix: change name from featureToggle to createdToggle
2021-03-05 11:33:58 +01:00
Fredrik Strand Oseberg
e1078ef822 fix: content-min-height
* fix: add min height calculation based on footer and header height

* fix: set flex-shrink to 0

* fix: lint

* feat: add support for navigating to feature from reporting dash

* fix: tests
2021-02-26 10:42:34 +01:00
Ivar Conradi Østhus
5cab5754a3 fix: fix update-variant-test 2021-02-24 11:22:03 +01:00
Ivar Conradi Østhus
5342c86b60 fix: one and only one front (#244)
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-02-24 11:03:18 +01:00
Ivar Conradi Østhus
b9585b352d fix: tests 2021-02-23 14:06:41 +01:00
Ivar Conradi Østhus
8b18b8cca4 fix: filter duplicates 2021-02-16 13:30:26 +01:00
Ivar Conradi Østhus
388dfe45d3 feat: allow custom context fields to define stickiness. (#241) 2021-02-16 12:22:33 +01:00
Ivar Conradi Østhus
107cc0636f fix: should not register duplicate HTML5 backends 2021-02-09 21:56:49 +01:00
Ivar Conradi Østhus
0b58048c86 fix: Add UI for showing 'create tag' errors 2021-02-09 10:33:48 +01:00
Ivar Conradi Østhus
00f411d9d2 fix: UX should not eagerly store strategy updates! (#240)
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-02-09 10:14:04 +01:00
Ivar Conradi Østhus
3a6fa577bc feat: Addon support from UI (#236) 2021-02-05 14:24:22 +01:00
Simen Bekkhus
02ab9169da fix: add missing space (#239) 2021-02-04 16:03:32 +01:00
Christopher Kolstad
3014c0029d Basic implementation of deprecation/reactivation of strategies 2021-01-21 15:27:24 +01:00
Christopher Kolstad
2cabe7f297 Add tag feature
- CRUD for tag-types
- CD for tags
- tagging for features
- display tags on feature-toggle
2021-01-18 09:26:32 +01:00
Ivar Conradi Østhus
7380d92e45 fix: migrate all .scss files to .module.scss 2021-01-07 13:36:13 +01:00
Ivar Conradi Østhus
b8277f01ac fix: move feature-metrics store to its own folder 2021-01-06 22:10:28 +01:00
Ivar Conradi Østhus
92f9fdc50e fix: move feature-toggle store into folder 2021-01-06 22:05:11 +01:00
Ivar Conradi Østhus
3c09818c75 fix: update snapshot for tests 2020-12-22 10:07:53 +01:00
Ivar Conradi Østhus
cc96134e2f fix: add last seen as sort option 2020-12-22 10:05:56 +01:00
Ivar Conradi Østhus
6b742a0b92 fix: lint it 2020-12-22 09:53:56 +01:00
Ivar Conradi Østhus
d1662d75c8 feat: Add last seen at timestamp
Closes #226
2020-12-22 09:45:35 +01:00
Ivar Conradi Østhus
9db1d59093 fix: minor CSS tweak 2020-12-15 21:36:21 +01:00
Ivar Conradi Østhus
be2664d38b fix: new feature toggle gets default strategy 2020-12-15 13:21:38 +01:00
Ivar Conradi Østhus
111b2353bf fix: minor strategy configure update 2020-12-14 21:39:22 +01:00
Ivar Conradi Østhus
6715ee8af0 fix: minor css tweaks 2020-12-14 15:50:32 +01:00
Ivar Conradi Østhus
8a083ce748 fix: Should update activation strategies immediately (#229) 2020-11-27 22:23:44 +01:00
Ivar Conradi Østhus
718c4fa608 fix: filter for projects 2020-11-23 21:32:05 +01:00
Ivar Conradi Østhus
264e9c56ae feat: add support for projects 2020-11-23 21:09:19 +01:00
Ivar Conradi Østhus
a8bd6f8063 fix: should be possible to remove all variants. 2020-11-04 09:07:02 +01:00
Ivar Conradi Østhus
107f932e03 fix: minur ux tweaks 2020-10-05 21:51:45 +02:00
Ivar Conradi Østhus
31398571b4 fix: show notification when app updates 2020-09-26 21:31:34 +02:00
Ivar Conradi Østhus
7da10fcdcc fix: failing test 2020-09-25 22:12:48 +02:00
Ivar Conradi Østhus
1759bfe911 fix: minor css tweaks for mobile 2020-09-25 22:09:18 +02:00
Ivar Conradi Østhus
987fce309c fix: cleanup edit application a bit 2020-09-25 09:36:11 +02:00
Ivar Conradi Østhus
130110f5a4 feat: add search for applications 2020-09-24 20:02:45 +02:00