3947 Commits
Author SHA1 Message Date
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
Bogdan Chadkin 7f53be7b2d Add list item section to style panel (#2077)
Fix https://github.com/webstudio-is/webstudio-builder/pull/2063
https://github.com/webstudio-is/webstudio-builder/issues/2079
https://github.com/webstudio-is/webstudio-builder/issues/2060

Here added new "List Item" section specifically for List and ListItem
components. Now user can cutomize list item markers for whole list or
per each item.

Changed behavior of Select Control to put current value into the list of
options if not present. This way display shows "List Item" instead of
nothing.
2023-08-09 22:58:50 +04:00
Ivan Starkov 260ca1e9a5 Synchronisations fixes (#2070)
## Description

- Fixes sync bugs
https://discord.com/channels/955905230107738152/1138073603036954664
- There is no sense to retry `fatal` errors, we can stop sync.
- Fatal errors state, show fatal error message.
- If user cancel confirmation goto fatal state too, as sync will never
be fixed.
- Intercept error if project is loaded during synchronisation.
- Errors logged, as during investigation there were no way to get why
`patch` requests are in failed state.
- rest.patch are now wrapped with try/catch so we can distinguish api
errors.
- toasts added too (and made infinite in case of fatal errors)
- exponential backoff + jitter added
- improved connectivity messages


Use for review:

<img width="328" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/c9bff25b-4e50-44ed-b4b9-1d3460c13ee1">


### Todo,
- [ ] - test well.

## 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 19:57:40 +03:00
Ivan Starkov 42dcbbc3bc Add automatic https to url (#2078)
## Description

Add https to url 
https://discord.com/channels/955905230107738152/1138821247791284244

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

## 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 19:23:14 +03:00
Ivan Starkov c37f99c490 Fix-breakpoints (#2065)
## Description


- [x] - Fixes that {mix|max}Width was used instead of label at
Breakpoints edit

- [x] - Fixes that form parts wasn't exists partially on useEffect
unmount already, and wrong comment that `Should never be not successful
because the html validator should catch it` - as it was not successfull
;-) having mount/unmount cases before.


## Steps for reproduction

Open breakpoints dialog
See now labels used 
<img width="307" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/ee4a64fa-caa4-43e0-b058-8008a472574f">

Click Edit, see same

<img width="482" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/bbf38d79-0776-4e0c-92e7-2ef267674d30">

Try edit, see everything saved and changed

2. expect xy

## 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 17:13:24 +03:00
Oleg Isonen 389dcd93b1 Add prefetch viewport for as a link prefetch option (#2072)
## Description

- Add prefetch viewport for as a link prefetch option
- Prevent leaking prefetch property and other remix props to the dom

## Steps for reproduction

1. add a link
2. set prefetch to viewport
3. see that it prefetches a linked page (internal page only) as the link
scrolls into view

## 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 10:34:40 +02:00
Bogdan Chadkin 2904fad822 Add radix tabs component (#2022)
Ref https://github.com/webstudio-is/webstudio-builder/pull/1516

- https://www.radix-ui.com/docs/primitives/components/tabs
- https://ui.shadcn.com/docs/components/tabs
2023-08-08 16:50:34 +04:00
Bogdan Chadkin fdf22ab9e6 Add component hooks (#2069)
We want to control some builder behavior specific to some components.
For example set open state on dialog, collapsible etc when select in
navigator.

Here I added hooks to be called from builder and executed in canvas. For
now added 2 hooks onNavigatorSelect and onNavigatorDeselect.
2023-08-08 16:38:53 +04:00
Jaya Krishna Namburu 6777d1a551 Sync project data to the local config file using cli's sync command (#2033)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1825

## Description

PR adds the `sync` command to the `cli`. This can run in two modes.

```sh
webstudio sync <projectId>
```

which will create a new project folder and loads the build data into
`<project>/webstudio.json` file.

```sh
webstudio sync
```

This mode is to sync the existing project with the latest build data.

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

- [x] made a self-review
- [x] added inline comments where things may be not obvious (the "why",
not "what")
2023-08-08 10:43:50 +02:00
Ivan Starkov da7e17b2fe Fix button duplicate text on edit (#2066)
## Description

Double click on button cause text duplication

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



## 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-08 01:12:50 +03:00
Ivan Starkov 635a3f7da6 Fix icons (#2068)
## Description

closes #2040

## 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-07 17:01:20 +03:00
Ivan Starkov c39896ad98 Fix error on project duplicate (#2067)
## Description

Seems like duplication were broken like 3+ months
https://discord.com/channels/955905230107738152/1137586643130396762

## 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-07 17:01:02 +03:00
Bogdan Chadkin fe50a537fe Use stream consumers while uploading (#2064)
Looks like node now provides nice utilities to convert stream into json,
buffer, text etc. Super handy

https://nodejs.org/docs/latest-v18.x/api/webstreams.html#utility-consumers

Cloudflare node compat supports this as well
https://developers.cloudflare.com/workers/runtime-apis/nodejs/streams/
2023-08-07 14:11:11 +04:00
Ivan Starkov 7d635c4940 Fix Toolbar dissapears in the tooltip (#2061)
## Description

Fixes 3

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

Toolbar selection is not working inside tooltip content text.

## Steps for reproduction

Open tooltip, start editing tooltip content text. Select some text with
mouse. Mouse is now visible

## 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-06 19:00:24 +03:00
Bogdan Chadkin 8c6b5cff82 Bump to remix 1.19.2 (#2062)
Ref https://github.com/remix-run/remix/releases/tag/remix%401.19.2

Here fixed a few vulnerabilities by upgrading proxy-agent dependency.
2023-08-06 19:46:19 +04:00
Ivan Starkov 3df5c96a9c Fix jumps on editing text inside tooltips, and probably other components (#2054)
## Description


![image](https://github.com/webstudio-is/webstudio-builder/assets/5077042/dc764c12-8612-4ea4-9a07-46384a8ed5a7)

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

## 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-06 14:09:57 +03:00
Bogdan Chadkin 107a2c0ce5 Bump to storybook 7.2 (#2059)
- https://github.com/storybookjs/storybook/releases/tag/v7.2.0
- https://storybook.js.org/blog/july-2023-update/
2023-08-06 14:20:05 +04:00
Bogdan Chadkin 71daca2fd8 Add browser styles for form controls (#2053)
Ref https://discord.com/channels/955905230107738152/1136979487993638973

Added form control styles from browser presets
Also a bit refactored other styles with simpler utilities.
2023-08-06 14:18:20 +04:00
Ivan Starkov f5ffdd643f Fix toolbar positioning on scale (#2042)
## Description

fixes Toolbar positioning if canvas has zoomed
https://discord.com/channels/955905230107738152/1137141681007886388

## 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-05 21:19:09 +03:00
Ivan Starkov 1b4b2db376 Partially fix tooltip trigger editing (#2041)
## Description

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

<img width="180" alt="image"
src="https://cdn.discordapp.com/attachments/1137094092417941695/1137094092640231454/Screen_Recording_2023-08-04_at_21.43.44.gif">

Fixes positioning. But still have tooltip content blink, seems like
tooltip doesn't like changing trigger on the fly.

Blinking will not be fixed until we change how editor works

I created a simple reproducible example changing the trigger using
setInterval and get same behaviour as we have

![Screen Recording 2023-08-05 at 10 00
02](https://github.com/webstudio-is/webstudio-builder/assets/5077042/67655855-4b61-41a3-9ea4-c4664c0ebf38)





## 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-05 21:10:24 +03:00
Bogdan Chadkin d88939b477 Fix breadcrumbs labels (#2038)
Ref
https://discord.com/channels/955905230107738152/1137068758511394929/1137068758511394929

Full component name was used instead of meta or instance labels.
Also removed unnecessary instance labels.
2023-08-05 11:39:12 +04:00
Ivan Starkov 0a169f3819 Add more label spacing for boolean props (#2037)
## Description

Fixes
https://discord.com/channels/955905230107738152/1136931915044237402

<img width="260" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/7b427f37-1e88-4516-baef-66803886f771">

## 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-04 21:36:29 +03:00
Ivan Starkov 4f10bc26f8 Attempt to hover/select without element (#2014)
## Description

Removes `div style="display:contents"` arount Radix etc Components.

Below in Implementation is written why SelectedInstanceConnector was
moved into standalone root level hook.
In short
- [x] - No issues with visually hidden components.
- [x] - Allows us to not use refs for the builder support. (Now our
components can be without refs)
- [ ] - cc @TrySound ContentEditable could also use
getAllElementsBoundingBox from domUtils to get element ref this will
allow to remove useRef from WebstudioDevComponent

Changes from previous behavior:

- Now on preview elements are not selected (now is like in webflow).
- On changing marign etc we do not hide outline as before



## Implementation: 

having `instanceSelector` we can 
- Find all elements with attribute `data-ws-selector` which ends with
`instanceSelector`
- Then find "root/parent" elements of found elements. _(We can find few
subtrees)_
- Then use that elements instead of wrapper element.

This works fine with tree hovering and selections.
This allows us to not use `refs` inside our WebstudioDevComponent at
all.

### Below is why SelectedInstanceConnector was rewritten

The issue arises when such element is duplicated by radix into
VisuallyHidden element.

There is no way to detect now inside `WebstudioComponentDev` does
current Component is inside VisuallyHidden
(We have no reference element to detect that.)

So current approach makes any additional changes useless.
I'm going to close this. And leave just for example




## 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-04 13:34:14 +03:00
Bogdan Chadkin bcc4556f26 Bump fonts (#2036)
Ref https://github.com/fontsource/fontsource/blob/main/CHANGELOG.md#50x

The new major version moved variable fonts into separate packages
2023-08-04 12:57:49 +04:00
Ivan Starkov a14fc4dd5c Initial Sheet component (#2024)
## Description

- [x] - Side selection through properties
- [x] - `nav  role="navigation"` as default Content element
- [x] - ability to change nav and role 
- [x] - shadcdn styles
- [x] - can have overflow content and be scrollable

![Screen Recording 2023-08-02 at 19 23
10](https://github.com/webstudio-is/webstudio-builder/assets/5077042/45f61f5b-b496-425f-b614-7fb52fe70cb3)

Content props:

<img width="292" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/b26f7d82-bfc3-4ec7-8b60-7f2168ef9e7c">


## 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-04 11:25:25 +03:00
Oleg Isonen ab70977a41 Add action to form's initial props (#2026)
## Description

Action is used for hooks, so should be there by default

## Steps for reproduction

1. open form settings
2. see there is Action property

## Code Review

- [ ] hi @istarkov , 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-03 15:12:23 +02:00
Ivan Starkov 9a0536e852 Fix presets in radix (namespaces issue) (#2025)
## Description

Fix presets in case of namespaeces added `"` to selector
<img width="605" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/9b367c73-466e-4592-b45f-0b84660e423f">


Added presets to radix components


## 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-03 13:37:44 +03:00
Jaya Krishna Namburu 6b9e6d3708 Setup for cli to interact with the deployed projects (#2018)
First and very initial support for the webstudio cli
2023-08-02 09:49:23 +02:00