Skip to content

Commit ecee78a

Browse files
jenny-s51thaorell
authored andcommitted
refactor(ws): Enhance "Create Workspace" Title Spacing (#266)
Signed-off-by: Jenny <[email protected]>
1 parent 1ff96ef commit ecee78a

File tree

1 file changed

+77
-63
lines changed

1 file changed

+77
-63
lines changed

workspaces/frontend/src/app/pages/Workspaces/Creation/WorkspaceCreation.tsx

+77-63
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {
88
PageSection,
99
ProgressStep,
1010
ProgressStepper,
11+
Stack,
12+
StackItem,
1113
} from '@patternfly/react-core';
1214
import { useCallback, useState } from 'react';
1315
import { useNavigate } from 'react-router-dom';
@@ -75,69 +77,81 @@ const WorkspaceCreation: React.FunctionComponent = () => {
7577
<>
7678
<PageGroup stickyOnBreakpoint={{ default: 'top' }}>
7779
<PageSection isFilled={false}>
78-
<Content>
79-
<h1>Create workspace</h1>
80-
</Content>
81-
<ProgressStepper aria-label="Workspace creation stepper">
82-
<ProgressStep
83-
variant={getStepVariant(WorkspaceCreationSteps.KindSelection)}
84-
id="kind-selection-step"
85-
icon={
86-
getStepVariant(WorkspaceCreationSteps.KindSelection) === 'success' ? (
87-
<CheckIcon />
88-
) : (
89-
1
90-
)
91-
}
92-
titleId="kind-selection-step-title"
93-
aria-label="Kind selection step"
94-
>
95-
Workspace Kind
96-
</ProgressStep>
97-
<ProgressStep
98-
variant={getStepVariant(WorkspaceCreationSteps.ImageSelection)}
99-
isCurrent
100-
id="image-selection-step"
101-
icon={
102-
getStepVariant(WorkspaceCreationSteps.ImageSelection) === 'success' ? (
103-
<CheckIcon />
104-
) : (
105-
2
106-
)
107-
}
108-
titleId="image-selection-step-title"
109-
aria-label="Image selection step"
110-
>
111-
Image
112-
</ProgressStep>
113-
<ProgressStep
114-
variant={getStepVariant(WorkspaceCreationSteps.PodConfigSelection)}
115-
isCurrent
116-
id="pod-config-selection-step"
117-
icon={
118-
getStepVariant(WorkspaceCreationSteps.PodConfigSelection) === 'success' ? (
119-
<CheckIcon />
120-
) : (
121-
3
122-
)
123-
}
124-
titleId="pod-config-selection-step-title"
125-
aria-label="Pod config selection step"
126-
>
127-
Pod Config
128-
</ProgressStep>
129-
<ProgressStep
130-
variant={getStepVariant(WorkspaceCreationSteps.Properties)}
131-
id="properties-step"
132-
icon={
133-
getStepVariant(WorkspaceCreationSteps.Properties) === 'success' ? <CheckIcon /> : 4
134-
}
135-
titleId="properties-step-title"
136-
aria-label="Properties step"
137-
>
138-
Properties
139-
</ProgressStep>
140-
</ProgressStepper>
80+
<Stack hasGutter>
81+
<StackItem>
82+
<Flex>
83+
<Content>
84+
<h1>Create workspace</h1>
85+
</Content>
86+
</Flex>
87+
</StackItem>
88+
<StackItem>
89+
<ProgressStepper aria-label="Workspace creation stepper">
90+
<ProgressStep
91+
variant={getStepVariant(WorkspaceCreationSteps.KindSelection)}
92+
id="kind-selection-step"
93+
icon={
94+
getStepVariant(WorkspaceCreationSteps.KindSelection) === 'success' ? (
95+
<CheckIcon />
96+
) : (
97+
1
98+
)
99+
}
100+
titleId="kind-selection-step-title"
101+
aria-label="Kind selection step"
102+
>
103+
Workspace Kind
104+
</ProgressStep>
105+
<ProgressStep
106+
variant={getStepVariant(WorkspaceCreationSteps.ImageSelection)}
107+
isCurrent
108+
id="image-selection-step"
109+
icon={
110+
getStepVariant(WorkspaceCreationSteps.ImageSelection) === 'success' ? (
111+
<CheckIcon />
112+
) : (
113+
2
114+
)
115+
}
116+
titleId="image-selection-step-title"
117+
aria-label="Image selection step"
118+
>
119+
Image
120+
</ProgressStep>
121+
<ProgressStep
122+
variant={getStepVariant(WorkspaceCreationSteps.PodConfigSelection)}
123+
isCurrent
124+
id="pod-config-selection-step"
125+
icon={
126+
getStepVariant(WorkspaceCreationSteps.PodConfigSelection) === 'success' ? (
127+
<CheckIcon />
128+
) : (
129+
3
130+
)
131+
}
132+
titleId="pod-config-selection-step-title"
133+
aria-label="Pod config selection step"
134+
>
135+
Pod Config
136+
</ProgressStep>
137+
<ProgressStep
138+
variant={getStepVariant(WorkspaceCreationSteps.Properties)}
139+
id="properties-step"
140+
icon={
141+
getStepVariant(WorkspaceCreationSteps.Properties) === 'success' ? (
142+
<CheckIcon />
143+
) : (
144+
4
145+
)
146+
}
147+
titleId="properties-step-title"
148+
aria-label="Properties step"
149+
>
150+
Properties
151+
</ProgressStep>
152+
</ProgressStepper>
153+
</StackItem>
154+
</Stack>
141155
</PageSection>
142156
</PageGroup>
143157
<PageSection isFilled>

0 commit comments

Comments
 (0)