Commit Graph
5224 Commits
Author SHA1 Message Date
Bogdan Chadkin f1b2c9b2dc Merge tabs trigger and button into single component (#2162)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2151

Separate buttons from tab triggers does not make much sense and
complicate logic.
Here I merged tab trigger and button into single styleable component.

<img width="284" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/94f7c8e5-d876-4949-81d5-9472f054bb5e">
2023-08-24 19:34:35 +04:00
Jaya Krishna Namburu aa6f05b5e6 (cli): Download images to local build in cli projects (#2133)
Hi

This PR, allows the cli to download `images` and `fonts` and build the
projects from the local assets.
2023-08-24 16:44:59 +02:00
Bogdan Chadkin 1bb154eebd Fix instance labels in settings and style panel tooltips (#2164)
- fixed instance name placeholder in settings
(https://discord.com/channels/955905230107738152/1143832643373371432)
- fixed instance name in style tooltips

Can be tested on radix components
2023-08-23 19:15:10 +04:00
Oleg Isonen 2f0ea2602a Move position section in style panel right after size section (#2163)
## Description

it was originally moved below because it was "unstyled" and took too
much space


## Steps for reproduction

1. open style panel
2. see position after size section

## 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-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-08-23 14:49:56 +02:00
Bogdan Chadkin 52dda4813c Make nav menu items detachable (#2161)
Ref
https://discord.com/channels/955905230107738152/1143794425290555452/1143794425290555452

Items need to allow duplicate and reorder
2023-08-23 11:30:18 +04:00
Bogdan Chadkin bd3e912d83 Support expand all when alt+click on navigator chevron (#2155)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2151

Here added alt+click or opt+click support to navigator chevron to expand
whole tree and simplify user navigation into hidden contents.

Also changed accordion hooks behaviour. Now only selecting accordion
content expands its item. Before was possible to expand on item select.

Alt+click will help to reach accordion contents faster.
2023-08-22 14:53:15 +04:00
Ivan Starkov d096f91f0f Speedup remix dev 40x on my machine (#2157)
## Description

This speedups my remix dev rebuilds from 42s to 1s
The issue was that chokidar watched my whole fs and seems like something
on my machine makes it very slow.

Also enabled `v2_dev: true,` doesn't affect perf, just to be modern


## 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-08-22 00:58:55 +03:00
Ivan Starkov 61acb2395c Nav menu internals (#2153)
## Description

ref #2151

<img width="592" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/2cfb1294-1b2b-4dd1-b4b7-0fa7ed355c90">

<img width="585" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/f71b000f-272a-44cf-a783-378d64570102">


## 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-08-21 23:52:22 +03:00
Ivan Starkov f7f51f66cf Exclude props (#2154)
## Description

ref https://github.com/webstudio-is/webstudio-builder/issues/2151

Exclude following props from radix components


```
-e asChild -e modal -e defaultValue -e defaultOpen
```

## 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-08-21 23:52:10 +03:00
Bogdan Chadkin 23c1ff5e74 Schedule canvas rect updates and fix drag&drop (#2152)
Here changed canvas rect subscription to read always in effect to not
get stale state.
This fixes the issue with drag'n'drop when switch to another breakpoint.
2023-08-21 16:10:52 +04:00
Ivan Starkov ab903af130 Navigation Menu Radix Component (#2146)
## Description

https://www.radix-ui.com/primitives/docs/components/navigation-menu

Open project 

<img width="362" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/caa6d103-90ca-4fe7-b413-ad3c05733c22">

Or add NavigationMenu yourself


## 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-08-21 00:59:40 +03:00
Oleg Isonen 81cf3d3fd0 Allow horizontal scrolling in navigator (#2149)
## Description

This is a workaround because we don't have a resizable panel yet. With
deep nested trees we need more space

## Steps for reproduction

1. nest radix components with a lot of depth
2. see that you can scroll both vertically and horizontally
3. horizontal bar is invisible, its a separate problem, not sure why

## 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-08-20 21:41:07 +02:00
Bogdan Chadkin 6b5cd33033 Subscribe selected instance for component hooks (#2150)
Here subscribed selected instance selector store instead of navigator
events. Now selection from canvas trigger hooks as well. Necessary to
support navigation menu component.
2023-08-20 21:56:26 +04:00
Ivan Starkov 5550aabeae Fix accrodion trigger not editable (#2145)
## Description

closes
https://discord.com/channels/955905230107738152/1142493917862973450

All changes

<img width="236" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/2ebb4abc-7def-4fd2-818e-ed085b2abc9f">


## 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-08-20 20:28:09 +03:00
Bogdan Chadkin 5e900ff2e8 Add component tokens support (#2147)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2137

Here added static tokens support to meta. Id of resulting style source
become persistent like this "componentName:tokenName". Such token styles
are inserted only if style source with same id not exist. This way we
prevent breaking styles already changed by user.

Style source input now autocomplete global tokens and suggest to create
predefined component tokens.

Also disabled spell check in style source input.

<img width="244" alt="Screenshot 2023-08-20 at 17 18 37"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/9572f5b1-6243-49fa-83be-a0315f104987">
2023-08-20 18:48:16 +04:00
Bogdan Chadkin 036b156c6b Fix prop labels (#2144)
- https://github.com/webstudio-is/webstudio-builder/issues/2104
- https://github.com/webstudio-is/webstudio-builder/issues/2047
- https://github.com/webstudio-is/webstudio-builder/issues/2131
- https://github.com/webstudio-is/webstudio-builder/issues/2129

Improved switch control layout and made all inputs change to vertical
layout when label is more than 8 chars.
2023-08-20 12:57:00 +04:00
Ivan Starkov f659565d96 Add project templates (#2138)
## Description

closes #2134

<img width="1400" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/c868898a-e3ae-4b81-bbac-8a7c3b55e98d">

On card click

<img width="631" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/897c9863-1a66-4bf5-93d0-bcff147823e6">





Also fixed resize

<img width="953" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/f890668c-c022-47ec-9745-fc5dc9433264">

Made it

<img width="1204" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/5d2bc6cf-9495-4657-a1d1-e0f8c15516e5">



## 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-08-20 11:40:11 +03:00
Bogdan Chadkin 4f782cd3df Reorder radix components (#2142)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2140

<img width="271" alt="Screenshot 2023-08-19 at 12 44 47"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/ea98dd89-4428-4590-8b50-013b9d6e23fd">
2023-08-19 20:37:48 +04:00
Oleg Isonen 84fd2c1116 Add inline-flex display option (#2141)
## Description

This adds inline-flex display option as requested here
https://github.com/webstudio-is/webstudio/discussions/50

The use case is having a button with icon and text, without turning it
into block element with full width.

## Steps for reproduction

1. select any element and set display: flex


## 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-08-19 14:56:14 +02:00
Bogdan Chadkin c1f10dbfa1 Add chevron icon to accordion (#2126)
Here added chevron to accordion trigger
by using css custom properties for cascade.

We still do not support css custom properties in style panel though here
used only for transform which does not have ui too.
2023-08-16 21:06:19 +04:00
Bogdan Chadkin 50ef1fbd81 Fix cli build (#2127)
Prebuild should not be run in ci as all artifacts committed anyway.

## Code Review

- [ ] hi @JayaKrishnaNamburu, 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-08-15 18:51:53 +04:00
Jaya Krishna Namburu 7097efe71f Add ability to build templates from the templates folder for scaffolding projects in cli (#2035)
## Description

This PR introduces a build step for cli to generate templates which is
needed in the next stages for building projects from the `sync` command
from #2033


## Code Review

- [ ] hi @kof, 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")
2023-08-15 13:11:54 +02:00
Ivan Starkov f710437125 Add overflow scroll to dialog element (#2122)
## Description

Small fix to allow dialog to be scrollable in case of content overflow

## 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-08-14 21:45:38 +03:00
Bogdan Chadkin e665a996ee Fix code text component (#2120)
Fixes
https://discord.com/channels/955905230107738152/1140570603372413039
https://discord.com/channels/955905230107738152/1140566358023745587

- dropped inline prop
- dropped meta prop
- replaced css custom property with local style
- added `white-space: pre-wrap` preset style to preserve indent
- fixed pasting of code in markdown
2023-08-14 22:05:14 +04:00
Bogdan Chadkin 3d04415630 Sort assets (#2121)
Ref https://github.com/webstudio-is/webstudio-builder/pull/2115

- sort uploading assets first
- sort newest uploaded first
2023-08-14 16:26:37 +04:00
Oleg Isonen fabb1341b3 Added cite tag to Text component as well as cite prop in initial props to Blockquote component (#2119)
Closes https://github.com/webstudio-is/webstudio-builder/issues/2118

## Description

Added cite tag to Text component as well as cite prop in initial props
to Blockquote component

Now you can create same html structure as
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote

```html
<blockquote cite="https://www.huxley.net/bnw/four.html">
  <p>Words can be like X-rays, if you use them properly—they’ll go through anything. You read and you’re pierced.</p>
  <footer>—Aldous Huxley, <cite>Brave New World</cite></footer>
</blockquote>
```


## 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-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-08-14 12:55:33 +02:00
Bogdan Chadkin 8bfdf3174f Release 0.87.1 (#2114) 0.87.1 2023-08-13 23:15:41 +04:00
Ivan Starkov f9ce6a1ac9 Release 0.87.0 (#2110) 0.87.0 2023-08-13 22:34:12 +04:00
Ivan Starkov 37c6e7adbc Use styled radix button at dialog, sheet, popover and tooltip (#2111)
## Description

For Sheet used variant="ghost" size="icon" with svg embed 

<img width="498" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/e0a85586-318e-42bf-b546-404fc42151f1">
2023-08-13 22:27:43 +04:00
Bogdan Chadkin b1ce0c1bc9 Export generateUtilsExport 2023-08-13 20:18:00 +04:00
Bogdan Chadkin 5b4c33da69 Fix html embed (#2108)
- renamed "Execute script on canvas" to "Run script on canvas"
(https://github.com/webstudio-is/webstudio-builder/issues/2104)
- execute in preview
(https://github.com/webstudio-is/webstudio-builder/issues/2107)

## 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-08-13 17:34:12 +04:00
Ivan Starkov ff8682d1d1 Fix hidden elements not selected sometimes (#2109)
## Description

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

## 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-08-13 16:31:33 +03:00
Bogdan Chadkin f240c46027 Infer label from component name (#2106)
Here made meta.label optional to simplify adding new stuff. Most of the
time label is just a "humanized" version of component name. With radix
there is an additional action to strip namespace. But still would be
less repetition if the name is just inferred.
2023-08-13 13:12:51 +04:00
Bogdan Chadkin 8540cb2280 Add radix accordion (#2100)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2096

- https://ui.shadcn.com/docs/components/accordion
- https://www.radix-ui.com/primitives/docs/components/accordion
2023-08-13 00:17:35 +04:00
Ivan Starkov c28ce52754 Input + Textarea + Label components (#2101)
## Description

ref #2096

<img width="562" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/d2ce07a5-c567-4b42-b60b-90d6fec1fe8b">

<img width="567" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/989ead03-9c8c-46ec-85a8-4c2064217040">



## 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-08-12 19:18:40 +03:00
Bogdan Chadkin b8a7a40dd5 Add utilities generator to sdk (#2098)
Here moved code generation of utilities from saas into sdk.

Now InstanceRoot accepts utils object with these 3 fields

- indexesWithinAncestors,
- executeComputingExpressions,
- executeEffectfulExpression,

Generation utility can be shared between cli and saas to simplify
maintenance.
2023-08-12 17:04:37 +04:00
Bogdan Chadkin 0d152c8909 Bump checks (#2099)
- prettier
- eslint
- typescript-eslint
2023-08-12 16:59:17 +04:00
Ivan Starkov 7a8fd3db49 Radix Button (#2097)
## Description

Add radix button.


<img width="555" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/afd07b25-2592-4ed6-9788-dd880be2f22e">


## 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-08-12 15:30:00 +03:00
Bogdan Chadkin 449a8ef7b6 Use open prop in radix components (#2092)
Fix https://github.com/webstudio-is/webstudio-builder/issues/2046

- replaced isOpen with open
- added builder hooks to open content when select in navigator
- remove unselect hook from collapsible
- added stories to preview templates
2023-08-11 13:45:18 +04:00
Bogdan Chadkin 9af97656af Improve s3 keys sanitizer (#2095)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2091
https://github.com/webstudio-is/webstudio-builder/issues/2049

Here fixed uploading of files by sanitizing a few more characters which
require special treatment in signature v4.
2023-08-11 12:40:17 +04:00
Bogdan Chadkin a737e03c8f Automatically open tab content on select in navigator (#2073)
Here added tabs hooks to auto select tab when its content is selected.
Added new utils to hook context getPropValue and indexesWithinAncestors.

Renamed instanceSelection to instancePath.

Had to pass all props in edit mode in webstudio component



https://github.com/webstudio-is/webstudio-builder/assets/5635476/1f1211bc-0ea4-4d21-9205-1439668e08b4
2023-08-10 22:02:25 +04:00
Bogdan Chadkin 9157f98eb7 Bump ui libs (#2086)
Mostly patches and unrelated feature releases

- fontsource
- react-aria
- floating-ui
- radix colors
- react types
- type-fest
2023-08-10 21:55:08 +04:00
Ivan Starkov f8c97c2e2d release 0.86.0 (#2090)
## Description

release 0.86.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
0.86.0
2023-08-10 18:49:02 +03:00
Ivan Starkov 377889f5fb Fix pointer events (#2089)
## Description

Fix bug with drag component etc

implemented disableCanvasPointerEvents as disposable resource. 
That makes it much easier to control order of execution (disable first
then enable), be sure that counter is always >=0,
and easier control about enable/disable events allowing to dispose only
if resource was created.



## 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-08-10 18:31:01 +03:00
Bogdan Chadkin 0679c9eef8 Improve props bypassing in canvas (#2088)
Here fixing the issue with props not bypassed from parent component in
canvas mode. This is important for radix triggers with asChild which
bypass props to child button.
2023-08-10 18:57:59 +04:00
Bogdan Chadkin 85f205a619 Rewrite migrations with zx like api (#2085)
The new execa version added support for zx like api. It's much smaller
and does not pollute globals.
2023-08-10 14:40:03 +04:00
Ivan Starkov 7af70bdf50 0.85.0 (#2084)
## 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
0.85.0
2023-08-09 23:43:21 +03:00
Ivan Starkov 9bdfaf627f Fix tooltip (#2083)
## 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-08-09 23:37:06 +03:00
Ivan Starkov 034709c44d release-0.84.0 (#2082)
## Description

npm packages 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
0.84.0
2023-08-09 22:48:34 +03:00
Ivan Starkov 81b60abbb9 Fix if mouse leaves Tooltip.Content and moves over an iframe, the Radix Tooltip stays open (#2076)
## Description

When the mouse leaves Tooltip.Content and moves over an iframe, the
Radix Tooltip stays open.
This happens because Radix's internal grace area relies on the
pointermove event, which isn't triggered over iframes.
The current workaround is to set pointer-events: none on the canvas when
the tooltip is open.

Here are:
- [x] Tooltip component sets `--canvas-pointer-events` on the
documentElement if any tooltip is open
- [x] Iframe uses `--canvas-pointer-events`
- [x] `isCanvasPointerEventsEnabledStore` in order to use above css
variable
- [x] Color picker hack fully removed. Now just intercepts `open` state
change, as it's dialog and canvas is not interactive when it's open
already so it's safe to disable pointer-events too.


## 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-08-09 22:29:30 +03:00