Commit Graph
5224 Commits
Author SHA1 Message Date
Bogdan Chadkin b4bf640dcc Replace flags with component type (#532)
Boolean flags may have a lot of combinations which can lead to
unexpected bugs. Better approach is to categorize nodes with specific
behaviours.

Here I added 5 types

- container - can accept other components with dnd
- control - usually form controls like inputs, without children
- embed - images, videos or other embeddable components, without
children
- rich-text - can be edited on double click
- rich-text-child - formatted text fragment, not listed in components
list
2022-11-28 15:04:53 +03:00
Roman Pominov 1b899adc48 Merge pull request #463 from webstudio-is/453_cross-page-copy
Cross page / project / browser window copy-paste
2022-11-28 15:38:22 +04:00
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 4d7c655d71 Merge branch 'prod' into main 2022-11-27 22:52:50 +01:00
Oleg Isonen 4fcbf1d108 Merge branch 'main' into 494-primitive-tokens 2022-11-27 18:41:41 +01:00
Oleg Isonen d3d12321e1 Merge pull request #533 from webstudio-is/chore/switch-lost-pixel-to-legacy
Make lost-pixel request legacy backend
2022-11-27 18:40:34 +01:00
Dimitri Ivashchuk 2ea9bee130 Merge branch 'main' into chore/switch-lost-pixel-to-legacy 2022-11-27 18:33:37 +01:00
d-ivashchuk 35b23f1bc4 ci 2022-11-27 18:33:01 +01:00
d-ivashchuk 61acb2dcac ci 2022-11-27 18:32:42 +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
d-ivashchuk 086b9fa789 “ci” 2022-11-27 18:21:55 +01:00
d-ivashchuk 80e2117bb7 move lost-pixel url to legacy version to ensure smooth transition to v1 of the platform 2022-11-27 18:09:53 +01: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 15269867a2 Merge pull request #528 from webstudio-is/main
Added aspect ratio property to sizes
2022-11-27 13:49:30 +01:00
Oleg Isonen 52a4f9af6b added aspect ratio property to sizes 2022-11-27 13:46:53 +01:00
Oleg Isonen 61460259e7 delete token 2022-11-27 11:51:07 +01:00
Oleg Isonen c498af2233 Merge pull request #523 from webstudio-is/main
Release
2022-11-27 11:49:32 +01:00
Bogdan Chadkin a8f1f407b7 Bump saas packages (#527)
Added publish script to image package and bumped everything changed
since latest bump by checking `git log -1 -- .`
2022-11-27 13:48:26 +03: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
Bogdan Chadkin 0036185747 Publish css-vars package to npm (#517)
This one is missing when upgrade packages in webstudio-saas
2022-11-26 17:56:21 +03:00
Oleg Isonen 4cc75b5c7a fix optional breakpoint 2022-11-26 14:17:59 +01:00
Bogdan Chadkin 44e5c8bc77 Fix npm publish token (#515)
Let's see if it will fix the issue
2022-11-26 01:40:12 +03: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