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

Start: Refactor loading component in processing screen #100148

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
10 changes: 7 additions & 3 deletions client/signup/processing-screen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { sprintf } from '@wordpress/i18n';
import { useI18n } from '@wordpress/react-i18n';
import clsx from 'clsx';
import { useRef, useState, useEffect } from 'react';
import { LoadingEllipsis } from 'calypso/components/loading-ellipsis';
import Loading from 'calypso/components/loading';
import { useInterval } from 'calypso/lib/interval/use-interval';
import './style.scss';

Expand Down Expand Up @@ -135,10 +135,14 @@ export default function ProcessingScreen( props: ProcessingScreenProps ) {
'is-force-centered': shouldShowNewSpinner && totalSteps === 0,
} ) }
>
<h1 className="processing-screen__progress-step">{ steps.current[ currentStep ]?.title }</h1>
{ shouldShowNewSpinner && <LoadingEllipsis /> }
{ shouldShowNewSpinner && (
<Loading title={ steps.current[ currentStep ]?.title } progress={ progress } />
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe progress is passed here as a value 0 < progress < 1, while the Loading component goes from 0 to 100.

) }
{ ! shouldShowNewSpinner && (
<>
<h1 className="processing-screen__progress-step">
{ steps.current[ currentStep ]?.title }
</h1>
<div
className="processing-screen__progress-bar"
style={
Expand Down
4 changes: 4 additions & 0 deletions client/signup/processing-screen/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,8 @@ $progress-duration: 800ms;
vertical-align: middle;
margin: 0;
}

.wpcom__loading {
margin: 0;
}
}