434 Commits
Author SHA1 Message Date
Ivan Starkov 380e6e9da7 Release 0.74.0 (#1771)
## 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-06-13 07:46:11 +03:00
Oleg Isonen 4874e4093d Tooltips improvements (#1770)
## Description

- Fixes a bunch of wrong logic for showing style source origin info in
the tooltip
- Renders GPT descriptions

## Steps for reproduction

1. check tooltips in style panel


## 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-06-13 07:44:26 +03:00
Ivan Starkov 9cc34df042 Fix css preview (#1769)
## 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-06-13 07:39:31 +03:00
Ivan Starkov 43464bbe59 Fix tooltip (#1768)
## Description

Fix tooltip to show right color etc values

<img width="357" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/482b67a0-fc25-4856-b433-78139d0ae8ac">


Before was `black`

## 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-06-13 03:31:17 +04:00
Ivan Starkov afcc738961 Release 0.73.0 (#1762)
## Description

update npm

## 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-06-13 00:45:37 +04:00
Oleg Isonen b5d6d2feb3 Reduce gap in position, move it further down out of the way (#1766)
## 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-06-13 00:38:45 +04:00
Bogdan Chadkin f78cf8fe68 Add breakpoints descriptions (#1757)
Added tooltips to breakpoints similar to webflow.

<img width="352" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/74e94cd2-46a4-4af6-80cc-603c7a1c68bb">
2023-06-12 23:12:00 +03:00
Oleg Isonen 66aec54e09 New tooltips component (#1746)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1729,
https://github.com/webstudio-is/webstudio-builder/issues/719
https://github.com/webstudio-is/webstudio-builder/issues/1730

## 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-06-12 21:56:22 +02:00
Oleg Isonen a8572e7917 Experimental universal input (#1732)
## Description

New Text control for props is using a new UniversalInput component which
allows us to dynamically decide if we need a single-line input or a
multi-line textarea.

Problem it is solving is that we don't know from data type string if
user needs a textarea or an input, so we render a universal input.

We can still set rows to a number in the meta, so that a certain field
is always multiline initially, by default:
- empty field will be single-line input
- multi-line text will automatically turn into multi-line input

Single-line mode:
- enter saves
- shift + enter - adds newline and saves

Multiline-mode:
- enter saves and ads newline
- cmd+enter - saves, no newline


## Steps for reproduction

1. add any component
2. open properties panel and playwith any text input

## 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-06-12 20:00:44 +02:00
Ivan Starkov 3178ddcc60 Add effects section with opacity and cursor (#1760)
## Description

ref #879

Known issues not fixed here.

Scrub on opacity doesn't work as expected
as depending on opacity dimension it has different min-max and step.

Also any numeric value of opacity is valid css value, and just clamped
if it exceeds, so we can't consider values out of 0-1 range as percents
too.

So couldn't be fixed fast.





## 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-06-12 19:34:47 +04:00
Ivan Starkov 3c34035a7a Remove domains flag (#1761)
## 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-06-12 18:30:26 +03:00
Bogdan Chadkin 1d812c33ca Fix preview (#1755)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1720

- restore panels state after enabling and disabling preview state
- fixed canvas jumping while switching between preview and canvas

## 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-06-12 16:10:51 +02:00
Oleg Isonen b19142881b Css preview (#1740)
## Description

This PR introduces a CSS preview

<img width="934" alt="Screenshot 2023-06-10 at 03 48 55"
src="https://github.com/webstudio-is/webstudio-builder/assets/52824/c0d30136-f084-4cd5-a3e1-b98a2e29675b">



## Steps for reproduction

1. select any instance, add some styles
2. see in navigator css preivew

## 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-06-12 15:52:52 +02:00
Bogdan Chadkin 1263a9ab08 Provide params with context (#1743)
Ref https://github.com/webstudio-is/webstudio-builder/issues/213

Before we set params globally which works yet only because they do not
change often. Here explicitly passed all params with context or by
passing them where necessary.
2023-06-12 16:51:27 +03:00
Ivan StarkovandOleg Isonen c534eb6965 Entri (#1738)
## Description

Implements entri service support

## Steps for reproduction

Wait for SaaS release. Or locally add following env variables to the
`.env` file
```
ENTRI_APPLICATION_ID=webstudio
ENTRI_SECRET=$(bwget WS_ENTRI_SECRET)
```

<img width="361" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/eafcc7ec-1bc7-448f-be78-50ae89909d34">


<img width="724" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/6d97a08b-1763-4ca4-970f-96836b4d5cd2">



## Code Review

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

## Before requesting a review

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

## Before merging

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

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-06-12 16:10:27 +04:00
Bogdan Chadkin 3d345da0e7 Fix popups (#1752)
Ref
https://discord.com/channels/955905230107738152/955907841070346300/1117567308475400262
https://github.com/webstudio-is/webstudio-builder/issues/1750

- render combobox content conditionally
- supress downshift error about missing ref on menu
- fixed pointer events on iframe when popover is open
2023-06-12 14:58:51 +03:00
Bogdan Chadkin 96cbe966eb Bump lexical (#1749)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1698
https://github.com/facebook/lexical/releases

The latest lexical version seems fixed the issue with scrolling
instances into view.
2023-06-12 09:39:11 +03:00
Bogdan Chadkin e405863d1b Avoid default import from react (#1744)
Default import cannot be optimized by mangling variables so better
restrict with linter.
2023-06-11 19:18:12 +03:00
Bogdan Chadkin 21f8d1aab2 Merge text and block components (#1742)
Ref https://github.com/webstudio-is/webstudio-builder/pull/1703
https://github.com/webstudio-is/webstudio-builder/issues/1677

- renamed TextBlock to Text in db and meta
- replaced LinkBlock with Link in db and meta
- renamed Styled Text label to Text
2023-06-11 14:58:34 +03:00
Oleg Isonen eac52daab5 Reset any style panel property with option+click (#1741)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1730

## Description

- [ ] any flex items
- [ ] spacing  

## Steps for reproduction

1. set flex value on every flex and spacing property
2. option+click to reset

## 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-06-11 12:25:22 +02:00
Bogdan Chadkin 891a96e0c9 Fix editing text inside button (#1739)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1719

Buttons has issue with unavoidable space which prevents entering spaces.
Here bind lexical to temporary span inside of button. Now space works
fine.
2023-06-11 12:11:33 +03:00
Bogdan Chadkin dcae1b5a9d Allow inserting into editable containers (#1735)
Here I removed "rich-text" type from components. Instead "container" can
be edited when has only text or rich text children.

And any time user can drop into editablle container which will wrap all
text and rich text children into "Span" component.

Had to implement position adjustment to consider text children which do
not have representation in navigator tree and canvas dnd.

Span has temporary SpanContainer name to not conflict with existinig
Span for styled text in rich text. Will rename in other PR when remove
no longer necessary components.
2023-06-10 00:55:46 +03:00
Oleg Isonen 7bef21719f Fix object fit, ignore loader (#1737)
## Description

- I used object position instead of object fit by mistake
- Unrelated: ignore loader prop

## Steps for reproduction

1. add vimeo
2. select preview image
3. see it has object fit cover

## 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-06-09 16:59:52 +02:00
Ivan Starkov e1b0c7808e Update typescript (#1734)
## Description

Removes errors with vscode and tsconfig

## 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-06-09 11:03:23 +03:00
Ivan Starkov 9a446787d1 Release 0.72.0 (#1733)
## 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-06-09 00:59:53 +04:00
Ivan Starkov 5e439b77e5 Publish tracking (#1726)
## Description

Add `latestBuild` for each entry in publish dialog
Now we are tracking publish stat for each domain. 
This information is needed to show checkboxes in publish design (next
PRs).

2 new Views were created.

To get the latest build by project + domain
To get the latest build for wstd.xx domain

Publish status is shown per domain (as not every domain would be
published each time)

<img width="362" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/b4e0357a-63f5-47ba-a119-59ef1adf81d2">

During publish all buttons are disabled as per design

<img width="348" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/94720bd3-4bda-488c-81f7-71ea9ba2d530">

Also added tooltip on publish button (not in design)

<img width="366" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/c764a785-aea9-487b-a480-642410293ee3">



## 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-06-09 00:55:24 +04:00
Oleg Isonen b71dc75184 Vimeo (#1702)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1688

## Description

Vimeo Component

## Steps for reproduction

1. Add vimeo
2. play with props

## 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-06-08 02:07:58 +02:00
Ivan Starkov d318bdaa1e Update domain status on load (#1725)
## Description

- When opening the publish dialog, we automatically check failed
domains. We stop checking automatically after 24 hours. When the user
hits Check Status - we reset the 24h counter


![Screen Recording 2023-06-05 at 19 26
19](https://github.com/webstudio-is/webstudio-builder/assets/5077042/a8fee835-59a2-4edf-8685-ae6218b1af2c)


This should gone in the future
https://github.com/webstudio-is/webstudio-builder/issues/1723

## 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-06-05 19:42:29 +03:00
Oleg Isonen 5d65f28476 Token Deletion Code Review (#1722)
## Description

Remaining code review change requests from
https://github.com/webstudio-is/webstudio-builder/pull/1695


## 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-06-05 01:47:01 +02:00
Bogdan Chadkin a5c46d9b9c Add toast when cannot add component (#1713)
Here added toast with explanation why user cannot add some components.
Uses Intl.ListFormat to make it human readable.

<img width="385" alt="Screenshot 2023-06-03 at 17 35 35"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/613fae93-9231-4c47-9d7e-94e7f99fac7b">
<img width="347" alt="Screenshot 2023-06-03 at 17 37 07"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/0d2dafec-dcaa-43af-bf1d-c63b3dc387d0">
<img width="335" alt="Screenshot 2023-06-03 at 17 38 14"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/f15b4eee-3b93-491e-a0fc-bc7f369ca558">
2023-06-03 19:34:18 +03:00
Bogdan Chadkin 52f5bd0349 Select body when switch pages (#1712)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1704

Here select body when switch or create pages or create projects.
2023-06-03 18:23:00 +03:00
Ivan Starkov 52472a8adb Release 0.71.0 (#1710)
## Description

Npm update 

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-06-03 15:50:31 +04:00
Bogdan Chadkin b7081f3741 Add sdk-components-react package (#1693)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1129

Splitted base components into separate package. Exposed 3 entry points

- @webstudio-is/sdk-components-react
- @webstudio-is/sdk-components-react/metas
- @webstudio-is/sdk-components-react/props
2023-06-03 09:58:04 +03:00
Bogdan Chadkin 74972574a6 Release 0.70.0 (#1707) 2023-06-02 18:12:27 +03:00
Bogdan Chadkin 4d34300efc Store last version in ref (#1706)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1704

Module scope is preserved across projects and does not invalidate last
version. Moved to ref to fix.
2023-06-02 17:22:18 +03:00
Ivan Starkov 9aa863bcca Release 0.69.0 (#1700)
## Description

Npm:
"version": "0.69.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-06-01 20:46:58 +03:00
Oleg Isonen d52b491648 Make css value suffix optional and preventable (#1699)
Closes https://github.com/webstudio-is/webstudio-builder/issues/1247
## Description

We want color controls to not have the suffix button

## Steps for reproduction

1. open style panel
2. see color controls have no suffix button

## 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-06-01 18:50:01 +02:00
Oleg Isonen 4c49ea5f16 Token deletion confirmation (#1695)
Closes https://github.com/webstudio-is/webstudio-builder/issues/1672

## Description

We need to show a confirmation dialog when user hits delete to explain
what will happen

## Steps for reproduction

1. add a token
2. click delete

<img width="906" alt="Screenshot 2023-05-31 at 15 25 43"
src="https://github.com/webstudio-is/webstudio-builder/assets/52824/eb7eb635-3c07-4bdc-bfdc-6e5cd7983d73">


## 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-06-01 16:50:14 +02:00
Ivan Starkov 00c02201a0 Add domains to publish (#1694)
## Description

At publish we would allow to check domains we want to publish. As of now
we publish all project domains.

But already pass them from UI, so future move would be just UI changes,
without touching API

- [x] - Fix "no access to project domains using service api call"

## 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-06-01 17:59:10 +04:00
Bogdan Chadkin 0d35e39822 Add sdk-components-react-remix package (#1691)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1129

Here added sdk-components-react-remix with all remix components moved
away from react-sdk.

Exposed 3 entry points

- @webstudio-is/sdk-components-react-remix
- @webstudio-is/sdk-components-react-remix/metas
- @webstudio-is/sdk-components-react-remix/props
2023-05-31 11:45:38 +07:00
Oleg Isonen 226603e1e0 Sort components by order property in WsComponentMeta (#1681)
## Description

We want to be able to specify the order in which components are shown in
the panel.

Right now the order property is not set where needed, because I am
waiting for feedback from @taylornowotny

## Steps for reproduction

1. Open add components panel
2. See components are in the right order

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
- [ ] hi @taylornowotny  , I need you to do
- give some thought to both components that need to be first which we
set specific order to (the rest will go as is)
- recheck the categories, I feel like our split into categories is not
intentional

## 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-05-30 23:34:19 +02:00
Ivan Starkov dafa7e8b35 Publish by buildId (#1689)
## Description

The idea is to deploy by `buildId` instead of `projectId`.
Every build now can have `deployment` metadata params (currently
`domains` only, but in the future can be any additional metadata, like
vars etc)

Publish is simplified (-2 workers), the same trpc as for other saas api
is used to publish, see `cms.publish`
(also local development is simplified as edge-api at saas works on local
dev perfectly)

isDev and isProd are not needed anymore. Any published build has
`deployment` metadata, and various builds can be active now on different
domains.

Build clone now seriously faster as no parse/serialize steps involved at
all.

Partial index `CREATE UNIQUE INDEX "Build_dev_index" ON "Build"
("projectId") WHERE "deployment" IS NULL;` created so we could be sure
that no more than 1 dev build exists.

createBuild and cloneBuild are now splitted, and seriously simplified

## 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-05-30 23:44:05 +04:00
Bogdan ChadkinandOleg Isonen c08e57cdbd Hide props and styles tabs for html embed (#1686)
Html embed has display: contents and should not be styled or have props.

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-05-31 02:40:15 +07:00
Bogdan Chadkin 7c6d06bfd8 Use meta stored in atom in builder and canvas (#1687)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1545

All complex use cases already switched to get meta from arguments and
from atom.

Here migrated the last cases and dropped legacy meta register in
react-sdk package. Now we ready to split components into separate
packages.
2023-05-30 17:45:12 +07:00
Bogdan Chadkin 66d82afca7 Drop unused asset table fields (#1635)
Cleanup after refactoring. Now we can get rid of Asset.location because
asset location is defined by environment. And remove fields moved to
File table.
2023-05-30 17:25:50 +07:00
Bogdan Chadkin 40ffb639ad Enforce node protocol (#1685)
Enable unicorn eslint rule to enforce `node:fs` like specifiers for node
modules.

Previously `node:` prefix helped to find server code bundled in browser.
2023-05-30 13:42:38 +07:00
Bogdan Chadkin 7c66afef74 Add requiredAncestors and invalidAncestors to meta (#1684)
Here added two component restrictions to meta.

requiredAncestors prevent inserting components outside of required ones
here restricted ListItem to always be inside of List.

invalidAncestors prevent inserting components inside of invalid ones
here prevented nested buttons
2023-05-30 12:33:44 +07:00
Giuseppe 6d1e901950 Add insertTemplate helper (#1683)
Introduce a generic `insertTemplate` helper and use it in
`insertNewComponentInstance`. This allows to insert an existing template.
2023-05-29 14:18:23 +02:00
Bogdan Chadkin fe00228f7e Prevent user from editing outdated builds (#1682)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1664

Here added Build.version which is updated on every patch. The client
should provide latest received version to compare with stored in db.
When version mismatched user is suggested to reload.
2023-05-29 18:52:48 +07:00
Bogdan Chadkin 5f15ef7e48 Update inspector panels design (#1680)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1644

- added instance info to all panels
- fixed style sources design
2023-05-29 17:52:19 +07:00