1174 Commits
Author SHA1 Message Date
Ivan Starkov b05a36defe Update versions (#920)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-02 13:02:49 +04:00
0ee5d13efc Figma tokens (#918)
Co-authored-by: Taylor Nowotny <86495896+taylornowotny@users.noreply.github.com>
Co-authored-by: Bot (build-figma-tokens.yml) <bot@localhost>
Co-authored-by: markxtang <122043657+markxtang@users.noreply.github.com>
2023-02-02 11:45:02 +03:00
Bogdan Chadkin 118e07aeb0 Migrate styles to style sources variant (#917)
Ref https://github.com/webstudio-is/webstudio-designer/issues/807

Styles are resolved based on style sources of every instance. Here
finally migrated whole logic to new variant.

For now the only local style source is used as default for style
updates. In the next PR will add support for tokens.
2023-02-02 01:22:46 +03:00
Bogdan Chadkin 174b7124f2 Add style sources stores (#913)
Ref https://github.com/webstudio-is/webstudio-designer/issues/807

Here added style sources and style source selections stores, added
updates along styles and covered with tests. Patch utilities for rest
endpoint are not used to avoid collision with temporary logic in styles.

Next step will be integration styles with style sources on client.
2023-02-01 20:55:19 +03:00
Roman Pominov 0e173ec85e Text fixes (#912)
1. New `Text` component, existing is deprecated. Closes #825
2. Deprecated `Paragraph` component (the replacement is `<Text as="p">`)
3. Added `textVariants` that can be used like this `css({
...textVariants.regular })`
4. Removed `typography`, now `textVariants` or `textStyles` can be used
instead
5. Added `theme.fontSize`, `theme.lineHeight`, `theme.fontWeight`,
`theme.letterSpacing` that use values from Figma
6. Deprecated existing `theme.fontSize`, `theme.lineHeight`
7. Installed `Roboto Mono` font
2023-02-01 16:54:00 +03:00
Oleg Isonen 27a00fdc79 Dashboard remaining dialogs (#907)
## Description

1. Rename and delete dialogs + cleanup

## Steps for reproduction

1. click project item menu to rename 
2. click project item menu to delete 

## Code Review

- [ ] hi @rpominov , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-01 13:32:35 +01:00
Bogdan Chadkin 22e54f8167 Fix copy paste styles and props of descendants (#911)
Found we do not copy styles and props for descendant instances. Here
also removed copy/paste data from react and added a few new tree
utilities.
2023-02-01 13:52:53 +03:00
Ivan Starkov 8e5d0a2186 Shared tokens UI + Api (#894)
## Description

ref #548

Add shared links with builder/viewer permissions.

`editor` permission is now disabled as we don't know a simple way to
allow editing images and text only cc @TrySound would need your opinion
on this.

createTrpcRemixProxy now wraps input in `JSON.stringify` and unwraps
before the TRPC call. Otherwise, all params are FormData string entries
and may cause errors.

createTrpcRemixProxy useQuery/useMutation now returns Remix useFetcher
state parameter.


**`patch` auth call added, we must do any Auth mutate operations in a
single call, otherwise if some call failed we are in troubles.**
Example on token relation update.
Remove viewer relation.
Add editor relation. <- If the call failed here user just loses all
permissions.
In case of patch both operations are completed in a single transaction -
(delete+insert)





## Steps for reproduction

Having migrations works locally only with 
`isFeatureEnabled("share2")` flag.

Click the share button then add/rename/update/copy share links.

The previous Share button is removed.

**TODO In Next PR:**

Different UI for builder and viewer links i.e.
[this](https://github.com/webstudio-is/webstudio-designer/issues/548#issuecomment-1406947059).

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)

- [ ] hi @TrySound , I need you to do
  - detailed review (read every line)

## Before requesting a review

- [x] made a self-review
- [x] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-01 10:51:20 +03:00
Bogdan Chadkin 02654371b5 Support multiple style sources in preview (#905)
Ref https://github.com/webstudio-is/webstudio-designer/issues/807

Designer data still rely on legacy style format though here I migrated
preview styles to combination of style source selections and styles from
build.
2023-01-31 18:02:25 +03:00
Oleg Isonen c4ae76c4bb Dashboard dialogs (#901)
## Description

1. This PR implements  a create project dialog
<img width="579" alt="Screenshot 2023-01-31 at 13 17 45"
src="https://user-images.githubusercontent.com/52824/215771142-7694a048-ba54-4d6e-94bf-befbdc94268c.png">



## Steps for reproduction

1. go to /dashboard
2. click create project

## Code Review

- [ ] hi @rpominov, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-01-31 16:01:14 +01:00
Bogdan Chadkin 59e164fb81 Migrate styles from Tree to Build (#904)
Ref https://github.com/webstudio-is/webstudio-designer/issues/807

We are gonna store styles on Build table to be able to share them via
tokens within project. Here I migrated styles data from Tree table to
Build and combined all trees styles on a project into single array.

Rest interface did not changed, the logic is hidden in endpoints for
now. Next step will be to move the logic on client side and make rest
api thin again.
2023-01-31 14:37:55 +03:00
Roman Pominov 4ad1a3f4b2 Floating panel refactor & new Popover & MenuItemButton (#902)
1. Fixed review comments from #857 (as discussed in dm)
2. Deprecated existing Popover 
3. Implemented new Popover (closes #824)
4. Added MenuItemButton (closes #866)
2023-01-31 12:27:46 +03:00
Ivan Starkov 26e8343851 Update remix (#903)
## Description

1. What is this PR about (link the issue and add a short description)

Seems like this killed my dev expierence

https://github.com/remix-run/remix/issues/3123

Fixed in 1.12 gonna try, as otherwise I have 100% cpu load, and need to
stop `pnpm dev` before any changes

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-01-31 12:13:37 +04:00
5d8fc645c1 Figma tokens (#900)
Co-authored-by: markxtang <122043657+markxtang@users.noreply.github.com>
Co-authored-by: Bot (build-figma-tokens.yml) <bot@localhost>
Co-authored-by: Roman Pominov <rpominov+github@gmail.com>
2023-01-31 08:30:23 +03:00
Roman Pominov e4b96bc50b Dialog component & other updates to design-system components (#857)
1. Implemented Radix/Dialog with styles of Figma / Floating Panel:
[Demo](https://dialog-and-button--638245578b47d4399fba191a.chromatic.com/?path=/story/library-floating-panel-dialog--dialog).
Closes #831
2. Implemented Radix/Popover with styles of Figma / Floating Panel:
[Demo](https://dialog-and-button--638245578b47d4399fba191a.chromatic.com/?path=/story/library-floating-panel-popover--popover)
3. Aligned Separator with Figma
4. Aligned Title with Figma
5. Fixed some issues in Button. Closes #829
6. Cleaned up how demos under Library look visually
2023-01-30 20:02:08 +03:00
Bogdan Chadkin 6c4ea46521 Add buildId and projectId relations to Tree table (#895)
Ref https://github.com/webstudio-is/webstudio-designer/issues/742
https://github.com/webstudio-is/webstudio-designer/issues/807

Here I added build and project relations to Tree to have to improve auth
security and simplify access without parsing pages.

This is necessary to migrate styles into new style sources format.
2023-01-30 14:54:41 +03:00
Ivan Starkov df580ce304 Update remix (#892)
## Description

```bash
pnpm up -r -L '@remix-run/*' 
pnpm up -r -L 'react-router-dom'
```

`react-router-dom` removed.


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-01-30 08:23:08 +03:00
Bogdan Chadkin 6c9ae8594f Upgrade @types/node (#891)
The latest version supports types for websubtle so no need for our types
shim.
2023-01-29 18:05:13 +03:00
Ivan Starkov 6b2c50a183 Authorization (#836)
## Description

Add authorization layer to a project.

1. It introduces AppContext type inside `trpc-interface` project. As
this type can be shared across all projects.

2. `createContext(request):AppContext` is placed inside the designer app
it creates context and passes all params known on `remix/server` side
into authorization context.

3. Depending on env variables or SAAS trpc can be used or local so
`authorizationRouter` is a small wrapper around Zanzibar Ory Keto at
SaaS, and implements some subset of ORY operations here.

4. Checks are done on `db` level scripts.

5. On the saas side trpc wrapper around ory is already implemented and
can be checked after this will be merged.

Not everything is checked right now. Should be added later with some
caching at least during single request.

Also not this for this PR.

UI should be different for users with read/edit permissions. Also non
owners can't share links etc



TODO:
- [ ] - Migration - preview token creation for existing projects.

OSS Permission emulates following ORY schema, but without implementing
adding viewers editors etc.

```ts
/**
 * !!! THIS IS NOT typescript code !!!
 * This is Ory permission language (small subset of typescript)
 * https://www.ory.sh/docs/keto/guides/userset-rewrites
 * https://www.ory.sh/docs/keto/reference/ory-permission-language
 *
 * See .prettierrc semicolons are disabled, as it breaks ory language parser (fixed but not in cloud)
 **/

import { Namespace, SubjectSet, Context } from "@ory/keto-namespace-types"

class User implements Namespace {}

class Token implements Namespace {}

class Email implements Namespace {
  related: {
    owner: User[]
  }
}

class Project implements Namespace {
  related: {
    owner: User[]
    editors: (Token | User | SubjectSet<Email, "owner">)[]
    viewers: (Token | User | SubjectSet<Email, "owner">)[]
  }

  /**
   * Relation rewrites:
   * For example if User:AliceUUID is owner of Project:AliceProjectUUID, then
   * we return Allowed for all 3 checks
   * `keto check User:"AliceUUID" own Project "AliceProjectUUID"`
   * `keto check User:"AliceUUID" edit Project "AliceProjectUUID"`
   * `keto check User:"AliceUUID" view Project "AliceProjectUUID"`
   * But if User:"BobUUID" is viewers of Project:AliceProjectUUID, then
   * `keto check User:"BobUUID" view Project "AliceProjectUUID"` returns Allowed
   *
   * `keto check User:"BobUUID" edit Project "AliceProjectUUID"` returns Denied
   * `keto check User:"BobUUID" own Project "AliceProjectUUID"` returns Denied
   **/
  permits = {
    view: (ctx: Context): boolean =>
      this.related.viewers.includes(ctx.subject) ||
      this.related.editors.includes(ctx.subject) ||
      this.related.owner.includes(ctx.subject),

    edit: (ctx: Context): boolean =>
      this.related.editors.includes(ctx.subject) ||
      this.related.owner.includes(ctx.subject),

    own: (ctx: Context): boolean => this.related.owner.includes(ctx.subject),
  }
}
```




## Steps for reproduction

1. click button
6. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)

## Before requesting a review

- [x] made a self-review
- [x] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-01-29 16:57:01 +03:00
Bogdan Chadkin 1b3365e9ba Drop unused schema (#889)
DesignTokens was removed from schema but without migration. Removed
everything else unused too.

- Tree.presetStyles
- InstanceProps
- DesignTokens
2023-01-29 15:27:11 +03:00
Oleg Isonen e925d26bc9 Delete design tokens prototype (#873)
## Description

1. With all the new ideas and directions we don't need that initial
implementation

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-01-28 18:05:53 +01:00
Bogdan Chadkin 8d95c14f28 Fix copy paste of props and styles (#885)
Copy/paste of props and styles was broken while converting to normalized
data. Here fixed both by providing new instanceId.
2023-01-28 19:28:07 +03:00
Bogdan Chadkin 8635dc6755 Switch to normalized props on server (#883)
Ref https://github.com/webstudio-is/webstudio-designer/issues/696

Now all props is migrated on client side, we can drop legacy store and
switch to new format server side.
2023-01-28 15:24:23 +03:00
Bogdan Chadkin ff049a000c Inject props store to sdk (#871)
Ref https://github.com/webstudio-is/webstudio-designer/issues/696

We use store to render props in sdk components. Though it's easier to
maintain actual store in designer and provide necessary data to sdk.

Here I added utilities to inject computed store on module level. Now we
can get rid of legacy store and rewrite rest api to use normalized
props.
2023-01-28 10:48:13 +03:00
Oleg Isonen cba726a58f Share UI (#867)
## Description

Share UI implemented as a story



https://user-images.githubusercontent.com/52824/215069285-0ee7b214-8218-4ead-a468-07a22f65e433.mp4



## Steps for reproduction

1. open stories in designer
2. share project section

## Code Review

- [ ] hi @rpominov , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview
- [ ] hi @istarkov, please check if the interface I made fits the data
layer you built

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-01-27 18:38:58 +01:00
Bogdan Chadkin 95e13f9bdf Fix props with assets loading (#869)
Db data with asset ids was parsed as client data with resolved assets.
Fixed by reusing props parsing/serializing logic in tree.

Asset inlining complicates code so we need to have two versions of types
and transformations.
2023-01-27 16:33:46 +03:00
Bogdan Chadkin 0f9043fc54 Add style sources schema (#850)
Ref https://github.com/webstudio-is/webstudio-designer/issues/807

We are gonna consolidate design token styles and local styles. On build
(project) level there will be list of styles and list of style sources
which are basically a group of styles to be referenced.

These style sources can be local with mandatory tree id or token with
optional tree id to scope a token on specific page instead of whole
project.

Tree will get new list of references to style sources.

Here resulting types

```ts
// Stored as Build.styles
type StylesItem = {
  // same as before but instead of instanceId style is referenced through style source
  styleSourceId: string,
  breakpointId,
  property,
  value
}

type StyleSourcesToken = {
  type: token
  id: string
  treeId?: string
  name: string
}

type StyleSourcesLocal = {
  type: local
  id: string
  treeId: string
  name: string
}

// Stored as Build.styleSources
type StyleSourcesItem = StyleSourcesToken | StyleSourcesLocal

// Stored as Tree.styleRefs
type StyleRefsItem = {
  instanceId: string,
  values: StyleSourcesItem['id']
}
```
2023-01-27 12:34:28 +03:00
Bogdan Chadkin bf50c0c547 Move project build schema into separate package (#864)
The new package will be responsible for schema and db access to all
build and tree data.

Decoupling will let us make sdk and project thinner.
2023-01-26 21:03:17 +03:00
Bogdan Chadkin 185fb27c85 Treat component name as generic string (#861)
We want to decouple schema stored in db from sdk which generates a list
of components. Components will be added dynamically later so better
avoid component name enum.
2023-01-26 17:33:26 +03:00
Roman Pominov 4a9c7842e6 Minor menu fixes (#852)
1. Fixed #851 
2. Cleaned up Menu usage in some other places
2023-01-26 12:14:53 +03:00
Oleg Isonen dd40f745a5 Dashboard styling (#849)
## Description

Styling tweaks

## Steps for reproduction

1. open /dashboard

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-01-25 22:33:23 +01:00
Oleg Isonenandistarkov e0cd48aab5 New dashboard has reached feature parity with the old one (#835)
## Description

This is not a complete dashboard implementation, but it can now list,
create and open projects, so it can be deployed to production and
replace the old version while we work on the remaining features.

In addition implemented: renaming, duplicating, deletion (mark as
deleted), keyboard accessibility


## Steps for reproduction

1. click on card to open the project in the designer
1. click on a link at the card bottom if project is published to open
published version
1. click on new project and create new project
2. click on rename over menu to rename
3. click on duplicate
4. click on delete
5. Use tab to switch between projects, use arrow keys to switch between
focusable elements inside the project card

## Code Review

- [ ] hi @rpominov , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview
- [ ] hi @istarkov, we need to discuss how we want to build the future
APIs with TRPC and probably rewrite what I did here right away

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory

Co-authored-by: istarkov <istarkov@gmail.com>
2023-01-25 21:17:50 +01:00
Bogdan Chadkin aba909ad63 Drop preset styles from db (#848)
After discussing with @kof figured we do not need to store preset styles
in db as after sdk upgrade components may still break.

Sdk versioning along with its hardcoded values will solve the problem
better.
2023-01-25 18:55:11 +03:00
Roman Pominov ee8e1bedd3 Menu design update (#799)
Closes #798.

I've implemented "Menu" and "Menu item" from Figma and updated our
components that use menus.

TODO at some later point:

  - Component: "Menu Item Large"
  - Type of "Menu" component: "Dropdown w/large items"
  - Type of "Menu" component: "Context menu"
2023-01-25 16:51:43 +03:00
Bogdan Chadkin f8fb928436 Migrate hovered outline to synchronized stores (#846)
Recently added support for synchronization of non-immerhin stores. Here
refactored instance hovering from pubsub to such stores.

Designer and canvas can both set hovered instance id and instance
connector subscribes to these changes and sends to designer outline
rect.
2023-01-25 12:38:29 +03:00
Bogdan Chadkin d612a33991 Migrate designer to selected instance store (#844)
selectedInstanceData update is sent from canvas after every render in
effect. The latency can be avoided by subscribing to selectedInstanceId
directly. For styles added new store selectedInstanceBrowserStyle and
synchronized it the same way. Works without flashing in UI even without
reset.
2023-01-25 10:18:34 +03:00
ce1294480c Figma tokens (#845)
## Description

1. deleted inner glow tokens since no one is using them. 
2. Organized text styles and atomic text styles such as font-weight and
line-height
3. modified some colors related to the project card component used in
the dashboard.

Co-authored-by: Roman Pominov <rpominov+github@gmail.com>
Co-authored-by: Taylor Nowotny <86495896+taylornowotny@users.noreply.github.com>
Co-authored-by: Bot (build-figma-tokens.yml) <bot@localhost>
2023-01-25 09:17:01 +03:00
Roman Pominov c8193ed551 fix fontWeight parsing in transform-figma-tokens (#840)
Closes #838
2023-01-24 11:44:15 +03:00
Bogdan Chadkin 78196958cd Transform styles without zod (#822)
Found zod allows to pass anything in transform without type checking.
This means we can easily get unexpected result. In this case we could
get undefined as asset.

As a solution I defined two versions of types, client side and stored in
db. Conversion is implemented on db routes side.

This makes data flow more clear and let us describe only two versions of
types instead of tree (in, out, client side).
2023-01-23 20:39:48 +03:00
Bogdan Chadkin 846240abc8 Add new label for style panel (#820)
Used new local/remote terms instead of set/inherited from figma for
color here.

<img width="309" alt="Screenshot 2023-01-20 at 14 06 35"
src="https://user-images.githubusercontent.com/5635476/213681171-dcc6bd6d-2d31-42fb-9e6a-49c90da3ab6f.png">
2023-01-23 11:56:36 +03:00
Bogdan Chadkin bb288f309b Replace UserProp with PropsItem (#833)
Here is migration to new props type with more safe conversion to db
format. Added two versions StoredPropsItem for and PropsItem for client
and got rid of "as" casting.
2023-01-22 15:57:37 +03:00
Oleg Isonen 72073cb30a Dashboard redesign - project cards (#817)
## Description

Not complete, everything that needs adjustments supposed to have a todo
comment

1. Added project cards
2. Variable Inter font
3. Flex space-between


https://user-images.githubusercontent.com/52824/213592204-ffb2ee3b-b613-4561-a808-31b05889bf39.mp4


## Steps for reproduction

1. open /dashboard2

## Code Review

- [ ] hi @rpominov , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-01-21 22:40:11 +01:00
Roman Pominov 9ff8c74692 Make shadow and typography tokens available to be used in code (#821)
1. Added `@font-face`s to `designer` and `design-system` storybooks
2. Shadow tokens are now available via `theme.shadows.somthing`
3. Typography tokens are now available like this:

```ts
import { typography, styled } from '@webstudio-is/design-system'; 

const Something = styled("div", typography.something)

<div className={typography.something()} />
```
2023-01-21 08:53:52 +03:00
74f74cf77a updated success color (#823)
## Description

just updated the color of foreground/success

Co-authored-by: markxtang <122043657+markxtang@users.noreply.github.com>
Co-authored-by: Bot (build-figma-tokens.yml) <bot@localhost>
2023-01-21 08:33:07 +03:00
Bogdan Chadkin 78af54b017 Migrate InstanceProps into Tree table as props column (#819)
InstanceProps is designed to store props per each instance which
requires a lot of sql updates on every props change.

Here moved per instance props into array with props for whole tree. This
way patches are safer to apply on large trees.

```
type PropsItem = {
  id: string,
  instanceId: string,
  name: string,
  required?: boolean,
  type: 'number' | 'string' | 'boolean' | 'asset',
  value: number | string | boolean
}
```
2023-01-20 13:02:13 +03:00
markxtang 417ae2298b Figma tokens (#818)
Renamed some styles to make it more clear which styles are brand styles
as opposed to builder styles. E.g. before the brand color styles were
distributed with the other color styles, now they are all under brand.
grouping. Also renamed the atomic typography tokens such as font-size so
they are in order (smallest value to highest value corresponds to first
to last in the array)
2023-01-20 09:15:23 +03:00
Oleg Isonen 011257f0ab Dashboard redesign (#809)
## Description

The first piece of the new dashboard - empty state for the projects
section.
Lots of design system values are not coming from Figma yet because Mark
is still on it.

Its not live, only visible over /dashboard2

<img width="960" alt="Screenshot 2023-01-19 at 00 33 19"
src="https://user-images.githubusercontent.com/52824/213328060-c84a18d5-3dd2-43d6-a70d-cdf8cd504108.png">



## Steps for reproduction

1. go to /dashboard2


## Code Review

- [ ] hi @rpominov , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-01-19 16:33:35 +01:00
Roman Pominov 6ec2f5661a Add instructions on how to approve Lost-pixel test when syncing tokens from Figma (#815) 2023-01-19 18:21:08 +03:00
Bogdan Chadkin ca6bdb34a9 Deprecate label component (#810)
Gonna start over to align with design system.
2023-01-19 13:23:54 +03:00
Bogdan Chadkin 6ca1f7088a Bump packages (#814)
Let's release
2023-01-19 13:08:32 +03:00