582 Commits
Author SHA1 Message Date
Ivan Starkov f9ce6a1ac9 Release 0.87.0 (#2110) 2023-08-13 22: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
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 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
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
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
2023-08-09 23:43:21 +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
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
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
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 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
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
Bogdan Chadkin 40e71b6c5b Simplify indexes within ancestors (#2021)
Here added dedicated field to meta to simplify computing and using
indexes.

```
{
  type: 'container',
  label: 'Tab Trigger',
  // this one
  indexWithinAncestor: 'Tabs'
}
```

Since it's single value, we no longer need to provide ancestor name in
runtime and no longer have bug with namespaces. Index now provided with
props.

```
getIndexWithinAncestorFromComponentProps(props): string | undefined
```
2023-08-01 22:40:16 +04:00
Bogdan Chadkin f751045e22 Add namespace prefix to constraints (#2020)
Ref
https://discord.com/channels/955905230107738152/1135965820602831036/1135965820602831036

This fixes the issue with adding any radix component. It got broken
because of unprefixed constraints.
2023-08-01 20:35:53 +04:00
Bogdan Chadkin 46c4a6296d Bump immerhin and immer (#2019)
- https://github.com/webstudio-is/immerhin/pull/9
- https://github.com/immerjs/immer/releases/tag/v10.0.0
2023-08-01 20:21:34 +04:00
Bogdan Chadkin d7cbf96237 Fix links paste (#2017)
Here fixed paste of bare links which render empty paragraph now because
of missing mdast extension. micromark extension is responsible only for
parsing but do not produce ast.

With this change you can paste links and get Paragraph>Link.
2023-08-01 16:44:12 +04:00
Bogdan Chadkin 4cfb0a9d62 Compute indexes within required ancestors (#2000)
Ref https://github.com/webstudio-is/webstudio-builder/pull/1516

Here added utility to compute indexes within ancestors. This should let
us easily co-locate tabs triggers and contents by their indexes.
2023-08-01 14:32:06 +04:00
Bogdan Chadkin ec84e84a10 Bump to remix 1.19 (#2016)
Ref https://github.com/remix-run/remix/releases/tag/remix%401.19.0

The main change is new option to disable polyfills
2023-08-01 00:53:06 +04:00
Bogdan Chadkin cb2f719885 Fix tooltips on login page (#2015)
Added missing tooltip provider on login page.
2023-08-01 00:22:38 +04:00
Bogdan Chadkin 4460bba4ae Remove global tooltip provider (#2012)
Radix provider in canvas couples too tight with radix we should go the
other way. Here wrapped each
tooltip sdk component with provider and wrapped
with provider in builder instead of root.
2023-07-31 21:51:17 +04:00
Bogdan Chadkin 3d851e427f Replace dotenv-cli with dotenv require hook (#2010)
dotenv can be invoke with require hook like this.
No need to have another package.

```
NODE_OPTIONS='-r dotenv/config' any_node_command
```
2023-07-31 19:03:15 +04:00
Bogdan Chadkin ac735df3ce Render component templates in stories (#2009)
Here added utility to render component templates in stories as it will
work in published site without running builder.

It will help to be more confident in templates we write for components.
Especially with complex logic with variables and expressions.

Can be tested here
https://638affb61acca1e593c6e558-gxuvohlrer.chromatic.com/?path=/story/sdk-components-react-radix_components-collapsible--collapsible
2023-07-31 15:46:56 +04:00
Ivan Starkov 22da5ea728 Update NPM 0.83.0 (#2008)
## 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-07-31 12:52:19 +03:00
Bogdan Chadkin 923a3868a1 Fix drag&drop on canvas (#2007)
Here fixed droping new components on canvas.
Template was used to check constraints but failed
when no template found. Fixed by using fallback.
2023-07-31 13:23:55 +04:00
Oleg Isonen b995ff85a4 Publishing wording (#2006)
## Description

Removing mentioning Entri, there is no value in it, nobody knows them

## 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-07-31 10:19:04 +02:00
Bogdan Chadkin 8b7dea5060 Add radix collapsible component (#2003)
Ref https://www.radix-ui.com/docs/primitives/components/collapsible

Added new sdk-components-react-radix package with collapsible component.
It does not have any styles so no need to move tailwind stuff yet.
2023-07-31 02:05:54 +04:00
Bogdan Chadkin 381a962437 Namespace component libraries (#2005)
Here added support for namespacing external libraries. Need this for
radix components to not prefix manually and have isolation in names in
case a few client libs are added an have collission in names or we add
native components with same names.
2023-07-30 21:14:57 +04:00
Ivan Starkov 80a72917cb Dialog (#2001)
## Description

Initial dialog implementation
Additionally:
`backdropFilter` property added to support dialog backdrop css

<img width="250" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/4f0e5b88-2b3b-42e6-bfd9-34dd36dc08f3">

Not detachables are Overlay, Trigger and Content
Header, Close can be removed 


Next PRS: 
- [ ] - Move to radix components repo
- [ ] - Add Right Icons


## Steps for reproduction

Create new project, add Radix/Dialog component


## 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-07-30 20:07:43 +03:00
Bogdan Chadkin 6500e01397 Move getBrowserStyle utility into builder (#2004)
getBrowserStyle is used only inside of builder and should not be part of
sdk importable by all component libraries. It also depends on global
types which need to be included in every package dependent on react-sdk.
2023-07-30 20:56:29 +04:00
Bogdan Chadkin 004232da63 Bump checks packages (#2002)
- jest
- simple-git-hooks
- eslint
- size-limit
2023-07-28 23:37:33 +03:00
Bogdan Chadkin 685ca24552 Support actions copy paste (#1976)
Here added action copy paste support.

When all action dependencies are scoped to copied instance new variable
nams are ussed.

When some any dependency is not scoped execution is removed from copied
prop.
2023-07-28 01:53:58 +03:00
Ivan Starkov 74092f66bf Add radix popover (#1997)
## Description

 - [x] - clicks not working

## 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-07-27 23:35:00 +03:00
Bogdan Chadkin 9328961b87 Allow to disable components detaching (#1986)
Here added meta.detachable flag which allows when set to true disable
copying, dragging and deleting instances of this component without ts
parent instance.

This is necessary to constrain components based on external code and
prevent deleting hidden components user cannot add again.
2023-07-27 20:43:46 +03:00
Ivan Starkov a190deb48b Fix selection on visually hidden elements (#1996)
## Description
Avoid any selection on Visually Hidden elements

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


## 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-07-27 17:29:42 +03:00