1890 Commits
Author SHA1 Message Date
Ivan Starkov a25f0da9b9 Release 0.58 (#1488)
## Description

Merge after #1487 

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-19 10:29:07 +04:00
Roman Pominov 8d94459625 Ability to link by #ID; Fixed a bug with links in RTE (#1454)
## Description

1. Made `href` always present (# is used when not set, similar to
Webflow). Fixes #1380
2. Added "Section" option in URL Control. Closes #993 
3. Added "ID" prop that is visible in all components. Closes #991 
4. Closes #1475

## Steps for reproduction

1. Add ID prop to an instance
2. Add a link that references that instance by ID
2023-04-19 08:53:16 +03:00
Ivan Starkov 8d68ba8b11 Release 0.57.0 (#1486)
## Description

NPM update

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-18 21:05:43 +04:00
Roman Pominov 60a69cc73c Fix navigator dnd (#1483)
## Description

DnD in navigator stopped working after React update. This PR fixes it.

https://discord.com/channels/955905230107738152/1097637506649960519

## Steps for reproduction

1. Try to use drag and drop in navigator tree
2023-04-18 19:28:46 +03:00
Oleg Isonen 759c54e37b Breakpoints stage 7 (#1477)
## Description

1. resize handles on canvas using css only (visibly faster)
2. initial breakpoint on first load when base breakpoint exists needs to
be selected in a way that the base breakpoint is activated, currently we
were landing on a smaller breakpoint when there was not enough space to
land on base
3. fix overflow for when instance on canvas is bigger than iframe size,
outline is rendered outside of iframe and may run outside of it unless
we hide the overflowing parts


## Code Review

- [ ] hi @istarkov , 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-18 15:29:06 +02:00
Ivan Starkov 5ad198f39e Concurency mode for React 18 (#1474)
## Description

Made handshake between canvas and builder.
Now publish actions are delayed in local array until handshake message
from destination is received

Switched on hydrateRoot to enable concurrent mode

unstable_batchedUpdates are removed

## Steps for reproduction



## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-17 21:11:40 +04:00
Mateusz Burzyński 4424add480 Make the base tsconfig.json to assume declaration emit (#1470)
## Description

This PR "swaps" the guiding principle behind what options are in the
base `tsconfig.json`.

Previously TS was configured to *not* emit declarations and we were
forcing for them to be emitted with CLI flags. This had an unfortunate
result - errors about "not portable type definitions" were not displayed
in the IDE because to its best knowledge the type definitions were never
supposed to be emitted. So it wasn't worthwhile to surface this error.

With the adjusted options those errors will be raised in the IDE which
should improve the feedback loop for those errors.

## Code Review

- [ ] hi @TrySound, @istarkov, @kof - you need to recheck if you have
any doubts about this approach, if you see anything wrong with it in the
context of this project

## Before merging

- [ ] test IDE setup
- [ ] test build script
- [ ] test typechecking and dts emit
2023-04-17 15:30:11 +02:00
Oleg Isonen 705d7c00fb Refactor canvas resize to use scrub (#1469)
## Description

Now user can keep resizing outside of the window boundary

Also:
- fixes https://github.com/webstudio-is/webstudio-builder/issues/1465

## Steps for reproduction

1. start resizing, keep going outside of window


## Code Review

- [ ] hi @istarkov , 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-17 11:57:53 +02:00
Bogdan Chadkin a148507e48 Render style states (#1420)
Ref https://github.com/webstudio-is/webstudio-builder/issues/807

Refactored styles rendering in canvas to consider states and added style
states support to css text renderer.
2023-04-17 15:50:14 +07:00
Ivan Starkov 1b5ddd2cb0 Fix backgound image thumbnail (#1455)
## Description

If image is not loaded for some reason this PR fixes this

![image](https://user-images.githubusercontent.com/5077042/232046193-67dfa2b3-44a1-4ecc-a01d-a66c1e6209b2.png)
on this
<img width="269" alt="image"
src="https://user-images.githubusercontent.com/5077042/232046291-aca1827b-de6e-41b3-9924-407ac78587ea.png">



## Steps for reproduction

Upload image, prevent its loading through dev tools

## 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

- [x] 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-17 12:08:50 +04:00
Oleg Isonen 3ee1e35667 Fixes borders, migrates deprecated components (#1471)
## Description

- fixes https://github.com/webstudio-is/webstudio-builder/issues/1459
- fixes https://github.com/webstudio-is/webstudio-builder/issues/1466
- border of style sources is not fixed here, I added a todo to the style
sources issue


## Code Review

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

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-17 09:34:35 +02:00
Ivan Starkov 9dd06b37a2 Fix cross domain livereload in dev mode (#1456)
## Description

This fixed crossdomain development mode used in SaaS 

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-17 11:25:22 +04:00
Oleg Isonen dc681c3068 Add border radius and other fixes to cascade indicator (#1472)
## Description

Closes https://github.com/webstudio-is/webstudio-builder/issues/1460

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @istarkov , 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-16 19:24:58 +02:00
Bogdan Chadkin 496c9197ad Upgrade to react 18 (#1452)
Ref https://react.dev/blog/2022/03/29/react-v18
https://react.dev/blog/2022/03/08/react-18-upgrade-guide

- bumped all deps to use react 18
- storybook still somehow enforces react 17 (but not react-dom) so
forces with overrides until bump of storybook
- both storybook and remix still use legacy api so concurrent features
are not yet enabled. Will do in separate PRs
- fixed weird react-hot-toast error which expose function as renderable
type
- fixed a few untyped useCallback which failed with new react types
- sdk size became a little bigger
2023-04-16 15:33:03 +07:00
Bogdan Chadkin e66b15d8c8 Setup @vercel/remix instead of @remix-run/vercel (#1468)
Ref
https://vercel.com/blog/vercel-remix-integration-with-edge-functions-support
And
https://github.com/webstudio-is/webstudio-builder/pull/1463#issuecomment-1509945284

Turns out remix docs points to outdated solution and vercel prepared
better alternative.

```diff
du -ckd1 node_modules
- 858148
+ 685432
```
2023-04-16 14:13:49 +07:00
Roman Pominov b14f2cf71d File and URL:Attachment controls (#1421)
## Description

1. Added an option to enter raw URL in the File control, and made sure
it looks like in Figma. Closes #1011
2. Added "Attachment" option in the URL control. Ref. #993 

## Steps for reproduction

1. Try to set a Link's href to an asset
4. Try to set a Image's source to a raw URL
2023-04-14 11:23:12 +03:00
Bogdan Chadkin 4375cd9ea0 Pass asset base url for fonts and style images (#1451)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

publicPath and cdnUrl are separate environment variables for different
deployments. Though they do exactly same thing we can unify them as
asset base url.
2023-04-14 14:49:58 +07:00
Oleg Isonen fd979b73d3 Canvas resize handles (#1449)
## Description

1. Resize handles on canvas

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-13 23:50:51 +02:00
Bogdan Chadkin d61c39f22d Rename InstancesItem to Instance type (#1444)
InstancesItem is newer type introduced separately for gradual migration.
Not all legacy tree Instance is migrated away so we can finally use
better naming across whole system.
2023-04-14 00:17:12 +07:00
Oleg Isonen 875cd56e02 Render label in breadcrumbs when possible (#1446)
## Description

Render label in breadcrumbs when possible

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-13 11:04:47 +02:00
Roman Pominov 1a80932823 Fix ScrollArea's display:table (#1447)
## Description

This fixes issue with `display:table` everywhere ScrollArea is used now,
unlike the previous fix that only fixed style panel
2023-04-13 12:00:54 +03:00
Bogdan Chadkin 68639ab708 Drop asset.path (#1445)
This is computed field which is after moving logic to loaders equal to
asset.name so not really useful except for preview images.

Here object url for preview images is moved to container so there is no
need in asset.path here too.
2023-04-13 14:38:12 +07:00
Bogdan Chadkin b71180b7ad Pass all asset uploader envs from builder (#1442)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

Here all envs which were accessed and parsed in asset uploader moved to
builder. Now we have better control over assets in different
environments.
2023-04-13 13:35:57 +07:00
Bogdan Chadkin e42e346d1b Drop legacy root instance store (#1441)
Ref https://github.com/webstudio-is/webstudio-builder/issues/696

The last piece with denormalized tree. Now we rely only on normalized
instances map.
2023-04-13 13:08:26 +07:00
Bogdan Chadkin 22962e1a46 Fix font assets resolving (#1443)
Fonts are resolved separately. Here provided same publicPath and cdnUrl
options to font face resolver.
2023-04-13 13:05:54 +07:00
Bogdan Chadkin 18afa9d92b Pass cdn url to remote image loader (#1414)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

Migrated away from env parsing in asset loader by moving cdn resolving
logic to image loader. Now ASSET_CDN_URL should be provided.

In builder there is fallback to s3 bucket.endpoint.
2023-04-13 09:37:19 +07:00
Ivan Starkov 7249496197 Update version (#1440)
## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-13 02:59:30 +04:00
Ivan StarkovandOleg Isonen 759827c80e Fix display-table (#1438)
## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-04-13 02:52:19 +04:00
Oleg Isonen e069870d3f Canvas width arrow keys (#1437)
## Description

Reusing now arrow up/down logic we have in CSS value input

## Steps for reproduction

1. up/down inc by one
2. shift by 10
3. option by 0.1

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-13 00:46:34 +02:00
Oleg Isonen 4a3f8031ea Prevent topbar from jumping when loading (#1436)
## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-12 23:36:32 +02:00
Ivan Starkov bcd615022b Remove useless warning (#1435)
## Description

No longer needed, as impossible to set width less than allowed

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-13 01:22:46 +04:00
Ivan Starkov 969d311b66 Npm packages release 0.55.0 (#1433)
## Description

Npm packages release 0.55.0

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-13 00:47:17 +04:00
Oleg Isonen ffb3811380 Use scroll area in style right panels (#1434)
## Description

Replacing scrollbar in all panels on the right

Closes https://github.com/webstudio-is/webstudio-builder/issues/1417

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-12 22:43:03 +02:00
Bogdan Chadkin d4753f0a26 Switch canvas and published rendering to normalized instances (#1422)
Ref https://github.com/webstudio-is/webstudio-builder/issues/696

Here we finally can switch to normalized instances for rendering tree
and get rid from denormalization for published sites.

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - test it on preview
- [ ] hi @rpominov, I need you to do
  - 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-12 21:32:03 +02:00
Ivan Starkov 3dd40cc5e6 Fix inital canvas size and breakpoints (#1430)
## Description

This is the fast-fix.
Better to rewrite as here
https://github.com/webstudio-is/webstudio-builder/issues/1431

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-12 22:05:04 +04:00
Oleg Isonen 21073ecaa5 Top panel drop shadow (#1432)
closes https://github.com/webstudio-is/webstudio-builder/issues/1419

## Description

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

## Steps for reproduction

1. style panel shadow on the top panel
 

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-12 20:02:15 +02:00
Bogdan Chadkin 1c0faf73d6 Fix tree hover (#1429)
There were two problems here. 1 hover out provided item selector which
actually made it hovered. And outline was not reset when hover selector
is reset.
2023-04-13 00:19:00 +07:00
Ivan Starkov 62001142ec Fix cascade indicators on scrub move (#1428)
## Description

Map used based on

https://react.dev/learn/manipulating-the-dom-with-refs#how-to-manage-a-list-of-refs-using-a-ref-callback


## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-12 20:35:00 +04:00
Ivan Starkov a4c9bb8603 Fix perf on scrub (#1425)
## Description

fixes perf on breakpoint scrub change

Still some issues on breakpoint change, but we know why this happens.
Would be fixed in next iterations.

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-12 19:44:26 +04:00
Ivan Starkov deb4a49347 Update npm versions 0.54.0 (#1423)
## Description

Update npm versions 0.54.0

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-12 16:42:00 +04:00
Oleg IsonenandIvan Starkov 3b0aba880e Breakpoints stage 3 (#1413)
## Description

1. Input instead of a slider

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

- [ ] hi @istarkov  , I need you to do
  - conceptual review (architecture, feature-correctness)
  - 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory

---------

Co-authored-by: Ivan Starkov <istarkov@gmail.com>
2023-04-12 16:22:08 +04:00
Ivan Starkov 1ecea88ddb Speedup add remove nodes (#1415)
## Description

Reduces amount of renders from 6 to 2 on addding/deleting instances

Reduction to 1 render is impossible in our current architecture as
following situation happens.

On add node, we set selectedInstanceSelectorStore from the builder, what
cause

In the canvas "SelectedInstanceConnector" sets computed styles etc and
sync back. Both are causing double rendering.

Can be avoided in the future allowing to set store from the builder in a
canvas.


## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-12 12:19:07 +04:00
Bogdan Chadkin 34181a1a95 Add public path to local image loader (#1409)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

Added ASSET_PUBLIC_PATH env for local development
and publicPath option in local image loader.

Now fs asset client provides name as path without modification on server
side.
2023-04-11 22:02:44 +07:00
Ivan Starkov 167d746107 UX improvement for Inputs that have both keywords and units (#1412)
## Description

closes #956

+ In case if user not edited the value but immediately clicked to unit
select we are trying to convert em px etc values

## Steps for reproduction

1. Edit `width` value, enter 10
go to unit select set `em` - see 10em as final result

2. Click on unit select of the width, change em to px see 10em converted
to 140px or like (depends on em size)

3. Enter `Auto` in width, click Enter. 
Click on UnitSelect select EM, see browser style is used to set em
width.

4. Enter Auto in width, switch on Unit select, set px, see browser style
is used.

5. See that now unit selector is visible always. With some exclusions
like aspectRatio as it has keywords and numeric values.




## Code Review

- [x] 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-11 16:01:23 +04:00
Bogdan Chadkin 06b3f279ad Drop assets resolving from project-build (#1406)
This big chunk of legacy is no longer necessary.
We resolve style assets on client so css engine can accept db types now.
2023-04-10 23:14:10 +07:00
Bogdan Chadkin b13b073ffe Pass fs directory from builder (#1400)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179
2023-04-10 23:13:32 +07:00
Ivan Starkov d243fbc2fb Fix error in dev mode (#1408)
## Description

Fixes Error in dev mode on every start or reload

```
react-dom.development.js:67 Warning: Prop `className` did not match. Server: "null" Client: "t-doScVt"
    at html
    at Root (http://localhost:3000/build/_shared/chunk-TNFZIIN2.js:36:22)
 ```

It works because of bug, now without bug it shows
https://github.com/webstudio-is/webstudio-builder/pull/1408

I would comment usetEffect for now



## Steps for reproduction

Run localy, see Error has gone

## 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-builder/blob/main/apps/builder/docs/test-cases.md) document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example` and the `builder/env-check.js` if mandatory
2023-04-10 19:43:34 +04:00
Oleg Isonen 48b4980d12 Breakpoints redesign stage 2 (#1366)
## Description

- Canvas behavior should be exactly as in Webflow now - responsive
canvas.
- No constraints for resizing, you can switch to different breakpoints
when you change the canvas width just like in preview

## Not done in this PR

- [ ] breakpoints dropdown menu redesign
- [ ] on-canvas resizable handles
- [ ] flash-animate breakpoints list when breakpoint is switched through
resize
- [ ] flash-animate left and right borders when breakpoint is switched
- [ ] gravity of resize handle dragging when reaching next breakpoint
- [ ] vertical labels with @media example that matches current
breakpoint
- [ ] migrate min-width 0 breakpoints to base?
- [ ] hide outline while changing size
- [ ] ensure there is never both min and max in one media

## Todo

- [x] draggable positioning calc
- [x] shortcuts for zoom
- [x] sync width and selected breakpoint
- [x] remove scale
- [x] fix mobile-first breakpoints
- [x] tabbable toolbar items
- [x] icon for base
- [x] fix flicker
- [x] After breakpoint delete/add CascadeIndicator doesn't refresh
- [x] fix when there is no base, min-width 0 should have still a full
width

## Steps for reproduction

1. click button
3. expect xyz

## Code Review

- [ ] hi @TrySound, @istarkov  , 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-04-09 20:19:12 +02:00
Bogdan Chadkin 33fd087ece Transform image value to resolve url (#1405)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

Succeeded https://github.com/webstudio-is/webstudio-builder/pull/1403

Here added support for transformValue in css-engine StyleRule. So we can
apply any transformation when render css.

In sdk added image transformation which accepts assets and provides
image value with new url value.

Now we can get rid of resolving on server side and apply image loaders
for images rendered in styles.
2023-04-09 22:24:02 +07:00
Bogdan Chadkin 914fbfca97 Allow to map individual style values when stringify to css (#1404)
Related to https://github.com/webstudio-is/webstudio-builder/pull/1403

Here I removed app specific case from css-engine toValue by providing
transformValue function which is called on every individual style value
inside nested structure (like var or layers).

With this function we can resolve assets and remove complex resolving
logic from server.
2023-04-09 20:22:10 +07:00