This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve user experience (#607)
* feat: update styling of bug report button * fix: remove non functioning menu items * feat: rename builtin component library * feat: restructure project settings * feat: add empty state for element pane * fix: make preview pane non-selectable * fix: remove unneeded element list scroll area * feat: add export button * fix: restore element list spacing * fix: simplify code * fix: restore user selection * fix: remove unneeded text property
- Loading branch information
Showing
29 changed files
with
303 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import DemoContainer from '../demo-container'; | ||
import * as React from 'react'; | ||
import { AddButton } from '.'; | ||
|
||
const AddButtonDemo: React.StatelessComponent = (): JSX.Element => ( | ||
<DemoContainer title="Add Page Button"> | ||
<AddButton>Add Page</AddButton> | ||
</DemoContainer> | ||
); | ||
|
||
export default AddButtonDemo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "add-button", | ||
"description": "Button to add a page or library", | ||
"displayName": "Add Button", | ||
"version": "1.0.0", | ||
"tags": ["atom", "button"], | ||
"flag": "alpha" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ChromeButton } from './index'; | ||
import * as React from 'react'; | ||
|
||
const ChromeButtonDemo: React.StatelessComponent<void> = (): JSX.Element => ( | ||
<ChromeButton title="Found a bug?" /> | ||
); | ||
|
||
export default ChromeButtonDemo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import * as React from 'react'; | ||
import styled from 'styled-components'; | ||
import { Color } from '../colors'; | ||
import { getSpace, SpaceSize } from '../space'; | ||
|
||
export interface ChromeButtonProps { | ||
onClick?: React.MouseEventHandler<HTMLElement>; | ||
onDoubleClick?: React.MouseEventHandler<HTMLElement>; | ||
title: string; | ||
icon?: React.ReactNode; | ||
} | ||
|
||
const StyledChromeButton = styled.div` | ||
display: flex; | ||
padding: 0 ${getSpace(SpaceSize.S)}px; | ||
align-items: center; | ||
-webkit-app-region: no-drag; | ||
box-sizing: border-box; | ||
border-radius: 3px; | ||
margin-left: ${getSpace(SpaceSize.S)}px; | ||
background: linear-gradient(to bottom, ${Color.White} 0%, ${Color.Grey97}); | ||
height: 21px; | ||
box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 0.5px 2px 0 rgba(0, 0, 0, 0.3); | ||
color: ${Color.Grey50}; | ||
&:active { | ||
background: ${Color.Grey90}; | ||
} | ||
`; | ||
|
||
const StyledIcon = styled.div` | ||
margin-right: 6px; | ||
`; | ||
|
||
export const ChromeButton: React.StatelessComponent<ChromeButtonProps> = props => ( | ||
<StyledChromeButton {...props}> | ||
{props.icon && <StyledIcon>{props.icon}</StyledIcon>} | ||
<div>{props.title}</div> | ||
</StyledChromeButton> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "chrome-button", | ||
"displayName": "Chrome Button", | ||
"description": "Button in the chrome", | ||
"version": "1.0.0", | ||
"tags": ["chrome-button"], | ||
"flag": "alpha" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { EmptyState } from './index'; | ||
import * as React from 'react'; | ||
|
||
const EmptyStateDemo: React.StatelessComponent<void> = (): JSX.Element => ( | ||
<EmptyState headline="Elements" copy="Drop them here" /> | ||
); | ||
|
||
export default EmptyStateDemo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as React from 'react'; | ||
import styled from 'styled-components'; | ||
import { Color } from '../colors'; | ||
import { Space, getSpace, SpaceSize } from '../space'; | ||
import { Headline } from '../headline'; | ||
import { Copy } from '../copy'; | ||
|
||
export interface EmptyStateProps { | ||
headline: string; | ||
copy: string; | ||
image?: React.ReactNode; | ||
highlighted?: boolean; | ||
} | ||
|
||
const StyledEmptyState = styled.div` | ||
text-align: center; | ||
padding: ${getSpace(SpaceSize.XXXL)}px; | ||
`; | ||
|
||
export const EmptyState: React.StatelessComponent<EmptyStateProps> = props => ( | ||
<StyledEmptyState> | ||
<Headline order={4} textColor={props.highlighted ? Color.Blue : Color.Black}> | ||
{props.headline} | ||
</Headline> | ||
<Space sizeTop={getSpace(SpaceSize.XS)} sizeBottom={getSpace(SpaceSize.L)}> | ||
<Copy textColor={props.highlighted ? Color.Blue : Color.Grey50}>{props.copy}</Copy> | ||
</Space> | ||
{props.image} | ||
</StyledEmptyState> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "empty-state", | ||
"displayName": "Empty State", | ||
"description": "Explanation of todos in case of an empty state", | ||
"version": "1.0.0", | ||
"tags": ["empty-state"], | ||
"flag": "alpha" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.