1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-19 17:52:45 +02:00
unleash.unleash/frontend/src/hooks
Thomas Heartman 39145e2617
refactor: use union types for change request types (#5870)
This changes the two interfaces IChangeRequest and
IChangeRequestSchedule to be union types instead of interfaces. It also
extracts the constituents of those union types into proper types
themselves (so that they can be used in function type signatures etc).
It also updates the type names.

This turned out to be more work than I had imagined, but I think the end
result pays off, giving us more type safety and control.

I wanted to use just `ChangeRequest` for the IChangeRequest type, but
that caused issues due to naming collisions with the `ChangeRequest`
component that we have, causing tests to fail. I've named it
`ChangeRequestType` as a potential solution, but suggestions are
welcome.

The relevant changes are in
`frontend/src/component/changeRequest/changeRequest.types.ts`.
Everything else is updated references and some necessary refactoring to
respect the new types.
2024-01-12 13:15:43 +05:30
..
api refactor: use union types for change request types (#5870) 2024-01-12 13:15:43 +05:30
useChangeRequestAddStrategy.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useChangeRequestInReviewWarning.tsx refactor: use union types for change request types (#5870) 2024-01-12 13:15:43 +05:30
useChangeRequestsEnabled.test.tsx feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useChangeRequestsEnabled.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useChangeRequestToggle.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useCollaborateData.tsx feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useConditionallyHiddenColumns.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useDefaultProjectSettings.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useDragItem.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useEventSettings.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useFormErrors.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useGlobalLocalStorage.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useGlobalState.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useHasAccess.ts feat: delete dependnecy button through change request (#4983) 2023-10-10 14:38:10 +02:00
useHiddenEnvironments.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useHighestPermissionChangeRequestEnvironment.test.ts feat(#4209): add segment to drafts (#4408) 2023-08-04 12:57:26 +00:00
useHighestPermissionChangeRequestEnvironment.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useId.test.ts
useId.ts
useIsAppleDevice.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useKeyboardShortcut.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useLastViewedProject.ts Fix/redirect woes (#2899) 2023-01-17 13:33:52 +01:00
useLoading.ts fix: now project overview has skeleton instead of placeholders (#5696) 2023-12-20 14:59:41 +02:00
useLocationSettings.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useOnBlur.test.tsx feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useOnBlur.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useOnClickOutside.test.tsx feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useOnClickOutside.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useOnVisible.ts
useOptionalPathParam.ts feat: add new feature strategy create/edit pages (#739) 2022-03-09 14:59:24 +01:00
usePageTitle.ts
usePagination.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
usePersistentGlobalState.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
usePersistentTableState.test.tsx chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
usePersistentTableState.ts feat: keep filter order (#5688) 2023-12-19 15:35:39 +01:00
usePinnedFavorites.test.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
usePinnedFavorites.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
usePlausibleTracker.ts feat: plausible for feedback (#5763) 2024-01-04 14:38:54 +02:00
useQueryParams.ts
useRequiredPathParam.ts feat: add new feature strategy create/edit pages (#739) 2022-03-09 14:59:24 +01:00
useRequiredQueryParam.ts
useSearch.test.tsx feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useSearch.ts chore(deps): update dependency @biomejs/biome to v1.4.0 (#5288) 2023-11-28 09:32:00 +00:00
useSubmittedFeedback.ts chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
useTabs.ts
useThemeMode.ts fix: dark theme UI fixes (#3423) 2023-03-30 16:57:35 +01:00
useToast.tsx feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useUiFlag.ts feat: useUiFlag shorthand hook (#4566) 2023-09-11 10:01:20 +02:00
useUsersPlan.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useVariant.ts feat: message banner (variants) (#3788) 2023-05-18 09:38:59 +01:00
useVirtualizedRange.ts feat: biome lint frontend (#4903) 2023-10-02 13:25:46 +01:00
useWeakMap.ts fix: separate concerns for ConstraintAccordionList (#5701) 2023-12-20 15:36:23 +01:00