Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/components/Dashboard/Dashboard.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,20 @@
font-style: italic;
}

/* Loading spinner centered in a section */
.sectionLoadingCenter {
display: flex;
align-items: center;
justify-content: center;
padding: 3rem 0;
}

/* Inline skeleton placeholder (e.g. username in welcome heading) */
.skeletonInline {
display: inline-block;
vertical-align: middle;
}

/* Screen reader only text */
.srOnly {
position: absolute;
Expand Down
7 changes: 1 addition & 6 deletions src/components/Dashboard/profile-activity-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,7 @@ export const ProfileActivitySection = memo(function ProfileActivitySection({ pro
</Stack>
</Stack>

<div style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
padding: '3rem 0'
}}>
<div className={styles.sectionLoadingCenter}>
<Spinner size="small" />
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dashboard/welcome-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const WelcomeSection = memo(function WelcomeSection({ displayName, isLoad
<Heading as="h1" className={styles.welcomeHeading}>
{getGreeting()},{' '}
{isLoading || !showName ? (
<SkeletonBox height="1.2em" width="80px" style={{ display: 'inline-block', verticalAlign: 'middle' }} />
<SkeletonBox height="1.2em" width="80px" className={styles.skeletonInline} />
) : (
displayName
)}! 👋
Expand Down
Loading