1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00
unleash.unleash/frontend/src/hooks
Fredrik Strand Oseberg f381718fd6
fix: icon imports (#6499)
Based on this article:
https://mui.com/material-ui/guides/minimizing-bundle-size/ importing
from `'@mui/icons-material'` instead of specifying the actual path to
the icon like `import Delete from '@mui/icons-material/Delete';` can be
up to six time slower. This change changes all named imports in Unleash
referencing the `@mui/icons-material` to default imports.

This reduced the amount of modules we had to process when building the
frontend from 15206 to 4746

Before:
<img width="1016" alt="Skjermbilde 2024-03-11 kl 14 19 58"
src="https://github.com/Unleash/unleash/assets/16081982/f137d24a-6557-4183-a40f-f62a33524520">

After:
<img width="1237" alt="Skjermbilde 2024-03-11 kl 14 20 32"
src="https://github.com/Unleash/unleash/assets/16081982/05a27d6a-2c3f-4409-9862-7188ab4b9c72">

Build time locally decreased by around 50%

Before:
<img width="1504" alt="Skjermbilde 2024-03-11 kl 14 31 45"
src="https://github.com/Unleash/unleash/assets/16081982/bc931559-b022-47ed-9f8f-c87401578518">


After:
<img width="1219" alt="Skjermbilde 2024-03-11 kl 14 27 00"
src="https://github.com/Unleash/unleash/assets/16081982/3c3a8d6b-576d-45c3-aa40-cc5f95d9df2b">
2024-03-12 10:56:10 +01:00
..
api fix: icon imports (#6499) 2024-03-12 10:56:10 +01:00
useChangeRequestAddStrategy.ts
useChangeRequestInReviewWarning.tsx refactor: use union types for change request types (#5870) 2024-01-12 13:15:43 +05:30
useChangeRequestsEnabled.test.tsx
useChangeRequestsEnabled.ts
useChangeRequestToggle.ts feat: add disabled state handling on slow network (#6165) 2024-02-08 10:27:51 +01:00
useClearSWRCache.ts feat: paginated hook for applications list (#6315) 2024-02-22 14:37:08 +01:00
useCollaborateData.tsx
useConditionallyHiddenColumns.ts
useDefaultProjectSettings.ts
useDragItem.ts
useEventSettings.ts
useFormErrors.ts
useGlobalLocalStorage.ts refactor: cleanup fix for persistent set (#6060) 2024-01-29 12:33:01 +01:00
useGlobalState.ts
useHasAccess.ts
useHiddenEnvironments.ts refactor: cleanup fix for persistent set (#6060) 2024-01-29 12:33:01 +01:00
useHighestPermissionChangeRequestEnvironment.test.ts
useHighestPermissionChangeRequestEnvironment.ts
useId.test.ts
useId.ts
useIsAppleDevice.ts
useKeyboardShortcut.ts
useLastViewedProject.ts
useLoading.ts fix: now project overview has skeleton instead of placeholders (#5696) 2023-12-20 14:59:41 +02:00
useLocationSettings.ts
useOnBlur.test.tsx
useOnBlur.ts
useOnClickOutside.test.tsx
useOnClickOutside.ts
useOnVisible.ts
useOptionalPathParam.ts
usePageTitle.ts
usePagination.ts
usePersistentGlobalState.ts
usePersistentTableState.test.tsx test: show array param decoder (#5955) 2024-01-19 09:27:47 +01:00
usePersistentTableState.ts feat: keep filter order (#5688) 2023-12-19 15:35:39 +01:00
usePinnedFavorites.test.ts
usePinnedFavorites.ts
usePlausibleTracker.ts feat: sdk reporting tracker (#6378) 2024-02-28 15:52:03 +01:00
useQueryParams.ts
useRequiredPathParam.ts
useRequiredQueryParam.ts
useSearch.test.tsx
useSearch.ts chore(deps): update dependency @biomejs/biome to v1.4.0 (#5288) 2023-11-28 09:32:00 +00:00
useSubmittedFeedback.ts feat: application overview feedback (#6416) 2024-03-04 13:45:57 +02:00
useTabs.ts
useThemeMode.ts
useToast.tsx
useUiFlag.ts
useUsersPlan.ts
useVariant.ts
useVirtualizedRange.ts
useWeakMap.ts fix: separate concerns for ConstraintAccordionList (#5701) 2023-12-20 15:36:23 +01:00