[_] bugfix/ fix workspace folder reload - #2084
Conversation
Deploying drive-web with
|
| Latest commit: |
6442872
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3b019a05.drive-web.pages.dev |
| Branch Preview URL: | https://fix-workspace-folder-reload.drive-web.pages.dev |
| await dispatch(fetchWorkspaces()); | ||
| } | ||
| const workspace = state.workspaces.workspaces.find((workspace) => workspace.workspace.id === workspaceId); |
There was a problem hiding this comment.
I would say that this state will not be up to date after the fetch, as the state was retrieved earlier. You should use getState instead of the state retrieved previously.
Add tests to detect this
There was a problem hiding this comment.
What do you mean? This if should be accessed only if the first fetch workspace is in progress to prevent null/underfined workspace id
| {isDriveContextReady ? ( | ||
| <DriveExplorer title={<BreadcrumbsDriveView namePath={namePath} />} isLoading={isLoading} items={items} /> | ||
| ) : ( | ||
| <div className="flex h-full w-full items-center justify-center"> | ||
| <Loader /> | ||
| </div> | ||
| )} |
There was a problem hiding this comment.
this change has design dept. approvement? As this is a bug, we can merge it, but it will need to be reviewed to ensure a sound design solution is found
There was a problem hiding this comment.
Without it, we get folders from the individual workspace for a split-second
|



Description
Reloading the page while being inside a folder in a business workspace was showing fetch folder errors and temporarily showed individual workspace folders.
Checklist
Testing Process
Navigate to a folder in a business workspace and do reload, then go back to the workspace.
Additional Notes
P.S. Still way too many requests for the server, not sure why