Skip to content
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

move to the new DS #522

Merged
merged 43 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7f64c5d
first batch of variant and box replacements
mck Nov 14, 2024
7fc7ec0
second batch of file changes
mck Nov 16, 2024
b4c0f70
update to canary ds
mck Nov 18, 2024
829983f
Merge branch 'master' into upgrade-ds
mck Nov 21, 2024
199902c
Merge branch 'master' into upgrade-ds
mck Nov 26, 2024
f2e3e7f
style updates and postcss fix
mck Nov 27, 2024
9fe8938
Merge branch 'upgrade-ds' of github.com:tokens-studio/graph-engine in…
mck Nov 27, 2024
d47e556
Merge branch 'master' into upgrade-ds
mck Nov 27, 2024
4c3f557
Merge branch 'master' into upgrade-ds
mck Nov 27, 2024
d518def
format and merge
mck Nov 27, 2024
661f7a7
change rail, add more styles
mck Nov 28, 2024
3d45928
Improved settings panel UI (addresses #538)
AlexBxl Nov 28, 2024
ef501ed
Merge branch 'upgrade-ds' into improve-settings-layout
mck Dec 2, 2024
5cd6889
more changes
mck Dec 2, 2024
82017e7
add transforms
six7 Dec 2, 2024
5a9be0e
style handles, fix watcher
mck Dec 2, 2024
c4c73e3
Merge branch 'upgrade-ds' of github.com:tokens-studio/graph-engine in…
mck Dec 2, 2024
7375488
the commit
six7 Dec 2, 2024
6d53d04
Merge branch 'upgrade-ds' of github.com:tokens-studio/graph-engine in…
six7 Dec 2, 2024
e75d899
format
mck Dec 2, 2024
968a3a3
fixed linting issues
AlexBxl Dec 3, 2024
4aedb86
fixed missing type definitions
AlexBxl Dec 3, 2024
3e6b225
style handle
mck Dec 3, 2024
b5f7afe
updated package lock
AlexBxl Dec 3, 2024
e090d35
style node header
mck Dec 3, 2024
6cd0641
fix cmdk input
mck Dec 3, 2024
af31951
colorMode switch
mck Dec 3, 2024
0ffd05f
replaced stitches code with CSS definitions
AlexBxl Dec 3, 2024
aa7addd
Merge branch 'upgrade-ds' into improve-settings-layout
AlexBxl Dec 3, 2024
cfb1f9c
update packages and typography
mck Dec 4, 2024
d62c2ff
format
mck Dec 4, 2024
ee400d9
fixing linting issues
AlexBxl Dec 4, 2024
eea3f7c
fixed more linting issues
brainshift-design Dec 4, 2024
63ba245
Merge remote-tracking branch 'remotes/origin/upgrade-ds' into improve…
AlexBxl Dec 4, 2024
a1bec55
Fix issues with testing
SorsOps Dec 4, 2024
c2b6874
removed stitches import
brainshift-design Dec 4, 2024
413c360
resolving commit issues
AlexBxl Dec 4, 2024
1b5e9d6
Merge pull request #539 from tokens-studio/improve-settings-layout
mck Dec 4, 2024
3cae07b
Merge branch 'master' into upgrade-ds
mck Dec 4, 2024
83fe281
Fixed centering of EmptyStateEditor (#540)
AlexBxl Dec 4, 2024
43261eb
remove transform scripts
mck Dec 5, 2024
685d6f9
address comments
mck Dec 5, 2024
731eb10
format
mck Dec 5, 2024
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
7 changes: 7 additions & 0 deletions .changeset/funny-bulldogs-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@tokens-studio/graph-engine-nodes-design-tokens": patch
"@tokens-studio/graph-editor": patch
"@tokens-studio/graph-engine-ui": patch
---

Fixed centering of EmptyStateEditor
7 changes: 7 additions & 0 deletions .changeset/nine-seahorses-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@tokens-studio/graph-engine-nodes-design-tokens": patch
"@tokens-studio/graph-editor": patch
"@tokens-studio/graph-engine-ui": patch
---

Improved settings panel UI.
29 changes: 29 additions & 0 deletions packages/graph-editor/.storybook/preview.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.themeBlock {
position: absolute;
top: 0;
right: 0;
height: 100%;
width: 50%;
bottom: 0;
overflow: auto;
background: var(--colors-bgCanvas);
display: flex;
}

.themeBlock.fill {
left: 0;
width: 100%;
}

.themeBlock.left {
border-right: 1px solid #202020;
right: 50%;
left: 0;
}

.inner {
padding: 1rem;
display: flex;
align-items: flex-start;
width: 100%;
}
2 changes: 1 addition & 1 deletion packages/graph-editor/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const StyledThemeBlock = styled('div', {
width: '50%',
bottom: 0,
overflow: 'auto',
background: '$bgCanvas',
background: 'var(--color-neutral-canvas-minimal-bg)',
display: 'flex',
variants: {
fill: {
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-editor/examples/barebones/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ body {

#graph-editor {
height: 100vh;
background: var(--colors-bgCanvas)
background: var(--color-neutral-canvas-minimal-bg)
}
2 changes: 1 addition & 1 deletion packages/graph-editor/examples/defaults/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ body {

#graph-editor {
height: 100vh;
background: var(--colors-bgCanvas)
background: var(--color-neutral-canvas-minimal-bg)
}
14 changes: 9 additions & 5 deletions packages/graph-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,22 @@
"types": "./dist/*",
"style": "./dist/*"
},
"./index.css": "./dist/index.css",
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist"
"dist",
"dist/**/*.css"
],
"scripts": {
"start": "vite dev",
"build": "node ./scripts/extractVersion.mjs && tspc -p tsconfig.prod.json && npm run build:css",
"build:css": "postcss src/index.scss --base src --dir dist --ext css",
"build:css": "postcss \"src/**/*.css\" --base src --dir dist --ext css ",
"build:storybook": "storybook build",
"dev": "tspc -p tsconfig.prod.json --watch || npm run build:css --watch",
"dev": "concurrently \"tspc -p tsconfig.prod.json --watch\" \"npm run build:css -- --watch\"",
"format": "npm run format:eslint && npm run format:prettier",
"format:eslint": "eslint . --fix",
"format:prettier": "prettier \"**/*.{tsx,ts,js,md,json}\" --write",
Expand All @@ -55,9 +57,9 @@
"@stitches/react": "1.2.8",
"@tokens-studio/graph-engine": "*",
"@tokens-studio/icons": "^0.1.4",
"@tokens-studio/tokens": "^0.0.24",
"@tokens-studio/tokens": "0.3.2",
"@tokens-studio/types": "^0.2.3",
"@tokens-studio/ui": "^0.6.9",
"@tokens-studio/ui": "^1.0.1",
"@xzdarcy/react-timeline-editor": "^0.1.9",
"array-move": "^4.0.0",
"classnames": "^2.3.2",
Expand Down Expand Up @@ -115,6 +117,7 @@
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react-swc": "^3.6.0",
"autoprefixer": "^10.4.20",
"concurrently": "^9.1.0",
"cssnano": "^7.0.6",
"cypress": "^13.9.0",
"cypress-react-selector": "^3.0.0",
Expand All @@ -123,6 +126,7 @@
"postcss-cli": "^11.0.0",
"postcss-css-variables": "^0.19.0",
"postcss-import": "^16.1.0",
"postcss-modules": "^6.0.0",
"postcss-nested": "^6.2.0",
"postcss-preset-env": "^10.0.5",
"postcss-scss": "^4.0.9",
Expand Down
11 changes: 11 additions & 0 deletions packages/graph-editor/src/components/DndList.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.trigger {
cursor: pointer;
}

.item {
display: block;
}

.container {
display: block;
}
38 changes: 21 additions & 17 deletions packages/graph-editor/src/components/DndList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Box } from '@tokens-studio/ui';
import {
SortableContainer,
SortableContainerProps,
Expand All @@ -7,40 +6,45 @@ import {
SortableHandle,
} from 'react-sortable-hoc';
import React from 'react';
import type * as Stitches from '@stitches/react';
import styles from './DndList.module.css';

interface ISortableHandleElement {
children: React.ReactNode;
css?: Stitches.CSS;
interface ISortableHandleElement extends React.HTMLAttributes<HTMLDivElement> {
className?: string;
}

interface ISortableItem extends SortableElementProps {
children: React.ReactNode;
css?: Stitches.CSS;
interface ISortableItem
extends SortableElementProps,
React.HTMLAttributes<HTMLDivElement> {
className?: string;
}

interface ISortableContainer extends SortableContainerProps {
children: React.ReactNode;
css?: Stitches.CSS;
interface ISortableContainer
extends SortableContainerProps,
React.HTMLAttributes<HTMLDivElement> {
className?: string;
}

export const DndTrigger: React.ComponentClass<ISortableHandleElement, unknown> =
SortableHandle(
({ children, css }: { children: React.ReactNode; css: Stitches.CSS }) => (
<Box css={{ cursor: 'pointer', ...css }}>{children}</Box>
({ children, className }: React.HTMLAttributes<HTMLDivElement>) => (
<div className={`${styles.trigger} ${className || ''}`}>{children}</div>
),
);

export const DndItem: React.ComponentClass<ISortableItem, unknown> =
SortableElement(
({ children, css }: { children: React.ReactNode; css: Stitches.CSS }) => (
<Box css={css}>{children}</Box>
({ children, className }: React.HTMLAttributes<HTMLDivElement>) => (
<div className={`${styles.item} ${className || ''}`}>{children}</div>
),
);

export const DndList: React.ComponentClass<ISortableContainer, unknown> =
SortableContainer(
({ children, css }: { children: React.ReactNode; css: Stitches.CSS }) => {
return <Box css={css}>{children}</Box>;
({ children, className }: React.HTMLAttributes<HTMLDivElement>) => {
return (
<div className={`${styles.container} ${className || ''}`}>
{children}
</div>
);
},
);
12 changes: 8 additions & 4 deletions packages/graph-editor/src/components/ErrorBoundaryContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,26 @@ export const ErrorBoundaryContent: React.FunctionComponent = () => {

return (
<Stack
css={{ width: '100%', height: '100%', padding: '$4' }}
style={{
width: '100%',
height: '100%',
padding: 'var(--component-spacing-lg)',
}}
align="center"
justify="center"
>
<Stack direction="column" gap={4} align="center" justify="center">
<Text css={{ fontSize: '$large', textAlign: 'center' }}>
<Text style={{ font: 'var(--font-body-xl)', textAlign: 'center' }}>
Uh-oh, something went wrong!
</Text>
{graphRef ? (
<Text css={{ textAlign: 'center' }}>
<Text style={{ textAlign: 'center' }}>
It looks like an error occurred. You can download your current
progress and contact support.
</Text>
) : (
<>
<Text css={{ textAlign: 'center' }}>
<Text style={{ textAlign: 'center' }}>
It looks like an error occurred. Try reloading the page.
</Text>
<Button
Expand Down
87 changes: 87 additions & 0 deletions packages/graph-editor/src/components/NodeHoverCard.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
@keyframes slideUpAndFade {
from {
opacity: 0;
transform: translateY(2px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

@keyframes slideRightAndFade {
from {
opacity: 0;
transform: translateX(-2px);
}
to {
opacity: 1;
transform: translateX(0);
}
}

@keyframes slideDownAndFade {
from {
opacity: 0;
transform: translateY(-2px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

@keyframes slideLeftAndFade {
from {
opacity: 0;
transform: translateX(-12px);
}
to {
opacity: 1;
transform: translateX(0);
}
}

.hoverCardContent {
border-radius: var(--component-radii-md);
border: 1px solid var(--color-neutral-stroke-subtle);
padding: var(--component-spacing-lg);
width: 300px;
background-color: var(--color-neutral-canvas-minimal-bg);
box-shadow: var(--shadows-contextMenu);
animation-duration: 200ms;
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
will-change: transform, opacity;
}

.hoverCardContent[data-state="open"][data-side="top"] {
animation-name: slideDownAndFade;
}

.hoverCardContent[data-state="open"][data-side="right"] {
animation-name: slideLeftAndFade;
}

.hoverCardContent[data-state="open"][data-side="bottom"] {
animation-name: slideUpAndFade;
}

.hoverCardContent[data-state="open"][data-side="left"] {
animation-name: slideRightAndFade;
}

.styledLink {
color: var(--color-accent-surface-base-idle-fg-default);
text-decoration: none;
font-weight: var(--fontWeights-sansMedium);
}

.heading {
font-size: var(--fontSizes-small);
font-weight: var(--fontWeights-sansMedium);
color: var(--color-neutral-canvas-default-fg-default);
}

.description {
line-height: 150%;
}
Loading
Loading