Skip to content

[pull] master from codesandbox:master #886

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

Merged
merged 2 commits into from
Aug 4, 2022
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ export const FolderCard: React.FC<FolderItemComponentProps> = ({
direction="vertical"
gap={2}
onClick={onClick}
onDoubleClick={onDoubleClick}
onDoubleClick={editing ? undefined : onDoubleClick}
onContextMenu={onContextMenu}
{...props}
css={css({
Original file line number Diff line number Diff line change
@@ -247,7 +247,7 @@ export const SandboxCard = ({
<Stack
direction="vertical"
onClick={onClick}
onDoubleClick={onDoubleClick}
onDoubleClick={editing ? undefined : onDoubleClick}
onBlur={onBlur}
onContextMenu={onContextMenu}
{...props}
Original file line number Diff line number Diff line change
@@ -80,6 +80,7 @@ interface IComponentForTypes {
const ComponentForTypes: IComponentForTypes = {
sandbox: React.memo(props => (
<Sandbox
key={props.item.sandbox.id}
page={props.page}
item={props.item}
isScrolling={props.isScrolling}
@@ -92,7 +93,7 @@ const ComponentForTypes: IComponentForTypes = {
isScrolling={props.isScrolling}
/>
)),
folder: props => <Folder {...props.item} />,
folder: props => <Folder key={props.item.name} {...props.item} />,
repo: props => <Repo {...props.item} isScrolling={props.isScrolling} />,
'new-folder': props => <CreateFolder {...props.item} />,
'new-sandbox': () => <NewSandbox />,
Original file line number Diff line number Diff line change
@@ -2,7 +2,10 @@ import React, { useEffect } from 'react';
import { useAppState, useActions } from 'app/overmind';
import { sandboxesTypes } from 'app/overmind/namespaces/dashboard/types';
import { Header } from 'app/pages/Dashboard/Components/Header';
import { VariableGrid } from 'app/pages/Dashboard/Components/VariableGrid';
import {
VariableGrid,
GUTTER,
} from 'app/pages/Dashboard/Components/VariableGrid';
import { SelectionProvider } from 'app/pages/Dashboard/Components/Selection';
import { dashboard as dashboardUrls } from '@codesandbox/common/lib/utils/url-generator';
import { Helmet } from 'react-helmet';
@@ -11,6 +14,19 @@ import {
DashboardTemplate,
PageTypes,
} from 'app/pages/Dashboard/types';
import styled from 'styled-components';

const BannerProjects = styled.a`
display: block;
width: calc(100% - ${2 * GUTTER}px);
max-width: GRID_MAX_WIDTH - 2 * GUTTER;
margin: 0 auto ${GUTTER}px;
img {
width: 100%;
}
`;

export const Home = () => {
const {
@@ -84,6 +100,12 @@ export const Home = () => {
<Helmet>
<title>Dashboard - CodeSandbox</title>
</Helmet>
<BannerProjects href="https://codesandbox.io/p/dashboard">
<img
src="/static/img/projects-banner.png"
alt="The CodeSandbox flow, for any project of any size. Try now"
/>
</BannerProjects>
<Header title="Home" activeTeam={activeTeam} showViewOptions />
<VariableGrid page={pageType} items={items} />
</SelectionProvider>
2 changes: 1 addition & 1 deletion packages/app/src/app/pages/Profile/SandboxPicker/index.tsx
Original file line number Diff line number Diff line change
@@ -114,7 +114,7 @@ export const SandboxPicker: React.FC<{ closeModal?: () => void }> = ({
})}
>
{collectionsInPath.map(collection => (
<Column key={collection.path} data-column>
<Column key={`${collection.path}${collection.name}`} data-column>
<FolderCard
collection={collection}
onClick={() => setPath(collection.path)}
Binary file added packages/app/static/img/projects-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.