Skip to content
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

Merged
merged 39 commits into from
Aug 14, 2024

Conversation

lucaseduoli
Copy link
Collaborator

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.

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. javascript Pull requests that update Javascript code labels Aug 14, 2024
Copy link
Contributor

Pull Request Validation Report

This comment is automatically generated by Conventional PR

Whitelist Report

Whitelist Active Result
Pull request is a draft and should be ignored
Pull request is made by a whitelisted user and should be ignored
Pull request is submitted by a bot and should be ignored
Pull request is submitted by administrators and should be ignored

Result

Pull request does not satisfy any enabled whitelist criteria. Pull request will be validated.

Validation Report

Validation Active Result
All commits in this pull request has valid messages
Pull request does not introduce too many changes
Pull request has a valid title
Pull request has mentioned issues
Pull request has valid branch name
Pull request should have a non-empty body

Result

Pull request satisfies all enabled pull request rules.

Last Modified at 14 Aug 24 15:54 UTC

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-3344.dmtpw4p5recq1.amplifyapp.com

@github-actions github-actions bot added the refactor Maintenance tasks and housekeeping label Aug 14, 2024
Copy link
Contributor

@anovazzi1 anovazzi1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 14, 2024
@lucaseduoli lucaseduoli self-assigned this Aug 14, 2024
@lucaseduoli lucaseduoli merged commit 7658954 into main Aug 14, 2024
30 checks passed
@lucaseduoli lucaseduoli deleted the fix/empty_flows branch August 14, 2024 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code lgtm This PR has been approved by a maintainer refactor Maintenance tasks and housekeeping size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants