Skip to content

Commit 1410dfa

Browse files
Merge branch 'master' into change-message
2 parents 3ad8d1b + d79f112 commit 1410dfa

File tree

97 files changed

+5904
-2448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+5904
-2448
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ workflows:
389389
- typecheck
390390
- test-integrations
391391
- test-jest
392+
- test-visual-regressions
392393
filters:
393394
branches:
394395
only:

packages/app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@
222222
"subworkers": "^1.0.1",
223223
"svg-react-loader": "^0.4.4",
224224
"tern": "^0.21.0",
225+
"textextensions": "^3.3.0",
225226
"use-interval": "^1.2.1",
226227
"util": "0.11.1",
227228
"vue": "^2.5.2",

packages/app/src/app/components/CreateNewSandbox/CreateSandbox/Create/PersonalTemplates/FilteredTemplates.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export const FilteredTemplates = ({
2525
threshold: 0.3,
2626
distance: 10,
2727
keys: [
28-
{ name: 'sandbox.title', weight: 0.5 },
29-
{ name: 'sandbox.description', weight: 0.5 },
28+
{ name: 'sandbox.title', weight: 0.3 },
29+
{ name: 'sandbox.description', weight: 0.25 },
3030
{ name: 'sandbox.alias', weight: 0.2 },
3131
{ name: 'sandbox.source.template', weight: 0.2 },
3232
{ name: 'sandbox.id', weight: 0.05 },

packages/app/src/app/components/Integration/DetailInfo/DetailInfo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import CrossIcon from 'react-icons/lib/md/clear';
33
import Margin from '@codesandbox/common/lib/components/spacing/Margin';
44
import Tooltip from '@codesandbox/common/lib/components/Tooltip';
5-
import { Button } from '@codesandbox/common/lib/components/Button';
5+
import { Button } from '@codesandbox/components';
66
import { Details, Heading, Info, Action } from './elements';
77

88
interface IDetailInfoProps {
@@ -31,7 +31,7 @@ export const DetailInfo: React.FC<IDetailInfoProps> = ({
3131
</Action>
3232
</Tooltip>
3333
) : (
34-
<Button small onClick={onSignIn}>
34+
<Button style={{ width: 'auto' }} onClick={onSignIn}>
3535
Sign in
3636
</Button>
3737
)}

packages/app/src/app/components/Integration/elements.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export const Container = styled.div<{
88
display: inline-flex;
99
width: 100%;
1010
border-radius: 4px;
11+
border: 1px solid ${theme.colors.avatar.border};
1112
color: ${theme.light ? css`#636363` : css`rgba(255, 255, 255, 0.8)`};
1213
overflow: hidden;
1314

packages/app/src/app/components/Modal/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ class ModalComponent extends React.Component {
7474
left: 0,
7575
right: 0,
7676
margin: `0 auto ${top}vh`,
77+
fontFamily: "'Inter', sans-serif",
7778
outline: 'none',
7879
},
7980
});
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
import styled from 'styled-components';
2-
import Input from '@codesandbox/common/lib/components/Input';
2+
import { Input } from '@codesandbox/components';
33

44
export const CardContainer = styled.div`
5-
padding: 0.5rem;
65
margin-top: 0.25rem;
7-
margin-bottom: 0.5rem;
8-
border-radius: 4px;
9-
background-color: rgba(0, 0, 0, 0.3);
106
`;
117

128
export const StripeInput = styled(Input)`
@@ -23,8 +19,3 @@ export const ErrorText = styled.div`
2319
color: ${props => props.theme.red};
2420
font-size: 0.875rem;
2521
`;
26-
27-
export const Label = styled.label`
28-
font-size: 0.875rem;
29-
color: rgba(255, 255, 255, 0.5);
30-
`;

packages/app/src/app/components/SubscribeForm/CheckoutForm/index.tsx

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ import {
44
CardElement,
55
ReactStripeElements,
66
} from 'react-stripe-elements';
7-
import { Button } from '@codesandbox/common/lib/components/Button';
7+
import { withTheme } from 'styled-components';
8+
import css from '@styled-system/css';
89
import { logError } from '@codesandbox/common/lib/utils/analytics';
10+
import { Button, Label, Element } from '@codesandbox/components';
911

10-
import { CardContainer, StripeInput, ErrorText, Label } from './elements';
12+
import { CardContainer, StripeInput, ErrorText } from './elements';
1113

1214
interface Props {
1315
name: string;
@@ -18,6 +20,7 @@ interface Props {
1820
stripe?: ReactStripeElements.StripeProps;
1921
error?: Error | string;
2022
hasCoupon?: boolean;
23+
theme?: any;
2124
}
2225

2326
interface State {
@@ -106,6 +109,7 @@ class CheckoutFormComponent extends React.PureComponent<Props, State> {
106109
isLoading,
107110
error,
108111
hasCoupon = false,
112+
theme,
109113
} = this.props;
110114
const { errors, loading: stateLoading } = this.state;
111115

@@ -115,34 +119,61 @@ class CheckoutFormComponent extends React.PureComponent<Props, State> {
115119

116120
return (
117121
<form onSubmit={this.handleSubmit}>
118-
<Label>Cardholder Name</Label>
122+
<Label variant="muted" size={3} paddingBottom={1}>
123+
Cardholder Name
124+
</Label>
119125
{errors.name != null && <ErrorText>{errors.name}</ErrorText>}
120-
<div>
126+
<Element>
121127
<StripeInput
122128
value={this.state.name}
123129
onChange={this.setName}
124130
placeholder="Please enter your name"
125131
/>
126-
</div>
132+
</Element>
127133

128-
<Label>Card</Label>
134+
<Label variant="muted" size={3} paddingBottom={1}>
135+
Card
136+
</Label>
129137
{stripeError != null && <ErrorText>{stripeError}</ErrorText>}
130138
<CardContainer>
131-
<CardElement
132-
style={{ base: { color: 'white', fontWeight: '500' } }}
133-
/>
139+
<Element
140+
css={css({
141+
height: '32px',
142+
paddingTop: '6px',
143+
width: '100%',
144+
paddingX: 2,
145+
fontSize: 3,
146+
lineHeight: 1, // trust the height
147+
fontFamily: 'Inter, sans-serif',
148+
borderRadius: 'small',
149+
backgroundColor: 'input.background',
150+
border: '1px solid',
151+
borderColor: 'input.border',
152+
color: 'input.foreground',
153+
})}
154+
>
155+
<CardElement
156+
style={{
157+
base: {
158+
color: theme.colors.input.foreground,
159+
},
160+
}}
161+
/>
162+
</Element>
134163
</CardContainer>
135164

136165
{hasCoupon && (
137166
<>
138-
<Label>Coupon</Label>
139-
<div>
167+
<Label variant="muted" size={3} paddingBottom={1}>
168+
Coupon
169+
</Label>
170+
<Element>
140171
<StripeInput
141172
value={this.state.coupon}
142173
onChange={this.setCoupon}
143174
placeholder="Coupon or Discount Code"
144175
/>
145-
</div>
176+
</Element>
146177
</>
147178
)}
148179

@@ -157,5 +188,5 @@ class CheckoutFormComponent extends React.PureComponent<Props, State> {
157188
);
158189
}
159190
}
160-
161-
export const CheckoutForm = injectStripe(CheckoutFormComponent);
191+
// @ts-ignore
192+
export const CheckoutForm = injectStripe(withTheme(CheckoutFormComponent));

packages/app/src/app/components/SubscribeForm/elements.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/app/src/app/components/SubscribeForm/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)