Skip to content

Commit ffcf9cf

Browse files
More Polish (codesandbox#3492)
* add follow button * fix click on template icon * fix truncated text * add team * fix chat toggle * fix grammar * fiz ts * add version * make codesandbox capital * always open files * fix ts * clean up * Apply suggestions from code review Co-Authored-By: Michaël De Boey <[email protected]> * Update packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/ProjectInfo/BookmarkTemplateButton/index.tsx Co-Authored-By: Michaël De Boey <[email protected]> * fix activitybar Co-authored-by: Michaël De Boey <[email protected]>
1 parent be757e1 commit ffcf9cf

File tree

29 files changed

+350
-92
lines changed

29 files changed

+350
-92
lines changed

packages/app/src/app/overmind/namespaces/live/actions.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,13 @@ export const onSendChat: Action<{ message: string }> = (
237237
effects.live.sendChat(message);
238238
};
239239

240-
export const onChatEnabledChange: Action<boolean> = (
241-
{ effects, state },
242-
enabled
243-
) => {
240+
export const onChatEnabledToggle: Action = ({ effects, state }) => {
244241
effects.analytics.track('Enable Live Chat');
245242

246243
if (state.live.isOwner && state.live.roomInfo) {
247-
state.live.roomInfo.chatEnabled = enabled;
248-
effects.live.sendChatEnabled(enabled);
244+
const chatEnabled = state.live.roomInfo.chatEnabled;
245+
state.live.roomInfo.chatEnabled = !chatEnabled;
246+
effects.live.sendChatEnabled(!chatEnabled);
249247
}
250248
};
251249

packages/app/src/app/pages/Sandbox/Editor/Navigation/Navigation.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Tooltip, {
99
SingletonTooltip,
1010
} from '@codesandbox/common/lib/components/Tooltip';
1111
import { TippyProps } from '@tippy.js/react';
12+
1213
import {
1314
DeployIcon,
1415
ExplorerIcon,
@@ -91,6 +92,7 @@ export const Navigation: FunctionComponent<Props> = ({
9192
const disabledItems = getDisabledItems(state);
9293

9394
return (
95+
// @ts-ignore
9496
<Container
9597
align="center"
9698
direction="vertical"

packages/app/src/app/pages/Sandbox/Editor/Workspace/items/Live/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const Live: FunctionComponent = () => {
2020
live: {
2121
createLiveClicked,
2222
onAddEditorClicked,
23-
onChatEnabledChange,
23+
onChatEnabledToggle,
2424
onFollow,
2525
onModeChanged,
2626
onRemoveEditorClicked,
@@ -81,7 +81,7 @@ export const Live: FunctionComponent = () => {
8181
roomInfo={roomInfo}
8282
setFollowing={onFollow}
8383
setMode={onModeChanged}
84-
toggleChatEnabled={() => onChatEnabledChange(!roomInfo.chatEnabled)}
84+
toggleChatEnabled={onChatEnabledToggle}
8585
toggleNotificationsHidden={onToggleNotificationsHidden}
8686
/>
8787
) : (

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/ConfigurationFiles/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ export const ConfigurationFilesComponent = ({ theme }) => {
9191
Configuration for your Sandbox
9292
</Text>
9393
<Text variant="muted">
94-
Codesandbox supports several config files per template, you can
95-
see and edit all supported files for the current sandbox here.
94+
CodeSandbox supports several configuration files per template, you
95+
can see and edit all supported files for the current sandbox here.
9696
</Text>
9797
</Element>
9898
<Stack direction="vertical" gap={4}>

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Deployment/Netlify.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const Netlify = () => {
4646
<Integration icon={NetlifyIcon} title="netlify">
4747
<Element marginX={2} marginBottom={netlifySite ? 6 : 0}>
4848
<Text variant="muted" block marginBottom={4}>
49-
Deploy your sandbox to{' '}
49+
Deploy your sandbox site to{' '}
5050
<Link href="https://www.netlify.com/" target="_blank">
5151
Netlify
5252
</Link>

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Deployment/NotLoggedIn.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const NotLoggedIn = () => {
2020
<Element css={css({ paddingX: 2 })}>
2121
<Stack direction="vertical" gap={2} marginBottom={6}>
2222
<Text size={2} variant="muted" block>
23-
You can deploy a production version of your sandbox using one our
23+
You can deploy a production version of your sandbox using one of our
2424
supported providers - Netlify or ZEIT.
2525
</Text>
2626
<Text size={2} variant="muted" block>

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Deployment/NotOwner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const NotOwner = () => {
2525
<Element css={css({ paddingX: 2 })}>
2626
<Stack direction="vertical" gap={2} marginBottom={6}>
2727
<Text size={2} variant="muted" block>
28-
You can deploy a production version of your sandbox using one our
28+
You can deploy a production version of your sandbox using one of our
2929
supported providers - Netlify or ZEIT.
3030
</Text>
3131
<Text size={2} variant="muted" block>

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Deployment/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export const Deployment: FunctionComponent = () => {
3333
<Collapsible title="Deployment" defaultOpen>
3434
<Element paddingX={2}>
3535
<Text variant="muted" block marginBottom={6}>
36-
You can deploy a production version of your sandbox using one our
37-
supported providers.
36+
You can deploy a production version of your sandbox using one of our
37+
supported providers - Netlify or ZEIT.
3838
</Text>
3939
<Stack direction="vertical" gap={5}>
4040
<Zeit />

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Explorer/Dependencies/Dependency/index.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,17 @@ export class Dependency extends React.PureComponent<Props, State> {
145145
<Stack
146146
align="center"
147147
justify="flex-end"
148-
css={css({ position: 'absolute', right: 2 })}
148+
css={css({
149+
position: 'absolute',
150+
right: 2,
151+
flexGrow: 0,
152+
flexShrink: 1,
153+
width: '100%',
154+
})}
149155
>
150156
<Text
151157
variant="muted"
152-
maxWidth={75}
158+
maxWidth="30%"
153159
css={{ display: hovering ? 'none' : 'block' }}
154160
>
155161
{formatVersion(dependencies[dependency])}{' '}

packages/app/src/app/pages/Sandbox/Editor/Workspace/screens/Explorer/Files/index.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import css from '@styled-system/css';
77
import DirectoryEntry from './DirectoryEntry/index';
88
import EditIcons from './DirectoryEntry/Entry/EditIcons';
99

10-
export const Files = ({ defaultOpen = null }) => {
10+
export const Files = () => {
1111
const {
1212
state: { editor: editorState, isLoggedIn },
1313
actions: { editor, files },
@@ -27,11 +27,7 @@ export const Files = ({ defaultOpen = null }) => {
2727

2828
return (
2929
<>
30-
<Collapsible
31-
title="Files"
32-
defaultOpen={defaultOpen}
33-
css={{ position: 'relative' }}
34-
>
30+
<Collapsible title="Files" defaultOpen css={{ position: 'relative' }}>
3531
<SidebarRow
3632
justify="flex-end"
3733
css={css({

0 commit comments

Comments
 (0)