Skip to content

Commit fe4e0be

Browse files
committed
AXON-72: add logo and use vscode native components
1 parent 6c181c4 commit fe4e0be

File tree

4 files changed

+102
-22
lines changed

4 files changed

+102
-22
lines changed

package-lock.json

Lines changed: 75 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,6 +1414,7 @@
14141414
"@material-ui/styles": "^4.10.0",
14151415
"@segment/analytics-node": "^2.1.3",
14161416
"@types/mustache": "^4.0.1",
1417+
"@vscode/webview-ui-toolkit": "^1.4.0",
14171418
"awesome-debounce-promise": "^2.1.0",
14181419
"axios": "^1.7.4",
14191420
"axios-curlirize": "^1.3.4",

src/react/atlascode/onboarding/JiraBitbucketOnboarding.tsx

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import React, { useCallback } from 'react';
2-
import { Container, Typography, Radio, Button, Box, Card, CardActionArea, CardContent } from '@material-ui/core';
2+
import { Container, Typography, Box, Card, CardActionArea, CardContent } from '@material-ui/core';
33
import { Product } from '../common/types';
4+
import { VSCodeRadio, VSCodeButton } from '@vscode/webview-ui-toolkit/react';
5+
import { BitbucketOnboardingLogo } from '../icons/BitbucketOnboardingLogo';
6+
import { JiraOnboardingLogo } from '../icons/JiraOnboardingLogo';
47

58
type Props = {
69
product: Product;
@@ -36,7 +39,7 @@ const OnboardingRadio = ({
3639
}}
3740
>
3841
<CardContent style={formControlStyles}>
39-
<Radio size="small" checked={checked === value} />
42+
<VSCodeRadio checked={checked === value} />
4043
<Box flexDirection={'column'}>
4144
<Typography style={{ fontWeight: 'bold' }}>{title}</Typography>
4245
{description && <Typography>{description}</Typography>}
@@ -56,7 +59,7 @@ export const JiraBitbucketOnboarding: React.FC<Props> = ({
5659
signInText,
5760
valueSet,
5861
}) => {
59-
const [checked, setChecked] = React.useState('');
62+
const [checked, setChecked] = React.useState(valueSet.cloud);
6063

6164
const handleValueChange = useCallback(
6265
(value: string) => {
@@ -67,11 +70,10 @@ export const JiraBitbucketOnboarding: React.FC<Props> = ({
6770
);
6871

6972
return (
70-
<Container maxWidth="xs">
73+
<Container style={{ justifyContent: 'center' }} maxWidth="xs">
7174
<Box style={wrapperStyles} flexDirection="column">
72-
<Typography style={{ fontWeight: 'bold' }} variant="h2">
73-
What version of {product} do you use?
74-
</Typography>
75+
{product === 'Jira' ? <JiraOnboardingLogo /> : <BitbucketOnboardingLogo />}
76+
<Typography variant="h2">What version of {product} do you use?</Typography>
7577
<Box flexDirection="column" style={radioGroupStyles}>
7678
<OnboardingRadio
7779
checked={checked}
@@ -102,25 +104,23 @@ export const JiraBitbucketOnboarding: React.FC<Props> = ({
102104
alignSelf: 'stretch',
103105
}}
104106
>
105-
<Button
107+
<VSCodeButton
106108
disabled={!handleBack}
107109
onClick={() => {
108110
handleBack && handleBack();
109111
}}
110-
size="small"
112+
appearance="secondary"
111113
>
112114
Back
113-
</Button>
114-
<Button
115-
size="small"
116-
variant="contained"
115+
</VSCodeButton>
116+
<VSCodeButton
117117
onClick={() => {
118118
executeSetup();
119119
handleNext();
120120
}}
121121
>
122122
{signInText}
123-
</Button>
123+
</VSCodeButton>
124124
</Box>
125125
</Box>
126126
</Container>
@@ -141,8 +141,6 @@ const formControlStyles = {
141141
gap: '8px',
142142
alignSelf: 'stretch',
143143
borderRadius: '4px',
144-
border: '1px solid token(color.border)',
145-
backgroundColor: 'token(color.background)',
146144
};
147145

148146
const radioGroupStyles = {

src/react/atlascode/onboarding/OnboardingPage.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Button, Container, lighten, makeStyles, Step, StepLabel, Stepper, Theme } from '@material-ui/core';
1+
import { Box, Button, Container, lighten, makeStyles, Step, StepLabel, Stepper, Theme } from '@material-ui/core';
22
import React, { useCallback, useEffect, useState } from 'react';
33
import {
44
AuthInfo,
@@ -339,7 +339,17 @@ export const OnboardingPage: React.FunctionComponent = () => {
339339
);
340340
})}
341341
</Stepper>
342-
<div>{useAuthUI ? authUI_v1 : oldAuthUI}</div>
342+
<Box
343+
style={{
344+
display: 'flex',
345+
flex: '1 0 0',
346+
alignItems: 'center',
347+
justifyContent: 'center',
348+
padding: '24px',
349+
}}
350+
>
351+
{useAuthUI ? authUI_v1 : oldAuthUI}
352+
</Box>
343353
</div>
344354
</Container>
345355
<AuthDialog

0 commit comments

Comments
 (0)