Add common loader (#18556)

To avoid white screens on reload, building a shared skeleton.

Before

https://github.com/user-attachments/assets/42bd0667-141d-4df4-9072-4077192cc71d

After

https://github.com/user-attachments/assets/e6031a72-2e25-47e3-a873-b89aaddfbd3a
This commit is contained in:
Thomas Trompette
2026-03-11 14:56:49 +01:00
committed by GitHub
parent 2c5af2654d
commit b346f4fb59
6 changed files with 87 additions and 95 deletions
@@ -13,11 +13,9 @@ const StyledContainer = styled.div`
box-sizing: border-box;
display: flex;
flex-direction: row;
gap: 12px;
height: 100dvh;
min-width: ${NAVIGATION_DRAWER_CONSTRAINTS.default}px;
overflow: hidden;
padding: 12px 8px 12px 8px;
width: 100%;
@media (max-width: ${MOBILE_VIEWPORT}px) {
@@ -25,6 +23,11 @@ const StyledContainer = styled.div`
}
`;
const StyledLeftPanelWrapper = styled.div`
flex-shrink: 0;
padding: 12px 0 12px 8px;
`;
export const UserOrMetadataLoader = () => {
const showAuthModal = useShowAuthModal();
@@ -36,7 +39,9 @@ export const UserOrMetadataLoader = () => {
backdropZIndex={RootStackingContextZIndices.RootModalBackDrop}
/>
)}
<LeftPanelSkeletonLoader />
<StyledLeftPanelWrapper>
<LeftPanelSkeletonLoader />
</StyledLeftPanelWrapper>
<RightPanelSkeletonLoader />
</StyledContainer>
);