4006 Commits
Author SHA1 Message Date
Bogdan Chadkin c2885fdea3 Release 0.90.0 (#2207) 0.90.0 2023-08-28 23:12:58 +04:00
Bogdan Chadkin c5c4aa2593 Fix style source menu trigger (#2205)
Closes https://github.com/webstudio-is/webstudio-builder/issues/2204
2023-08-28 22:19:24 +04:00
Oleg Isonen a1e6df3423 Fix footer chevron color (#2203)
## Description

1. Chevron icon changed, color not set

## Steps for reproduction

1. open footer
2. see color of cheveron is white

## 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-28 18:11:00 +02:00
Bogdan Chadkin 86ff9d406d Improve radix components (#2201)
Here addressed of some recent feedback

- removed cursor: pointer from all buttons
- added active states to accordion and tabs triggers
- replaced X with svg icon in dialog and sheet close button
- updated item icon for all components
- removed dir and orientation props from accordion initials
2023-08-28 20:04:26 +04:00
Jaya Krishna Namburu 0e64ee80c8 Moving cli from apps folder into packages folder (#2198)
## Description

This PR moves the cli from `apps/cli` into `packages` folder. It was
initially started under `app/cli` from this
[comment](https://github.com/webstudio-is/webstudio-cli/pull/6#issuecomment-1657212350).
But looks like, `packages` is the good place for it.
2023-08-28 09:55:08 +02:00
Ivan Starkov d41b52abda Release 0.89.0 (#2200)
## 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.89.0
2023-08-27 21:42:04 +03:00
2680ae0a13 Add tooltips for component properties in Settings tab (#2125)
## Description

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

**Important** The PR adds tooltips only for HTML attributes.

Fixes https://github.com/webstudio-is/webstudio-builder/issues/2027

## Steps for reproduction

1. Add a few components to the canvas
3. Select one
4. Go to the Settings tab in the right sidebar
5. Hover over the labels

HTML attributes should show a tooltip with a description

## Code Review

- [ ] @taylornowotny please review the descriptions in the
props-descriptions.ts file
   - test it on preview
- [ ] @istarkov check the first commit that is where the implementation
and integration are done. The idea behind this is that we have a central
file with HTML attributes descriptions and when generating components
props we pick the descriptions from there if the property doesn't have a
custom description. Essentially we use props-descriptions as a fallback.
Do we need tests for this feature?
  

## Before requesting a review

- [ ] made a self-review

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

---------

Co-authored-by: Giuseppe Gurgone <ggurgone@users.noreply.github.com>
Co-authored-by: istarkov <istarkov@gmail.com>
2023-08-27 20:46:36 +03:00
Bogdan Chadkin cc0336e50d Drag on canvas closest detachable (#2197)
Before when start dragging we searched for closest rich editor under
cursor and did nothing when the instance is not detachable (for example
select value or switch indicator).

Here I changed the behavior to also look for closest detachable instance
and drag whole thing. This way we do not need toast like in navigator
and can canvas dnd just work.

Also fixed placeholder in "Select Value" component. Before was no way to
change it.
2023-08-27 21:28:33 +04:00
Bogdan Chadkin abc7acbc55 Reimplement instance selection with pointer events (#2199)
Here improved instance selection by using pointerdown and pointerup.
This solves issues with libraries like radix preventing firing mouse
events.

Though there is a problem. Pointer events do not support event.detail to
inform about double clicks. So here I implemented multiple clicks
detection. For this I track time between latest pointerup and next
pointerdown events.
2023-08-27 21:00:25 +04:00
Oleg Isonen d2bb3dc0a3 Add component descriptions (#2196)
## Description

Now we are showing each component description in a tooltip

## Steps for reproduction

1. hover any component in components panel
2. see tooltip text

## 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-27 14:36:48 +02:00
Jaya Krishna Namburu 9fc3026bfa (fix): Fix nested routes in the cli projects (#2189) 2023-08-27 17:20:14 +05:30
Bogdan Chadkin 4c6fe0bb23 Add more constraints to components (#2195)
Marked more components as non-detachable and non-self-nestable
2023-08-27 14:48:21 +04:00
Ivan Starkov 7fd01f7d07 NPM Release 0.88.0 (#2194)
## 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.88.0
2023-08-27 11:01:48 +03:00
Ivan StarkovandBogdan Chadkin aaaa50f107 No content Nav menu items (#2188)
## Description

Menu items without content (just with Link)

<img width="707" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/63cf6a84-08bc-4f8f-b307-41323921c78c">

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory

---------

Co-authored-by: Bogdan Chadkin <opensource@trysound.io>
2023-08-27 10:52:50 +03:00
Bogdan Chadkin e814cfaaed Add radix radio group (#2192)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2031

- https://www.radix-ui.com/primitives/docs/components/radio-group
- https://ui.shadcn.com/docs/components/radio-group

<img width="468" alt="Screenshot 2023-08-26 at 21 30 40"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/26865561-f445-4532-bf35-dabf20b32f59">
2023-08-27 00:02:01 +04:00
Bogdan Chadkin 2891822ab4 Add radix checkbox (#2191)
- https://www.radix-ui.com/primitives/docs/components/checkbox
- https://ui.shadcn.com/docs/components/checkbox

<img width="468" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/a13771d2-c574-4fa0-9176-0bdc7e98cfa8">
2023-08-26 19:09:53 +04:00
Bogdan Chadkin e32a3e61ef Add radix switch (#2187)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2031

- https://ui.shadcn.com/docs/components/switch
- https://www.radix-ui.com/primitives/docs/components/switch

<img width="438" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/1197c2cd-d09f-4914-9ddc-f5d5c3f18210">
2023-08-26 17:41:58 +04:00
Bogdan Chadkin 8dca908e3a Fix chevron icons (#2190)
Ref https://discord.com/channels/955905230107738152/1144755824628076585

Chevron icons were not flatten so result looked broken.
2023-08-26 17:41:35 +04:00
Bogdan Chadkin efdf883fa8 Add radix select component (#2183)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2096

- https://www.radix-ui.com/primitives/docs/components/select
- https://ui.shadcn.com/docs/components/select

<img width="1044" alt="Screenshot 2023-08-25 at 20 27 13"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/e7f1c1fd-fefe-44a9-9193-a83e4d84409e">
2023-08-26 12:49:55 +04:00
Ivan Starkov 1871f81755 Rename radix template labels (#2186)
## 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-26 10:45:08 +02:00
Ivan Starkov 7c0e25cf04 Fix navigation menu by aligning it to the left (#2182)
## Description

Setting max-w-max we are forcing menu to be left aligned.

## 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-25 17:04:07 +03:00
Bogdan Chadkin c48f6613a8 Fix focus navigation in preview (#2179)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2151
https://github.com/webstudio-is/webstudio-builder/pull/2112

Here splitted webstudio component wrapper for preview and canvas. This
allows us to have more granular control over preview behavior. For
example canvas requres all elements to be focusable for instance
selection to work. Prevew should be close to published sites and reflect
user experience.
2023-08-25 17:47:40 +04:00
Ivan Starkov 5a529cd8bd Fix horizontal scroll and last element selection in the Tree (#2181)
## Description

ref #2151 

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

Also made that scrollbars are not intersected
<img width="111" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/e103e4b1-40e3-4328-b698-8cdb7b43ae4b">

## Steps for reproduction

Add a lot of elements into the tree.
Be sure last element has a long long label.

See it can be selected, 
See both scrolls work

## 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-25 16:22:55 +03:00
Bogdan Chadkin 342ad9bf29 Refactor shadcn sheet with radix dialog (#2180)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2151

Sheet is dialog internally with different styles. Here I refactored it
to reuse dialog components and not expose own components.
2023-08-25 17:00:19 +04:00
Bogdan Chadkin c08d1ed568 Refactor navigation menu with local styles (#2177)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2151

We decided to not use preset tokens for default styling and get back to
local styles. Here migrated navigation menu.
2023-08-25 15:39:14 +04:00
Bogdan Chadkin 5068e3f186 Drop non-radix components (#2178)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2151

Input and Textarea components are just native input and textarea with
additional styling. Considering this styling does not bring any value
for user we better remove such components.
2023-08-25 15:26:43 +04:00
Bogdan Chadkin 5af1ba168f Fix font weight detection of uploaded fonts (#2175)
Ref https://discord.com/channels/955905230107738152/1144505313358254120

Here turns out there is not standard in naming font subfamilies. To fix
I expanded the list of weights wiith spaceless variants. Added "regular"
keyword to detect normal font weight.
2023-08-25 13:11:36 +04:00
Bogdan Chadkin 6f9492794d Drop radix button component (#2169)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2151

Button component in radix library is useless because duplicates the
button we already have. The only difference is styles we can add with
templates for other radix components.

Variants and sizes are provided with code. No need in tokens anymore.
2023-08-25 11:39:31 +04:00
Ivan Starkov ab436a6fc4 Fix new href property duplicated on unmount (#2170)
## Description

On onmount outdated onSave were used. What cause creation of additional
href property on instance.

- [x] - Fix duplication on unmount (1st commit)
- [x] - Fix save, to validate if multiple properties with same name
exists. (2nd commit)
- [x] - Use latest prop in resolveUrlProp (3rd commit)

Use hide whitespaces.

<img width="303" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/156fc5a4-c697-4b05-8caf-7a3b7fa29264">


## 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-25 10:36:14 +03:00
Ivan Starkov 52b01efa3b Fix parent style calculation for unstylable parent components (#2167)
## Description

If the parent component has `meta.stylable = false`, we need to skip it
to get the correct style of the parent.


## Steps for reproduction

Create the Box and add the Sheet to it. 
When you go to the sheet/trigger/button, you will notice that it does
not have a 'Flex Child' section or a 'zIndex' property.

To add these, add 'display: flex' to the box you created initially. When
you go back to the sheet/trigger/button, you will see that it now has a
'Flex Child' section and a 'zIndex' property.

## 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-25 00:10:41 +03:00
Oleg IsonenandwasimTQ 9336f05f25 Add help button with popover in dashboard and builder (#2166)
Originally started in
https://github.com/webstudio-is/webstudio-builder/pull/2132

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

## Description

Help dialog in builder and dashboard

## Steps for reproduction

1. open builder
2. open help dialog in the left sidebar
3. open dashboard
4. click help button

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

---------

Co-authored-by: wasimTQ <wasimthoufiq21@gmail.com>
2023-08-24 22:44:38 +02:00
Bogdan Chadkin 75c5cdc179 Prevent editing of radix input and textarea in canvas mode (#2160)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2151

Here added new logic to intercept bubbled to html element events

- handle click on links in preview
- prevent forms submit
- prevent keydown on input and textarea in canvas

This allows to remove some props overrides from webstudio component and
fixes editing of radix input and textarea.
2023-08-25 00:25:16 +04:00
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