Skip to content

Commit 2c7b543

Browse files
authored
Danny's final feedback (codesandbox#3529)
* sync borders for sidebar, activity and title bar * add flex 1 to form buttons * sign in button needs more space * buttons should have more weirght * extra padding for non-icon buttons * modified the theme, modified the snapshot
1 parent 82c6370 commit 2c7b543

File tree

7 files changed

+26
-10
lines changed

7 files changed

+26
-10
lines changed

packages/app/src/app/pages/Sandbox/Editor/Header/Actions.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export const Actions = () => {
9494
{user?.curatorAt && (
9595
<Button
9696
variant="secondary"
97+
css={css({ paddingX: 3 })}
9798
onClick={() => pickSandboxModal({ description, id, title })}
9899
>
99100
Pick
@@ -113,6 +114,7 @@ export const Actions = () => {
113114
</Button>
114115
<Button
115116
variant="secondary"
117+
css={css({ paddingX: 3 })}
116118
onClick={() => modalOpened({ modal: 'newSandbox' })}
117119
>
118120
Create Sandbox

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/GitHub/GithubLogin.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const GithubLogin = () => {
2929
marginX={2}
3030
css={css({
3131
display: 'grid',
32-
gridTemplateColumns: '1fr 50px',
32+
gridTemplateColumns: '1fr auto',
3333
gridGap: 4,
3434
})}
3535
>

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/ProjectInfo/EditSummary.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,15 @@ export const EditSummary = ({ setEditing }) => {
9090
<TagInput value={newTags} onChange={setNewTags} />
9191
</Stack>
9292

93-
<Stack paddingX={2}>
94-
<Button variant="link" onClick={() => setEditing(false)}>
93+
<Stack justify="space-between" paddingX={2}>
94+
<Button
95+
variant="link"
96+
css={{ flex: 1 }}
97+
onClick={() => setEditing(false)}
98+
>
9599
Cancel
96100
</Button>
97-
<Button type="submit" variant="secondary">
101+
<Button type="submit" css={{ flex: 1 }} variant="secondary">
98102
Save
99103
</Button>
100104
</Stack>

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Server/VarForm.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,20 @@ export const VarForm = props => {
6363
</FormField>
6464
<Stack paddingX={2} marginTop={2}>
6565
{props.name && props.value ? (
66-
<Button variant="link" onClick={() => props.onCancel()}>
66+
<Button
67+
variant="link"
68+
css={{ flex: 1 }}
69+
onClick={() => props.onCancel()}
70+
>
6771
Cancel
6872
</Button>
6973
) : null}
70-
<Button variant="secondary" type="submit" disabled={!name || !value}>
74+
<Button
75+
type="submit"
76+
variant="secondary"
77+
css={{ flex: 1 }}
78+
disabled={!name || !value}
79+
>
7180
{props.name && props.value ? 'Save' : 'Add Secret'}
7281
</Button>
7382
</Stack>

packages/common/src/theme/__snapshots__/theme.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ Object {
467467
"$schema": "vscode://schemas/color-theme",
468468
"colors": Object {
469469
"activityBar.background": "#1C2022",
470-
"activityBar.border": "#111518",
470+
"activityBar.border": "#2d2d2d",
471471
"activityBarBadge.background": "#C0C0C0",
472472
"activityBarBadge.foreground": "#1C2022",
473473
"badge.background": "#374140",
@@ -508,7 +508,7 @@ Object {
508508
"tab.border": "#111518",
509509
"tab.inactiveBackground": "#111518",
510510
"titleBar.activeBackground": "#1C2022",
511-
"titleBar.border": "#111518",
511+
"titleBar.border": "#2d2d2d",
512512
},
513513
"isCodeSandbox": true,
514514
"tokenColors": Array [

packages/common/src/themes/codesandbox.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "dark",
55
"colors": {
66
"activityBar.background": "#1C2022",
7-
"activityBar.border": "#111518",
7+
"activityBar.border": "#2d2d2d",
88
"activityBarBadge.background": "#C0C0C0",
99
"activityBarBadge.foreground": "#1C2022",
1010
"badge.background": "#374140",
@@ -31,7 +31,7 @@
3131
"tab.border": "#111518",
3232
"tab.inactiveBackground": "#111518",
3333
"titleBar.activeBackground": "#1C2022",
34-
"titleBar.border": "#111518",
34+
"titleBar.border": "#2d2d2d",
3535
"editorSuggestWidget.background": "#111518",
3636
"editorSuggestWidget.selectedBackground": "#24282A",
3737
"editorSuggestWidget.border": "#111518",

packages/components/src/components/Button/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export const Button = styled(Element).attrs({ as: 'button' })<{
9797
height: 6,
9898
width: '100%',
9999
fontSize: 2,
100+
fontWeight: 'medium',
100101
lineHeight: 1, // trust the height
101102
border: 'none',
102103
borderRadius: 'small',

0 commit comments

Comments
 (0)