[DRAFT] refactor: extract PageLoader component for better code organization #1450
Open
[DRAFT] refactor: extract PageLoader component for better code organization #1450
Conversation
- Migrate all lodash imports to radash equivalents - Replace cloneDeep with native structuredClone - Update vite.config.ts manualChunks (lodash → radash) - Remove lodash and @types/lodash dependencies Bundle size reduction: ~12-15 kB minified, ~4-5 kB gzipped
- Moved PageLoader implementation to a new file in the atoms directory. - Updated routes.tsx to import and use the new PageLoader component. - Removed the inline PageLoader definition from routes.tsx for cleaner code.
…endency feat: refactor SessionsTable component by removing unused debouncedFetchSessionsRef refactor: update route configurations for project settings and global connections
281a705 to
02c8d1b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace lodash with radash
Summary
Changes Made
Files Modified (18 files)
src/store/cache/useCacheStore.tsisEqualfrom radashsrc/store/useProjectStore.tsisEqualfrom radashsrc/components/organisms/topbar/project/manualRun/manualRunButtons.tsxisEqualfrom radashsrc/components/organisms/settings/user/organizations/table.tsxomitfrom radashsrc/services/sessions.service.tsomitfrom radashsrc/utilities/fetchAndExtractZip.utils.tsmemoize→memosrc/utilities/convertBuildRuntimesToViewTriggers.utils.tsuniqBy→uniquesrc/utilities/calculateDeploymentSessionsStats.utils.tscloneDeep→ nativestructuredClonesrc/utilities/openedEditorFilesState.utils.tsmap+uniquesrc/hooks/useSort.tsxorderBy→sortsrc/components/organisms/settings/user/profile.tsxdebouncesyntaxsrc/components/organisms/settings/organization/settings.tsxdebounce+omitsrc/components/organisms/deployments/sessions/table/table.tsxdebounce+isEqual, removed.cancel()src/components/organisms/topbar/project/buttons.tsxdebouncewith leading →throttlesrc/components/organisms/editorTabs.tsxdebounce+last+throttlesrc/components/organisms/files/fileTree.tsxdebouncesyntaxsrc/components/molecules/copyButton.tsxdebouncesyntaxsrc/components/molecules/popover/popoverListContent.tsxdebouncesyntaxvite.config.tsmanualChunkslodash → radashAPI Mappings
isEqualisEqual(same)omitomit(same)lastlast(same)memoizememouniqBy(arr, fn)unique(arr, fn)cloneDeepstructuredClonedebounce(fn, delay)debounce({ delay }, fn)debounce(fn, delay, { leading: true })throttle({ interval }, fn)orderBysort+ custom comparatorBundle Size Impact
Current vendor-utils chunk: 91.01 kB (gzip: 24.19 kB)
Benefits
structuredCloneinstead ofcloneDeepTest Results
Dependencies Removed
lodash@types/lodashWhat type of PR is this? (check all applicable)