Commit Graph
3073 Commits
Author SHA1 Message Date
Roman Pominov e7658e394a fix Jest 2022-11-28 14:05:39 +04:00
Roman Pominov 89e737e3d4 fix jest (almost) 2022-11-28 13:32:51 +04:00
Roman Pominov 26f0990347 fix UserProp schema 2022-11-28 12:53:56 +04:00
Roman Pominov a50913d9cc review comments 2022-11-28 11:44:15 +04:00
Roman Pominov da1e8d5056 fix rebase 2022-11-28 11:44:15 +04:00
Roman Pominov 7153febe49 typo 2022-11-28 11:44:15 +04:00
Roman Pominov 1aa59d4c71 extract everything from hook 2022-11-28 11:44:15 +04:00
Roman Pominov 88600562f2 v0.1 2022-11-28 11:44:15 +04:00
Roman Pominov add344a8bd add a link to the issue to the commented out code 2022-11-28 11:44:15 +04:00
Roman Pominov ba2549cfd2 fix impoirt 2022-11-28 11:44:15 +04:00
Roman Pominov 08cc9afe08 delete / comment out old code 2022-11-28 11:44:15 +04:00
Roman Pominov 21befdd3c3 use clipboard api 2022-11-28 11:44:15 +04:00
Roman Pominov 652a323db2 avoid empty props objects 2022-11-28 11:44:15 +04:00
Roman Pominov fbf8f7db87 cross page copy-paste 2022-11-28 11:44:15 +04:00
Roman Pominov ec6b335403 fix a bug where copy/paste doesn't work for inputs 2022-11-28 11:44:15 +04:00
Oleg Isonen 9ed4d4a18b temp disable ImageControl for background images, since it wasn't implemented yet and forgotten 2022-11-27 22:53:04 +01:00
Oleg Isonen 4fcbf1d108 Merge branch 'main' into 494-primitive-tokens 2022-11-27 18:41:41 +01:00
Ivan Starkov a7125fe695 [release-fix] Fix adding new prop (#531)
- [x] - New property creation was broken
- [x] - Switch on `tag` was seriosly broken

<img width="403" alt="image"
src="https://user-images.githubusercontent.com/5077042/204138926-2ca2e13c-6e46-4ca1-9233-ffdc6475dad8.png">
2022-11-27 21:32:03 +04:00
Bogdan Chadkin 6e5c0f9c1d Split Link and RichTextLink components (#530)
Droppable link an link created in text editor have different
requirements. We should split them. In the next PR they will get
different types so we will avoid similar issues in the future.
2022-11-27 17:25:24 +03:00
Oleg Isonen 61460259e7 delete token 2022-11-27 11:51:07 +01:00
Bogdan Chadkin b80b4c21f7 Remove paragraphs from text editor (#514)
Ref https://github.com/webstudio-is/webstudio-designer/issues/487

Before lexical created paragraphs when press enter which we tried to
visually represent as line break by removing margins and converted to
line break to instances.

This could lead to a few issues.

1. When paragraph block is inside `<a>` nothing can be typed in the
beginning and in the end of paragraph

2. Paragraphs can be styled by users which can break text editor
visually

Here I overwritten default Enter command and insert line break instead
of paragraph. To protect from external sources like paste from clipboard
added transform to merge all paragraphs if move than one.

We will still have one paragraph in the root with display: inline style.
Though it will cause less damage to editor with user styles.
2022-11-27 13:33:12 +03:00
Ivan Starkov 1ec17c41ec Remove assets flag (#525) 2022-11-27 14:04:59 +04:00
Ivan Starkov 9e3f3c46c6 Fix accidentally commented code at #516 (#524)
https://github.com/webstudio-is/webstudio-designer/pull/516#pullrequestreview-1194934498
2022-11-27 11:44:48 +04:00
Bogdan Chadkin 0d40747888 Use serialized loader types (#522)
New remix enforces types to be serialized.
Prisma output dates as Date instance and this is not customizable. Had
to fix only 2 cases.
2022-11-27 10:13:16 +03:00
Oleg Isonen 1ecf05776a items list and menu 2022-11-27 00:08:59 +01:00
Roman Pominovandistarkov a9fede0a1d Ability to replace SDK components (#516)
Whats done:
- [x] - Added getComponent, getComponentMeta (old getComponenMeta
renamed to getComponentMetaProps)
- [x] - Added `registerComponents` (for now able only override existing
components)
- [x] - Renamed react-sd `remix` folder to `app`
- [x] - At the `app` folder added `custom-components/Image` wrapper
component, which reads assets etc, and use `webstudio/image`
- [x] `getParams`, `setParams` added at `react-sdk/app/` as they are app
level


TODO:
- [x] Create "normal" `useParams` to be able to use data.params
https://github.com/webstudio-is/webstudio-designer/blob/c05f40818beaac8a811fe0a97ba49e30f01f5045/packages/react-sdk/src/app/custom-components/image.tsx#L15-L23
- [x] Reuse props meta from imported image - created issue
https://github.com/webstudio-is/webstudio-designer/issues/521

Co-authored-by: istarkov <istarkov@gmail.com>
2022-11-27 02:47:14 +04:00
Bogdan Chadkin 8172b077e8 Handle loader errors in error boundary (#520)
This will allow to infer loader data instead of writing type for it as
recommended in
https://github.com/remix-run/remix/releases/tag/remix%401.6.5.
2022-11-26 23:23:37 +03:00
Oleg Isonen 8f64061c27 load tokens 2022-11-26 18:37:51 +01:00
Oleg Isonen 5831523dc2 Merge branch 'main' into 494-primitive-tokens 2022-11-26 17:12:15 +01:00
Oleg Isonen bcbd1e35a6 save created token in the db 2022-11-26 17:08:10 +01:00
Oleg Isonen 4cc75b5c7a fix optional breakpoint 2022-11-26 14:17:59 +01:00
Oleg Isonen 1b8b692b73 remove todos, lint 2022-11-25 20:45:29 +01:00
Oleg Isonenandistarkov 4c8989784b Primitive tokens (#507)
https://github.com/webstudio-is/webstudio-designer/issues/494

This PR Renders this UI and, when adding tokens - renders CSS variables
on the canvas: It's behind a feature flag.

<img width="411" alt="Screenshot 2022-11-25 at 15 51 00"
src="https://user-images.githubusercontent.com/52824/204009859-81ed72c4-e758-4973-be49-c8c65e6b4661.png">


## Before requesting a review

- [ ] if the PR is WIP - use draft mode
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
- [ ] what kind of review is needed?
  - [ ] conceptual
  - [ ] detailed
  - [ ] with testing

## Test cases

- [ ] step by step interaction description and what is expected to
happen

## 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>
2022-11-25 19:51:54 +01:00
istarkov 466ae357d8 Fix errors 2022-11-25 16:01:32 +00:00
Oleg Isonen ad64510a69 update one token not all at once 2022-11-25 16:53:45 +01:00
Oleg Isonen 71289e7915 better validation - validate on change if there are erorrs 2022-11-25 16:21:00 +01:00
Oleg Isonen df0ecc0173 naming 2022-11-25 16:08:57 +01:00
Oleg Isonen de64e6a80a we are not using that tokens format 2022-11-25 16:08:03 +01:00
Oleg Isonen edad49148a render tokens (make breakpoint optional for CssRule) 2022-11-25 15:41:35 +01:00
Oleg Isonen 7439926c9b Merge branch 'main' into 494-primitive-tokens 2022-11-25 14:52:56 +01:00
Oleg Isonen 48f66a0dc2 use any temporarily 2022-11-25 14:13:35 +01:00
Oleg Isonen b321ed216b render tokens on canvas as css vars 2022-11-25 03:30:18 +01:00
Oleg Isonen 99e4f1898b new data structure 2022-11-25 01:42:10 +01:00
Oleg Isonen e09808a19d Merge branch 'main' into 494-primitive-tokens 2022-11-24 01:46:39 +01:00
Oleg Isonen d4055f3b21 design tokens left panel and new token popover 2022-11-24 01:46:33 +01:00
Bogdan Chadkin 7f44d78279 Improve text editor styling and enable auto focus (#504)
Ref https://github.com/webstudio-is/webstudio-designer/issues/107

- fixed bold italic styling
- populate default style for instances created from text editor
- added unmount support to css engine
- auto focus text editor when start editing
2022-11-24 00:07:45 +03:00
Bogdan Chadkin 9b0d7f25b2 Output cjs in font package (#506)
Designer tests fail because of missing cjs in fonts package. Also fixed
iso string timezone in one test, was failing for me.
2022-11-23 22:55:31 +03:00
Oleg Isonen e57cc96808 fix eslint 2022-11-23 20:44:20 +01:00
Oleg Isonen 63ded04e13 fix currentIndex in font manager when new fonts are added 2022-11-23 20:23:14 +01:00
natlusyht b4f981f683 don't display empty unitless dropdown (#478)
don't display chevron if there are no items to display in the dropdown
and fix the bg on chevron's/unit text-field suffix button.

## Before requesting a review

- [ ] if the PR is WIP - use draft mode
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
- [ ] what kind of review is needed?
  - [ ] conceptual
  - [ ] detailed
  - [ ] with testing

## Test cases

- [ ] step by step interaction description and what is expected to
happen

## 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
2022-11-23 17:04:07 +01:00