Skip to content

Commit 8a0fabd

Browse files
authored
Stepper: Fix navigation UI in Stepper (#97256)
1 parent 6bb1e7a commit 8a0fabd

File tree

7 files changed

+37
-85
lines changed

7 files changed

+37
-85
lines changed

client/landing/stepper/declarative-flow/internals/global.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,12 @@ button {
121121
@include break-small {
122122
&.courses,
123123
&.site-picker,
124-
&.new-or-existing-site,
124+
&.new-or-existing-site {
125+
margin-top: -60px;
126+
}
127+
}
128+
129+
@include break-xlarge {
125130
&.domains {
126131
margin-top: -60px;
127132
}

client/landing/stepper/declarative-flow/internals/steps-repository/__user/style.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ body.is-section-stepper .step-route {
1313
align-items: center;
1414
justify-content: center;
1515
min-height: calc(100vh - 96px);
16-
margin: 140px 0 0;
17-
@include break-small {
18-
margin: 108px 0 0;
19-
}
16+
margin: 20px 0;
2017

2118
.locale-suggestions {
2219
margin: 0 auto;

client/landing/stepper/declarative-flow/internals/steps-repository/hundred-year-plan-step-wrapper/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ function HundredYearPlanStepWrapper( props: Props ) {
294294
hideBack
295295
flowName={ flowName }
296296
hideFormattedHeader
297-
shouldStickyNavButtons={ false }
298297
stepContent={
299298
<Container
300299
className={ `hundred-year-plan-step-wrapper ${ stepName }` }

client/landing/stepper/declarative-flow/internals/steps-repository/hundred-year-plan-step-wrapper/style.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
min-height: 100%;
1919
}
2020

21-
.step-container__navigation.action-buttons.should-sticky-nav-buttons {
22-
background-color: transparent;
23-
}
24-
2521
.step-container__navigation.action-buttons .step-container__navigation-logo {
2622
fill: var(--studio-gray-0);
2723
stroke: var(--studio-gray-0);

client/landing/stepper/declarative-flow/internals/steps-repository/unified-plans/style.scss

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,26 @@
22

33
.step-route.plans {
44
padding: 48px 0 0;
5+
@include break-xlarge {
6+
padding: 0;
7+
}
58

69
.plans.plans-step {
710
.step-container {
811
padding-bottom: 80px;
912

10-
.step-container__header {
11-
.formatted-header {
12-
h1.formatted-header__title {
13-
font-family: Recoleta, "Noto Serif", Georgia, "Times New Roman", Times, serif;
14-
font-size: 2.25rem;
15-
font-weight: 500;
16-
/* stylelint-disable-next-line declaration-property-unit-allowed-list */
17-
line-height: 2.5rem;
18-
padding: 0 20px;
19-
text-align: center;
20-
letter-spacing: 0.2px;
21-
22-
@include break-mobile {
23-
font-size: 2.75rem;
24-
/* stylelint-disable-next-line declaration-property-unit-allowed-list */
25-
line-height: 3rem;
26-
}
27-
}
13+
h1.formatted-header__title {
14+
font-size: 2.25rem;
15+
padding: 0 20px;
16+
text-align: center;
17+
letter-spacing: 0.2px;
2818

29-
.formatted-header__subtitle {
30-
text-align: center;
31-
font-size: 1rem;
32-
}
19+
@include break-mobile {
20+
font-size: 2.75rem;
21+
/* stylelint-disable-next-line declaration-property-unit-allowed-list */
22+
line-height: 3rem;
3323
}
3424
}
35-
36-
.foldable-card.card.is-expanded {
37-
margin-bottom: 0;
38-
}
39-
40-
.card.is-compact {
41-
margin-bottom: 0;
42-
}
4325
}
4426
}
45-
}
27+
}

packages/onboarding/src/step-container/index.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { WordPressLogo, JetpackLogo, WooCommerceWooLogo } from '@automattic/components';
1+
import { JetpackLogo, WooCommerceWooLogo } from '@automattic/components';
22
import clsx from 'clsx';
33
import { TranslateResult, useTranslate } from 'i18n-calypso';
44
import { ReactElement } from 'react';
@@ -11,7 +11,6 @@ interface Props {
1111
stepSectionName?: string;
1212
stepContent: ReactElement;
1313
shouldHideNavButtons?: boolean;
14-
shouldStickyNavButtons?: boolean;
1514
hasStickyNavButtonsPadding?: boolean;
1615
hideBack?: boolean;
1716
hideSkip?: boolean;
@@ -52,7 +51,6 @@ const StepContainer: React.FC< Props > = ( {
5251
stepContent,
5352
stepName,
5453
shouldHideNavButtons,
55-
shouldStickyNavButtons,
5654
hasStickyNavButtonsPadding,
5755
hideBack,
5856
backLabelText,
@@ -182,13 +180,9 @@ const StepContainer: React.FC< Props > = ( {
182180
<ActionButtons
183181
className={ clsx( 'step-container__navigation', {
184182
'should-hide-nav-buttons': shouldHideNavButtons,
185-
'should-sticky-nav-buttons': shouldStickyNavButtons,
186183
'has-sticky-nav-buttons-padding': hasStickyNavButtonsPadding,
187184
} ) }
188185
>
189-
{ shouldStickyNavButtons && (
190-
<WordPressLogo className="step-container__navigation-logo" size={ 24 } />
191-
) }
192186
{ ! hideBack && <BackButton /> }
193187
{ ! hideSkip && skipButtonAlign === 'top' && <SkipButton /> }
194188
{ ! hideNext && <NextButton /> }

packages/onboarding/src/step-container/style.scss

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292

9393
@include break-xlarge {
9494
font-size: 2.75rem;
95+
margin-top: 107px;
9596
}
9697
}
9798

@@ -150,21 +151,29 @@
150151
}
151152
}
152153
.step-container__navigation.action-buttons {
153-
background-color: $white;
154154
height: 60px;
155155
align-items: center;
156156
justify-content: space-between;
157157
display: flex;
158158
font-size: 0.875rem;
159-
position: fixed;
160159
z-index: 30;
161-
inset-inline-start: 0;
162-
inset-inline-end: 0;
163160
bottom: 0;
164-
padding: 0 20px;
165161
margin: 0;
166162
border-top: none;
167-
box-shadow: inset 0 1px 0 #e2e4e7;
163+
164+
position: absolute;
165+
top: 8px;
166+
inset-inline-start: 72px;
167+
inset-inline-end: 24px;
168+
// Align with wordpress logo in signup-header
169+
padding: 1px 0 0;
170+
background-color: transparent;
171+
border: none;
172+
box-shadow: none;
173+
174+
&.has-sticky-nav-buttons-padding {
175+
padding-bottom: 48px;
176+
}
168177

169178
&:empty {
170179
display: none;
@@ -215,31 +224,6 @@
215224
display: block;
216225
}
217226
}
218-
219-
@include break-small {
220-
position: absolute;
221-
top: 8px;
222-
inset-inline-start: 72px;
223-
inset-inline-end: 24px;
224-
// Align with wordpress logo in signup-header
225-
padding: 1px 0 0;
226-
background-color: transparent;
227-
border: none;
228-
box-shadow: none;
229-
230-
&.should-sticky-nav-buttons {
231-
position: fixed;
232-
inset-inline-start: 0;
233-
inset-inline-end: 0;
234-
padding-inline-start: 24px;
235-
padding-inline-end: 24px;
236-
background-color: $white;
237-
}
238-
239-
&.has-sticky-nav-buttons-padding {
240-
padding-bottom: 48px;
241-
}
242-
}
243227
}
244228

245229
/**
@@ -248,11 +232,6 @@
248232
.step-container__content {
249233
margin-top: 0;
250234
display: block;
251-
min-height: 65vh;
252-
253-
@supports ( min-height: 65svh ) {
254-
min-height: calc(65svh - 50px);
255-
}
256235
}
257236

258237
/**
@@ -300,4 +279,4 @@
300279
margin-inline-end: 8px;
301280
}
302281
}
303-
}
282+
}

0 commit comments

Comments
 (0)