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

71 Commits

Author SHA1 Message Date
NicolaeUnleash
705462f0cf
feat: dark theme v1 (#3298)
## About the changes

Creating the first version of the Dark theme

Refactor: colors variables
Refactor: use theme variable instead 
- this change will help us to use MuiCssBaseline, and we can use classes
directly for easy customization when we can't identify MUI classes

Refactor: adjusting some files components
- i’ve touched also the structure of some files, not only the colors
variables (but only to adjust the style, not functionality)

Fix: dark mode persistence on refresh (by Nuno)

Feat: dark mode sees light logos, and light mode sees dark logos (by
Nuno)

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2023-03-22 16:37:40 +02:00
NicolaeUnleash
23af7a3474
refactor: light theme colors (#3252)
## About the changes
Refactoring the colors for the light theme to be much easier to continue
with dark mode

This is the first step to finish dark mode

https://linear.app/unleash/project/[low][s][alpha]-dark-mode-in-unleash-admin-ui-31b407d13c4b/1

This PR uses `main-theme` as a placeholder for `dark-theme` for now due
to the new changes. Still need to set the correct values here.

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2023-03-06 12:58:36 +02:00
Mateusz Kwasniewski
674e36b40b
Styled components batch4.1 (#2812)
Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2023-01-05 09:45:39 +01:00
Thomas Heartman
d5fbd0b743
refactor: move docs into new structure / fix links for SEO (#2416)
## What

This (admittedly massive) PR updates the "physical" documentation
structure and fixes url inconsistencies and SEO problems reported by
marketing. The main points are:

- remove or move directories : advanced, user_guide, deploy, api
- move the files contained within to the appropriate one of topics,
how-to, tutorials, or reference
- update internal doc links and product links to the content
- create client-side redirects for all the urls that have changed.

A number of the files have been renamed in small ways to better match
their url and to make them easier to find. Additionally, the top-level
api directory has been moved to /reference/api/legacy/unleash (see the
discussion points section for more on this).

## Why

When moving our doc structure to diataxis a while back, we left the
"physical' files lying where they were, because it didn't matter much to
the new structure. However, that did introduce some inconsistencies with
where you place docs and how we organize them.

There's also the discrepancies in whether urls us underscores or hyphens
(which isn't necessarily the same as their file name), which has been
annoying me for a while, but now has also been raised by marketing as an
issue in terms of SEO.

## Discussion points

The old, hand-written API docs have been moved from /api to
/reference/api/legacy/unleash. There _is_ a /reference/api/unleash
directory, but this is being populated by the OpenAPI plugin, and mixing
those could only cause trouble. However, I'm unsure about putting
/legacy/ in the title, because the API isn't legacy, the docs are. Maybe
we could use another path? Like /old-docs/ or something? I'd appreciate
some input on this.
2022-11-22 09:05:30 +00:00
Christopher Kolstad
e140fb31b7
feat: add count to context field list (#2020) 2022-08-31 15:26:06 +02:00
Nuno Góis
672a3f0b92 fix: group project access inconsistencies (#1178)
* fix: group project access inconsistencies

* fix relative path

* wip

* refactor: make project tabs work as routes

* refactor: finish refactoring project assign forms

* fix: update snaps

* fix: update snaps

* add some basic cypress e2e tests to groups

* add remaining cypress e2e tests for group CRUD

* add groups e2e to gh workflows

* refactor: simplify useMemo usage

* add GO_BACK navigate const

* fix: remove trailing slash on user creation request

Co-authored-by: olav <mail@olav.io>
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-08-04 12:57:25 +01:00
Nuno Góis
4761847ce5 feat: upgrade search to use the new search component (#1073)
* feat: upgrade project list search to use the new search field

* cleanup unused imports

* feat: add upgraded search to projects and applications, polish search UX

* refactor: TableSearch to new Search common component

Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-06-10 15:23:12 +02:00
olav
42d30e2d79 refactor: remove error class names from input error messages (#1071)
* refactor: remove error class names from input error messages

* refactor: update error message test

* refactor: show constraint value length error earlier
2022-06-07 15:03:40 +02:00
Nuno Góis
570e9f88be feat: upgrade users table (#1040)
* feat: upgrade users table

* fix misc ui/ux bugs

* refactor: address PR comments

* fix: searching by `undefined`

* fix: searching for undefined on invoices, table placeholder centering

* refactor: abstract users list actions into new component

* refactor: move styled components to top of files
2022-05-31 07:59:09 +01:00
olav
eb5e83cdb4 refactor: remove unused code (#1036)
* refactor: remove unused code

* refactor: remove more unused code
2022-05-27 13:28:58 +02:00
Tymoteusz Czech
9ac962da45 Feat: Contexts and Project access tables (#1028)
* feat: new contexts table

* improve context list actions

* refactor: disabled icon colors

* fix: update snapshots

* fix: icons

* fix: context fields typo

* feat: new project access table

* fix: header cell styles
2022-05-26 10:37:33 +02:00
olav
20d738f725 refactor: add eslint to merge check (#1022)
* refactor: fix eslint issues

* refactor: add eslint to merge check
2022-05-25 12:36:58 +02:00
olav
34f848ce8a refactor: replace react-dnd with custom implementation (#988)
* refactor: replace react-dnd with custom implementation

* refactor: add TextCell, IconCell, and ActionCell

* refactor: port environments list to react-table

* refactor: change OfflineBolt to PowerSettingsNew

* refactor: simplify environment toast text

* refactor: improve IToast type type

* refactor: improve useSearchHighlightContext naming

* refactor: clarify enableDragAndDrop logic
2022-05-25 11:40:20 +02:00
Fredrik Strand Oseberg
7ba9d2a577 Feat/new strategies table (#1012)
* fix: add flex to toolbarcontainer

* feat: add initial new table

* feat: add styled badge

* feat: remove dead code

* fix: remove useContext import

* fix: update context buttons to icon buttons

* feat: add loading

* fix: remove unused imports

* Update src/component/strategies/StrategiesList/PredefinedBadge/PredefinedBadge.tsx

Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>

* fix: update spacing to use theme

* fix: update loading

* fix: update type

Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2022-05-24 10:58:06 +02:00
Tymoteusz Czech
6d130f61f6 feat: new contexts table (#998)
* feat: new contexts table

* improve context list actions

* refactor: disabled icon colors

* fix: update snapshots

* fix: icons

* fix: context fields typo
2022-05-20 08:29:23 +00:00
olav
9902494f58 refactor: improve tooltip styles after MUI update (#966)
* refactor: add missing event arg type

* refactor: fix project card popup position

* refactor: add tooltip arrows

* refactor: update snapshot

* refactor: add missing tooltips

* refactor: use a custom Autocomplete size in AutocompleteBox
2022-05-09 15:17:20 +02:00
Tymoteusz Czech
44c579f7a8 Refactor: page container (#967)
* refactor: page container

* refactor: table page header
2022-05-09 14:38:12 +02:00
Tymoteusz Czech
cd37624de4 Theme consistency updates (#960)
* fix: theme palette and shape

* fix: update snapshots

* fix: adjust after review
2022-05-09 12:01:12 +02:00
olav
d8143c6ff4 chore: update react-router to v6 (#946)
* refactor: fix child selector warnings

* refactor: update react-router-dom

* refactor: use BrowserRouter as in react-router docs

* refactor: replace Redirect with Navigate

* refactor: replace Switch with Routes

* refactor: replace useHistory with useNavigate

* refactor: replace useParams types with useRequiredPathParam

* refactor: replace NavLink activeStyle with callback

* refactor: fix matchPath arg order

* refactor: Remove unused link state

* refactor: delete broken snapshot test

* refactor: render 404 page without redirect

* refactor: normalize path parameter names

* refactor: fix Route component usage
2022-05-05 13:42:18 +02:00
olav
24c11332b5 chore: update MUI to v5 (#923)
* refactor: update mui packages

* refactor: run mui codemods

* refactor: format files after codemods

* refactor: fix broken types

* refactor: clean up theme

* refactor: fix broken tests

* refactor: replace @mui/styles with tss-react

* refactor: move breakpoints into classes for tss

* refactor: fix crash on missing feature description

* refactor: remove void classNames

* refactor: adjust styles to new defaults

* refactor: remove broken rollout slider e2e test

* refactor: fix duplicate e2e testid

* refactor: update makeStyles after rebase

* refactor: add missing snapshot after rebase

* refactor: fix TableCellSortable focus styles

* refactor: use 1.4 as the default line-height

* refactor: hide webkit search field icons

* refactor: fix select box label

* refactor: make AutocompleteBox smaller

* refactor: make heading smaller

* refactor: fix toast close icon color

* refactor: update snapshots

* refactor: add missing test event awaits

* refactor: fix default button line-height
2022-05-02 15:52:41 +02:00
Tymoteusz Czech
23a874d051 Refactor: convert jsx files to typescript (#881)
* refactor: convert remaining js files to typescript

* refactor: conditionally render remove index

* refactor: dialog component to tsx

* refactor: migrate some files from jsx to tsx

* refactor: convert dropdown element to tsx

* refactor: feature toggle list to tsx

* refactor: update context name in use overrides

* refactor: variant overrides to tsx

refactor: remove unused strategy constraint file

* fix: tsx imports

* fix: update refectored components after rebase

* refactor: rename report list files to tsx

* fix: project health list types

* refactor: addon form - add types

* refactor: copy feature component types

* fix: projects toggle style after tsx refactor

* refactor: update ts types from openapi

* fix: ts refactor changes after review

* fix: header title prop

* fix: update after PR comments

* add test to useoverrides hook

* fix conditionally render time ago

* fix: toggle list empty tooltip

* fix: remove unused variable

* remove unused variable

* fix: remove faulty snapshot
2022-05-02 12:52:33 +02:00
olav
efe52cb1aa fix: wrap long legal values/descriptions (#927) 2022-04-29 13:28:51 +02:00
olav
1fd6f2a60a refactor: improve the text for docs links (#904)
* refactor: improve the text for docs links

* Update src/component/admin/apiToken/CreateApiToken/CreateApiToken.tsx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update src/component/admin/projectRoles/CreateProjectRole/CreateProjectRole.tsx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update src/component/admin/projectRoles/EditProjectRole/EditProjectRole.tsx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update src/component/admin/users/CreateUser/CreateUser.tsx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update src/component/admin/users/EditUser/EditUser.tsx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update src/component/context/CreateUnleashContext/CreateUnleashContext.tsx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* Update src/component/context/EditContext/EditContext.tsx

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

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

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

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

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>

* refactor: improve docs link texts

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2022-04-25 09:36:23 +02:00
olav
2e5e25bfe5 refactor: improve icon labels and tooltips (#884) 2022-04-21 08:26:49 +02:00
olav
cb8add5c30 feat: add context value descriptions (#874)
* feat: add context value descriptions

* refcator: use ConditionallyRender for ...conditional render

* refactor: fix context form enter behaviour

* refactor: decrease margin between inputs

* refactor: show error on missing value

* refactor: disable add button on error

* refactor: avoid clearing value error on name focus
2022-04-19 15:20:01 +02:00
olav
f309553a5f refactor: port some things to TS (#833)
* refactor: remove unused securityLogger

* refactor: port commonStyles to TS

* refactor: port testIds to TS

* refactor: move app.css into themes

* refactor: use absolute import paths

* refactor: port LayoutPicker to TS

* refactor: port routes to TS

* refactor: port ScrollTop to TS

* refactor: update unused/missing ScrollTop exceptions

* refactor: remove unused route flags field

* refactor: change constants ext to TS

* refactor: remove unused testData file

* refactor: port styles to TS

* refactor: wait before typing in auth spec
2022-04-01 10:28:15 +02:00
Youssef Khedher
eeda7ab5e4 feat: add segments (#780)
* feat: create segmentation structure and list

* feat: remove unused deps and change route

* feat: change header style and add renderNoSegments

* fix: style table header

* feat: create useSegments hook

* feat: add segmentApi hook

* feat: create segment

* fix: errors

* feat: add contextfields list

* fix: remove user from create segment api

* feat: add form structure

* feat: add SegmentFormStepOne

* fix: tests and routes

* feat: add constraint view

* feat: UI to match the sketch

* feat: add constraint on context select

* fix: duplication

* fix adding constraints

Co-authored-by: olav <mail@olav.io>

* fix: input date not showing up in constraint view

Co-authored-by: olav <mail@olav.io>

* fix: minor bugs

Co-authored-by: olav <mail@olav.io>

* fix: create context modal in segment page

Co-authored-by: olav <mail@olav.io>

* fix: validate constraint before create segment

Co-authored-by: olav <mail@olav.io>

* feat: create useSegment hook

Co-authored-by: olav <mail@olav.io>

* feat: create edit component

Co-authored-by: olav <mail@olav.io>

* refactor: move constraint validation endpoint

* refactor: add missing route snapshot

* refactor: fix segment constraints unsaved/editing state

* refactor: remove create segment from mobile header menu

* refactor: update segments form description

* refactor: extract SegmentFormStepList component

* refactor: add an optional FormTemplate docs link label

* refactor: fix update segment payload

* feat: finish edit component

Co-authored-by: olav <mail@olav.io>

* refactor: move step list above segment form

* fix: update PR based on feedback

Co-authored-by: olav <mail@olav.io>

* refactor: fix constraint validation endpoint path

* refactor: improve constraint state field name

* refactor: extract AutocompleteBox component

* feat: add strategy segment selection

* refactor: add strategy segment previews

* refactor: fix double section separator line

* feat: disable deleting a usable segment

* refactor: warn about segments without constraints

* refactor: update text in delete segment dialogue

* refactur: improve arg names

* refactor: improve index var name

* refactor: clarify steps list logic

* refactor: use a required prop for the segment name

* refactor: use ConditionallyRender for segment deletion

* refactor: fix segments refetch

* refactor: improve CreateUnleashContext component names

* refactor: adjust segment form styles

* refactor: adjust text

* refactor: fix info icon tooltip hover target

* refactor: add missing aria attrs to preview button

* refactor: add strat name to delete segment modal

* refactor: fix segment chip text alighment

* refactor: use bulk endpoint for strategy segments

* refactor: fix imports after merge

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
Co-authored-by: olav <mail@olav.io>
2022-03-29 09:30:57 +02:00
Youssef Khedher
85950f104a chore: update paths 🧼 (#820) 2022-03-28 09:49:59 +01:00
olav
cfc2338e78 refactor: use camel case for files and dirs (#817) 2022-03-25 12:34:20 +01:00
Fredrik Strand Oseberg
228a72d637 Feat/change form order (#784)
* 4.9.0-beta.1

* 4.9.0-beta.2

* fix: mobile guidance WIP

* fix: add autofocus

* feat: update forms

* refactor: mobile guidance

* fix: add relative as common class

* fix: add max height to codebox
2022-03-14 13:14:26 +01:00
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
Youssef
b58cccc7d0 fix: merge conflicts 2022-02-25 15:28:38 +01:00
Youssef
5a813743a2 style: fix unformatted file 2022-02-25 14:41:54 +01:00
Youssef Khedher
19abd37b60 Merge branch 'main' into fix/context-form-validation 2022-02-25 14:02:42 +01:00
Youssef Khedher
a3f439ea17 Merge branch 'main' into fix/ui-consistency 2022-02-25 13:54:11 +01:00
Youssef Khedher
c0455962ec Merge branch 'main' into fix/context-form-validation 2022-02-25 13:52:00 +01:00
Youssef
9c48d0c63f fix: merge conflicts 2022-02-25 13:49:59 +01:00
Youssef
4898eee8d8 refactor: change error type in edit context 2022-02-25 13:46:14 +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
Youssef
c141f91abd fix: handle context name error without making an api call 2022-02-24 19:54:10 +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
Youssef
aae8c4d9d9 refactor: update text in ui consistent 2022-02-23 00:10:48 +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
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
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
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
Youssef
8cbfefc47a fix: add autofocus to all new create-screens 2022-01-28 15:14:12 +01:00