-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: folder fetching, folder sidebar and fix various issues #3344
Conversation
Pull Request Validation ReportThis comment is automatically generated by Conventional PR Whitelist Report
Result Pull request does not satisfy any enabled whitelist criteria. Pull request will be validated. Validation Report
Result Pull request satisfies all enabled pull request rules. Last Modified at 14 Aug 24 15:54 UTC |
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This pull request includes several commits that refactor the folder sidebar and fix various issues. The changes include removing unused code, separating the folder sidebar from the common sidebar, and removing the useOnFileDrop function from the common sidebar. Additionally, a new folderSidebarComponent has been added that fetches the folders. The useOnFileDrop and SidebarFoldersButton components have also been added.
Other changes include making the auth context not fetch folders, making the delete folder refetch get folders, and making the folder mutations refetch the getFolder query. Unused functions have been removed from the useFolderStore, and the isLoading from the application now depends only on flows. The main page no longer refetches folders, and the types of the folders store have been changed.
Other changes include removing the getFolders refetch on duplicateFolders, adding loading from the query into the ComponentsComponent, and making the flow page get the flows and types if they're not available. The loading state has been updated to only be isLoading. Unused functions have been removed, and cards now appear even if they didn't load. The setLoading of various pages has been removed, and the loading no longer happens every time the flow changes.
Skeletons have been added instead of loading on folders, and routing now contains the folderId on both flows and the initial page. The redirect of useFileDrop has been removed, as well as the folderId getting from state. The setAllFlows function has been removed, and unused variables and functions in the useDuplicateFlows hook have been removed.
The refetch of folders has been added when the flow is deleted or added, and the redirectToLastLocation now redirects to the last folder as well. The upload flow to the folder tanstack has been added, and folders are refetched on upload. The loading of the current folder now occurs on the display of the empty component. The refetching of the folder on file drop has been removed, and unused code has been removed. Finally, the add new flow from the header now redirects correctly.