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

[material-ui] Refine checkout template #40967

Merged
merged 72 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
802a209
Redesigned the layout
zanivan Feb 6, 2024
5a4e42a
More refinement
zanivan Feb 6, 2024
45501f4
More polishing
zanivan Feb 7, 2024
d45f44b
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 8, 2024
f936fc2
More polishing
zanivan Feb 8, 2024
de31b79
Tweaks to mobile and responsive
zanivan Feb 9, 2024
82af236
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 13, 2024
b989f93
Add card to payment details
zanivan Feb 13, 2024
03164e3
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 14, 2024
eee9a21
Tweaks to mobile version
zanivan Feb 14, 2024
c4397ca
Fix lint
zanivan Feb 14, 2024
47ab2ce
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 15, 2024
2208ffb
Standardize theme toggler
zanivan Feb 15, 2024
6925275
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 19, 2024
b9e294f
remove material icon
zanivan Feb 19, 2024
2cdeefd
Fix bug with logo on default theme
zanivan Feb 19, 2024
f72693e
Fix typo
zanivan Feb 19, 2024
01ce3c5
Round of polishing after feedback
zanivan Feb 20, 2024
3615c70
Fix eslint
zanivan Feb 20, 2024
083c555
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 21, 2024
1bd68fb
Round of polishing after Sam's feedback
zanivan Feb 21, 2024
c12642d
Run docs:typescript:formatted
zanivan Feb 21, 2024
d8db47b
First round of polishing after Matt's feedback
zanivan Feb 21, 2024
e9d42cc
run docs:typescript:formatted
zanivan Feb 21, 2024
c2ae6a1
Add info section to mobile
zanivan Feb 22, 2024
956bd6c
docs:typescript:formatted
zanivan Feb 22, 2024
ac230c0
Make credit card have the right aspect ratio
zanivan Feb 22, 2024
0a5aeab
Isolate Checkout's theme from LP theme
zanivan Feb 22, 2024
2a008be
Sanitise and format data on the credit card
zanivan Feb 22, 2024
e075d3b
docs:typescript:formatted
zanivan Feb 22, 2024
1863706
Fix typescript
zanivan Feb 22, 2024
8438344
fix lint
zanivan Feb 22, 2024
84410ed
More polishing and fixes
zanivan Feb 23, 2024
0c64d16
Tweaks to dark theme
zanivan Feb 23, 2024
68e2fcc
Fix MD dark theme
zanivan Feb 23, 2024
166d006
Add 'back to' back button
zanivan Feb 26, 2024
13724c5
Switch the background colors
zanivan Feb 26, 2024
0cdf49d
Add box-shadow to MuiOutlinedInput
zanivan Feb 26, 2024
1aa1ee6
Tweaks to placeholder color
zanivan Feb 26, 2024
93f71f1
Fix required props
zanivan Feb 26, 2024
b10e1ab
Remove dotted line
zanivan Feb 26, 2024
598b977
Add icons do buttons
zanivan Feb 26, 2024
40c6bab
Softens buttons' borders
zanivan Feb 26, 2024
1e48248
Make the credit card bigger
zanivan Feb 26, 2024
261f63c
Tweaks to success page
zanivan Feb 26, 2024
1954ff3
Fix responsiveness
zanivan Feb 26, 2024
2e13383
run docs:typescript:formatted
zanivan Feb 26, 2024
472a8f4
Tweaks to button border
zanivan Feb 27, 2024
51ea676
Fix LP theme
zanivan Feb 27, 2024
95f9e91
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 28, 2024
3d7da6d
Danilo's feedback
zanivan Feb 28, 2024
6a03a1f
Remove unused components from theme
zanivan Feb 28, 2024
854aeaa
Make inputs consistent
zanivan Feb 28, 2024
09c6ed2
Add radio group to payments
zanivan Feb 28, 2024
16c520f
Run docs:typescript:formatted
zanivan Feb 29, 2024
31afdcd
Fix lint
zanivan Feb 29, 2024
ee78349
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Feb 29, 2024
ad72bf8
Prettier
zanivan Feb 29, 2024
9a5b975
Round of polishing after Danilo's feedback
zanivan Mar 4, 2024
ffa59ec
Organize imports
zanivan Mar 4, 2024
1400bf0
Fix a11y errors
zanivan Mar 4, 2024
076326f
Run docs:typescript:formatted
zanivan Mar 4, 2024
060617e
Update thumbnail
zanivan Mar 4, 2024
76cd836
More polishing
zanivan Mar 5, 2024
1f70bf0
Run docs:typescript:formatted
zanivan Mar 5, 2024
42a94ec
Run prettier
zanivan Mar 5, 2024
c9f7b86
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Mar 6, 2024
7c70048
Skip regression test for theme file
zanivan Mar 6, 2024
421bc80
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Mar 6, 2024
0d1a233
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Mar 6, 2024
d5c6f9e
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Mar 7, 2024
257acbb
Merge remote-tracking branch 'upstream/master' into template-polishin…
zanivan Mar 8, 2024
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
Prev Previous commit
Next Next commit
Tweaks to mobile and responsive
  • Loading branch information
zanivan committed Feb 9, 2024
commit de31b79cc955261277b609ddcae29fc2a00f389c
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ const FormGrid = styled(Grid)(({ theme }) => ({
export default function AddressForm() {
return (
<React.Fragment>
<Typography variant="h6" gutterBottom>
<Typography variant="h6" sx={{ mb: 4 }}>
Shipping address
</Typography>
<Grid container spacing={3}>
<FormGrid item xs={12} sm={6}>
<FormLabel>First name</FormLabel>
<FormLabel required>First name</FormLabel>
<InputBase
id="first-name"
name="first-name"
Expand All @@ -32,7 +32,7 @@ export default function AddressForm() {
/>
</FormGrid>
<FormGrid item xs={12} sm={6}>
<FormLabel>Last name</FormLabel>
<FormLabel required>Last name</FormLabel>
<InputBase
id="last-name"
name="last-name"
Expand All @@ -44,7 +44,7 @@ export default function AddressForm() {
/>
</FormGrid>
<FormGrid item xs={12} sm={6}>
<FormLabel>Country</FormLabel>
<FormLabel required>Country</FormLabel>
<InputBase
id="country"
name="country"
Expand All @@ -56,7 +56,7 @@ export default function AddressForm() {
/>
</FormGrid>
<FormGrid item xs={12} sm={6}>
<FormLabel>Zip / Postal code</FormLabel>
<FormLabel required>Zip / Postal code</FormLabel>
<InputBase
id="zip"
name="zip"
Expand All @@ -69,7 +69,7 @@ export default function AddressForm() {
</FormGrid>

<FormGrid item xs={12}>
<FormLabel>Address line 1</FormLabel>
<FormLabel required>Address line 1</FormLabel>
<InputBase
id="address1"
name="address1"
Expand All @@ -93,7 +93,7 @@ export default function AddressForm() {
/>
</FormGrid>
<FormGrid item xs={12} sm={6}>
<FormLabel>City</FormLabel>
<FormLabel required>City</FormLabel>
<InputBase
id="City"
name="City"
Expand All @@ -105,7 +105,7 @@ export default function AddressForm() {
/>
</FormGrid>
<FormGrid item xs={12} sm={6}>
<FormLabel>State</FormLabel>
<FormLabel required>State</FormLabel>
<InputBase
id="State"
name="State"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ const FormGrid = styled(Grid)(({ theme }) => ({
export default function AddressForm() {
return (
<React.Fragment>
<Typography variant="h6" gutterBottom>
<Typography variant="h6" sx={{ mb: 4 }}>
Shipping address
</Typography>
<Grid container spacing={3}>
<FormGrid item xs={12} sm={6}>
<FormLabel>First name</FormLabel>
<FormLabel required>First name</FormLabel>
<InputBase
id="first-name"
name="first-name"
Expand All @@ -32,7 +32,7 @@ export default function AddressForm() {
/>
</FormGrid>
<FormGrid item xs={12} sm={6}>
<FormLabel>Last name</FormLabel>
<FormLabel required>Last name</FormLabel>
<InputBase
id="last-name"
name="last-name"
Expand All @@ -44,7 +44,7 @@ export default function AddressForm() {
/>
</FormGrid>
<FormGrid item xs={12} sm={6}>
<FormLabel>Country</FormLabel>
<FormLabel required>Country</FormLabel>
<InputBase
id="country"
name="country"
Expand All @@ -56,7 +56,7 @@ export default function AddressForm() {
/>
</FormGrid>
<FormGrid item xs={12} sm={6}>
<FormLabel>Zip / Postal code</FormLabel>
<FormLabel required>Zip / Postal code</FormLabel>
<InputBase
id="zip"
name="zip"
Expand All @@ -69,7 +69,7 @@ export default function AddressForm() {
</FormGrid>

<FormGrid item xs={12}>
<FormLabel>Address line 1</FormLabel>
<FormLabel required>Address line 1</FormLabel>
<InputBase
id="address1"
name="address1"
Expand All @@ -93,7 +93,7 @@ export default function AddressForm() {
/>
</FormGrid>
<FormGrid item xs={12} sm={6}>
<FormLabel>City</FormLabel>
<FormLabel required>City</FormLabel>
<InputBase
id="City"
name="City"
Expand All @@ -105,7 +105,7 @@ export default function AddressForm() {
/>
</FormGrid>
<FormGrid item xs={12} sm={6}>
<FormLabel>State</FormLabel>
<FormLabel required>State</FormLabel>
<InputBase
id="State"
name="State"
Expand Down
84 changes: 72 additions & 12 deletions docs/data/material/getting-started/templates/checkout/Checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ export default function Checkout() {
return (
<ThemeProvider theme={showCustomTheme ? LPtheme : defaultTheme}>
<CssBaseline />
<Grid container sx={{ height: '100dvh' }}>
<Grid container sx={{ height: { xs: '100%', sm: '100dvh' } }}>
<Grid
item
xs={12}
sm={5}
lg={4}
sx={{
display: 'flex',
display: { xs: 'none', sm: 'flex' },
flexDirection: 'column',
backgroundColor: 'background.default',
borderRight: '1px solid',
Expand Down Expand Up @@ -180,13 +180,13 @@ export default function Checkout() {
sx={{
display: 'flex',
flexDirection: 'column',
backgroundColor: 'background.paper',
backgroundColor: { xs: 'transparent', sm: 'background.paper' },
borderRight: '1px solid',
borderColor: 'divider',
alignItems: 'start',
pt: 4,
px: 10,
gap: 16,
pt: { xs: 2, sm: 4 },
px: { xs: 2, sm: 10 },
gap: { xs: 2, sm: 16 },
}}
>
<Box
Expand All @@ -198,6 +198,34 @@ export default function Checkout() {
height: 56,
}}
>
<Box
sx={{
display: { xs: 'flex', sm: 'none' },
flexDirection: 'column',
justifyContent: 'space-between',
width: '100%',
alignItems: 'center',
}}
>
<Box
sx={{
display: 'flex',
flexDirection: 'column',
flexGrow: 1,
width: '100%',
maxWidth: 500,
}}
>
<Button
startIcon={<ArrowBackRoundedIcon />}
component="a"
href="/material-ui/getting-started/templates/landing-page/"
sx={{ alignSelf: 'start', ml: '-8px' }}
>
Back to Sitemark
</Button>
</Box>
</Box>
<ToggleColorMode mode={mode} toggleColorMode={toggleColorMode} />
</Box>

Expand All @@ -207,11 +235,14 @@ export default function Checkout() {
flexDirection: 'column',
flexGrow: 1,
maxWidth: 600,
height: 600,
maxHeight: '700px',
maxHeight: '720px',
}}
>
<Stepper activeStep={activeStep} sx={{ mb: 10 }}>
<Stepper
id="desktop-stepper"
activeStep={activeStep}
sx={{ display: { xs: 'none', sm: 'flex' }, mb: 10 }}
>
{steps.map((label) => (
<Step
sx={{
Expand All @@ -224,15 +255,43 @@ export default function Checkout() {
</Step>
))}
</Stepper>
<Stepper
id="mobile-stepper"
activeStep={activeStep}
alternativeLabel
sx={{ display: { xs: 'flex', sm: 'none' }, mb: 4 }}
>
{steps.map((label) => (
<Step
sx={{
':first-child': { pl: 0 },
':last-child': { pr: 0 },
}}
key={label}
>
<StepLabel
sx={{ '.MuiStepLabel-labelContainer': { maxWidth: '70px' } }}
>
{label}
</StepLabel>
</Step>
))}
</Stepper>
{activeStep === steps.length ? (
<React.Fragment>
<Typography variant="h1" gutterBottom>
📦
</Typography>
<Typography variant="h5" gutterBottom>
Thank you for your order.
</Typography>
<Typography variant="subtitle1" gutterBottom>
Your order number is #140396. We have emailed your order
confirmation, and will send you an update when your order has
shipped.
Your order number is
<Typography component="span" sx={{ fontWeight: 600 }}>
&nbsp;#140396
</Typography>
. We have emailed your order confirmation, and will send you an
update when your order has shipped.
</Typography>
<Button variant="contained" sx={{ alignSelf: 'start', mt: 2 }}>
Go to my orders
Expand All @@ -248,6 +307,7 @@ export default function Checkout() {
alignItems: 'end',
flexGrow: 1,
gap: 1,
pb: { xs: 12, sm: 0 },
}}
>
{activeStep !== 0 && (
Expand Down
Loading
Loading