4656 Commits
Author SHA1 Message Date
Ivan Starkov 8bad95fc16 build: release 0.143.0 (#3070)
## 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/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.143.0
2024-03-30 12:04:04 +03:00
Jaya Krishna NamburuandOleg Isonen 14904077c7 fix: Remove keywords for transition delay and duration, enable sorting layers (#3062)
Update: this PR is not fixing it fully, there is still an issue when
cleaning up field and pressing arrow down it goes into keywords mode.

@JayaKrishnaNamburu will fix it with the next PR

## Description

- Remove keyword values for `transition-delay` and
`transition-duration`. Keywords are valid if they are directly applied
as individual properties. But when they are used under `transition`
shorthand. The `keyword` values actually make the property invalid. For
more reference
(https://www.w3.org/TR/css-transitions-1/#propdef-transition-duration)
- Add `draggable` for the `CSSValueListItem` to show the drag indicator
for individual layers.
- Set intermediate values only when the layer is changed.

## 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
- [x] made a self-review

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2024-03-29 20:22:59 +01:00
Bogdan Chadkin dc1ccd8e2e experimental: support browser and preset styles in style object model (#3067)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added new "layer" option to specificity
which isolate browser and preset styles into own layeys similar to
cascade layers feature from css.
2024-03-29 20:36:20 +07:00
Bogdan Chadkin 9296cd6c1a experimental: support breakpoints and states in style object model (#3055)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here improved sorting declared values and computing cascade value. Added
support for breakpoints and states. Introduced specificity rules to sort
by State-Breakpoint-StyleSource without complicated logic.
2024-03-28 13:03:56 +07:00
Dima Ivashchuk d5b5fc067a fix: add finalise job to lost pixel (#3066)
## Description

This PR fixes monorepo mode in lost-pixel
2024-03-27 18:06:20 +01:00
Oleg Isonen 870466fc29 fix: Fix transitions for ephemeral changes (#3059)
## Description

1. Stop updating the value when change is using scrub (ephemeral)
2. Stop using isEphemeral for arrow keys handling, it should set the
vale right away

## Steps for reproduction

1. scrub the delay or duration in transition 
2. expect only delay/duration input changing as well as code area, but
not the list in style panel

## Code Review

- [ ] hi @JayaKrishnaNamburu , 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/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
2024-03-27 15:27:01 +01:00
Ivan Starkov 634bd89412 fix: Use preset height auto for images instead of fit-content (#3052)
## Description

Set image height to "auto" to reduce layout shift, improving
compatibility across browsers like Safari.
Unlike "fit-content," "auto" preserves the aspect ratio when the width
exceeds max-width. (in Safari)
See
https://web.dev/articles/optimize-cls#best_practice_for_setting_image_dimensions


## 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/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
2024-03-26 22:39:56 +03:00
Oleg Isonenandistarkov 9fd6660712 fix: don't render HTML Embed server-side in production if clientOnly option is used (#3051)
## Code Review

Following tests are added
```
Published site
    ✓ clientOnly === false (30 ms)
    ✓ clientOnly === true (7 ms)
  Builder renderer= canvas | preview
    ✓ script processing are not applied when clientOnly=true executeScriptOnCanvas=false and renderer=canvas (4 ms)
    ✓ script processing are not applied when clientOnly=true executeScriptOnCanvas=undefined and renderer=canvas (2 ms)
    ✓ script processing are not applied when clientOnly=false executeScriptOnCanvas=false and renderer=canvas (4 ms)
    ✓ script processing are not applied when clientOnly=false executeScriptOnCanvas=undefined and renderer=canvas (5 ms)
    ✓ script processing are not applied when clientOnly=undefined executeScriptOnCanvas=false and renderer=canvas (7 ms)
    ✓ script processing are not applied when clientOnly=undefined executeScriptOnCanvas=undefined and renderer=canvas (2 ms)
    ✓ In preview mode, script processing are applied when clientOnly=true and renderer="preview" and executeScriptOnCanvas=true (3 ms)
    ✓ In preview mode, script processing are applied when clientOnly=true and renderer="preview" and executeScriptOnCanvas=false (2 ms)
    ✓ In preview mode, script processing are applied when clientOnly=true and renderer="preview" and executeScriptOnCanvas=undefined (2 ms)
    ✓ In preview mode, script processing are applied when clientOnly=false and renderer="preview" and executeScriptOnCanvas=true (2 ms)
    ✓ In preview mode, script processing are applied when clientOnly=false and renderer="preview" and executeScriptOnCanvas=false (2 ms)
    ✓ In preview mode, script processing are applied when clientOnly=false and renderer="preview" and executeScriptOnCanvas=undefined (2 ms)
    ✓ In preview mode, script processing are applied when clientOnly=undefined and renderer="preview" and executeScriptOnCanvas=true (2 ms)
    ✓ In preview mode, script processing are applied when clientOnly=undefined and renderer="preview" and executeScriptOnCanvas=false (2 ms)
    ✓ In preview mode, script processing are applied when clientOnly=undefined and renderer="preview" and executeScriptOnCanvas=undefined (2 ms)
    ✓ In preview mode, script processing are applied when clientOnly=true and renderer="canvas" and executeScriptOnCanvas=true (1 ms)
    ✓ In preview mode, script processing are applied when clientOnly=false and renderer="canvas" and executeScriptOnCanvas=true (3 ms)
    ✓ In preview mode, script processing are applied when clientOnly=undefined and renderer="canvas" and executeScriptOnCanvas=true (2 ms)
    ✓ Code change cause scripts to be updated (2 ms)
    ✓ Placeholder is shown if code is "" (1 ms)
    ✓ Placeholder is shown if code is "   "
```

- [ ] 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/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: istarkov <istarkov@gmail.com>
2024-03-26 20:38:09 +03:00
Ivan Starkov dd63547c8d fix: Meta hydration errors on published sites (#3054)
## 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/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
2024-03-26 19:22:59 +03:00
Oleg Isonen ab4e7a284c feat: add value descriptions to all style panel select boxes (#3031)
<img width="259" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/3ce4aab7-2a4a-4559-97e6-212fd9ec7986">
<img width="272" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/e459c851-8cd0-42c4-8b96-05184a268c49">
<img width="407" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/783eee1f-0a6b-41bf-a07f-f9c30a7a8141">
<img width="444" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/e39cc354-7201-46cc-b194-704015aba781">

https://share.descript.com/view/eTnOyd8vulY

## 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/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
2024-03-25 23:06:27 +01:00
Ivan Starkov be64337d93 fix: Partially revert server only imports (#3053)
## 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/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
2024-03-25 23:42:37 +03:00
Ivan Starkov 348b5709b5 fix: Text Content does not propagate changes from Settings Panel if Previous Edit was on Canvas (#3040)
## Description

Closes #3021

The issue was that TextEditor when you switch on setting panel were
active and in no way synchronized with state having it's uncontrollable
nature.

Here we are disabling editing mode on editor blur.


## 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/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
2024-03-25 19:02:50 +03:00
Ivan Starkov 5e943bb967 fix: Disallow home page inside folder (#3044)
## Description

Closes #3039

- [x] <img width="465" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/ae281eca-39d7-4b15-967d-93428493a0b1">
- [x] Home is always first
- [x] Home has name Home on swap



## 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/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
2024-03-25 17:48:38 +03:00
Oleg Isonen d9eb1e2941 fix: keep the execution order of scripts when executing HTML Embed on the client (#3046)
https://share.descript.com/view/q8jpNCbmOxP

## Description

Originally all remote scripts in html embed were executed async, no
matter if they have async attribute or not.
Now they respect the order and only execute async if there is async
attribute.

## Steps for reproduction

This should fail on first load because first script is loaded async and
second script depends on it
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.3/gsap.min.js" async=""></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.3/ScrollTrigger.min.js"></script>
<script>
console.log('gsap', gsap)  
</script>
```

This should not fail
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.3/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.3/ScrollTrigger.min.js"></script>
<script>
console.log('gsap', gsap)  
</script>
```

## 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/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
2024-03-25 13:47:21 +01:00
Bogdan Chadkin beb3438224 experimental: support custom properties (#3047)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added support for css custom properties in style object model.
Added guaranteed-invalid value to schema to represent initial value of
custom properties.
2024-03-25 19:44:32 +07:00
Oleg Isonen 92773cee40 feat: Added required, value, checked default checked to the initial props of checkbox and radio components (#3048)
## Description

Added to checkobox/radio
- required
- value
- checked
- default checked

## Steps for reproduction

1. click button
2. expect xyz

## 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/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
2024-03-25 13:24:41 +01:00
Oleg Isonen cd0174807d chore: use console.info instead of console.log (#3049)
## Description

We allow console.info (btw we should also allow warn/error/info), we
only disallow console.log in the linter because that's what we use for
debugging.

## Steps for reproduction

1. click button
2. expect xyz

## 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/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
2024-03-24 12:52:46 +01:00
Bogdan Chadkin dc68851a5b experimental: improve color: currentcolor behavior (#3045)
Here slightly changed how color: currentcolor is treated. Before on
color property inherited value was used. Though this didn't handle the
case when inherited value is also currentcolor. Here found note in
another spec which says color: currentcolor should be interpreted same
as inherit keyword.
2024-03-23 17:00:34 +07:00
Bogdan Chadkin 16f165a681 experimental: support currentcolor in style object model (#3043)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added currentcolor keyword support. It is case insensitive and
resolved as a new "used value", while "computed value" still contains
currentcolor.
2024-03-22 15:52:07 +07:00
Bogdan Chadkin 0fab9af9a5 experimental: setup style object model (#3042)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added style object model basic functionality with inheritance and a
few keywords like "initial", "inherit" and "unset".

The algorithm is following css spec and will get more features in next
PRs.
2024-03-22 13:23:53 +07:00
Oleg Isonen ef45142a21 fix: initially label shouldn't have a hover effect (#3041)
## Description

In the previous PR I forgot to stop using default variant when label has
no specified variant, because hover effect is only meant for those
button labels.

## Steps for reproduction

1. open share dialog
2. see the items have no hover effect

## 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/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
2024-03-21 21:02:49 +01:00
Oleg Isonen 666bcec19d feat: Make unset property in style panel visibly interactive (#3038)
## Description

Many don't realize that properties in style panel are hoverable,
clickable and even have alt+click for reset function



https://github.com/webstudio-is/webstudio/assets/52824/5080c9ec-5f78-4fef-b498-b4fc577536ad




## 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/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
2024-03-21 15:04:09 +01:00
Ivan Starkov 3c189aff97 fix: HTML Embed Code editor inside Dialog Content looses focus (#3020)
## Description

closes #2998

Also fixes name edits etc.
The same issue with radix as we had in the past, focus lock on any
mutation inside dialog aquires focus.
And we have no good way to prevent programmatic focus inside iframe.



## 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/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
2024-03-20 22:42:44 +03:00
Ivan Starkov ddb7e068ab fix: Style updates on all instances upon change (#3037)
Closes https://github.com/webstudio-is/webstudio/issues/2988

## Description

When a token value is modified, the change will be immediately visible
across all N instances using the same token

## Steps for reproduction

Create token, use it on 2 instances, change token styles, local styles
etc to see it 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/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
2024-03-20 22:05:03 +03:00
Bogdan Chadkin 4392e1fd1a refactor: move generated data into server module (#3035)
Here another case to potentionally optimize client bundle by moving data
used only in loaders, actions, meta and links into .server.tsx module to
guarantee splitting from client bundle.

Also removed circular PageData type dependecy between route and
generated modules.
2024-03-20 17:41:48 +07:00
Bogdan Chadkin 20df0cef32 refactor: move forms properties into server module (#3034)
Here moved forms properties, page meta and remix params into server
module as used only in loader and never executed on client. Especially
forms properties may contain user credentials and remix does not
guarantee it to not appear in client side bundle.

Also moved those into sdk as universal generators.
2024-03-20 16:42:51 +07:00
Ivan Starkov 6c2dd4fd5c refactor: Attempt to improve INP performance of Vimeo player (#3027)
## Description

Fixed few small bugs, start show loading indicator before any other
tasks

## 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/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
2024-03-19 16:15:26 +03:00
Bogdan Chadkin dad898e6a4 refactor: move expressions into base sdk (#3032)
We need to move stuff not related to react out of react-sdk into
universal sdk package.
2024-03-19 02:02:07 +07:00
Bogdan Chadkin a5db173288 experimental: support search params in expressions (#3030)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here added support for search params in builder and compiler.

system.search contains an object computed from url.

In generated website loaders compute search params which allows to
access them in resources.

In builder links with search params populate system.search.

<img width="180" alt="Screenshot 2024-03-18 at 21 09 05"
src="https://github.com/webstudio-is/webstudio/assets/5635476/4efa7a38-511c-4360-a085-84da2527db74">
<br>
<img width="471" alt="Screenshot 2024-03-18 at 21 09 25"
src="https://github.com/webstudio-is/webstudio/assets/5635476/af793a60-698a-485b-8606-dfacdaf633b7">
<br>
<img width="429" alt="Screenshot 2024-03-18 at 21 09 36"
src="https://github.com/webstudio-is/webstudio/assets/5635476/a3c8c52e-f0a1-43ff-a464-f57b61b1f159">
2024-03-18 22:04:49 +07:00
Bogdan Chadkin 99d0e53035 refactor: drop jsep parser (#3029)
We fully switched to acorn for parsing expressions and no longer need
for jsep and its plugins. User will stop getting esm false positives
when build with remix.
2024-03-18 20:47:20 +07:00
Oleg Isonen a45958f90e feat: Allow excluding a page from marketplace (#3019)
When user has a template, but some pages are not meant for being
inserted using a click from the marketplace sidebar, we need a way to
exclude them. Now user can do it from page settings using the same
checkbox that also prevents crowling

<img width="444" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/86521e24-bbe3-4cb7-bfe2-b04bdf5d2418">

## Steps for reproduction

1. check the "exclude this page from search results" in page settings
2. see the page doesn't show up in the marketplace pages list

## 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/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
2024-03-18 10:25:27 +01:00
Oleg Isonen 12129b4065 feat: add more descriptions (#3024)
1. added description to show property (People are often confused why
breakpoints have no impact on this)
2. added descriptions to right sidebar tabs
3. added descriptions to marketplace tabs
4. show marketplace category descriptions in select box
5. added ability to select component to render the hint/description

<img width="686" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/db0483e9-9b84-42bf-a3fd-00c65863c02d">
<img width="280" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/eedb86a2-459b-4c0e-85e6-3dd5a55a405b">
<img width="281" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/b966b922-554a-4ac0-8566-f99741b76d97">


## 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/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
2024-03-18 10:24:39 +01:00
Bogdan Chadkin df579f7c72 refactor: switch to acorn expressions everywhere (#3028)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here switched the rest of usages to acorn based expressions. Added
getExpressionIdentifiers utility to extract used variables names to
avoid using transpiler replaceVariable callback for this.
2024-03-18 14:41:57 +07:00
Bogdan Chadkin 61f751adab refactor: switch to acorn for expression linting (#3026)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here added new lintExpression utility to provide diagnostics when
parsing error happens or not supported language feature is used.

Additionally it no longer forbids template literals and ternary
operators. Btw still need to get rid from legacy implementation to make
them work.

<img width="465" alt="Screenshot 2024-03-17 at 20 41 49"
src="https://github.com/webstudio-is/webstudio/assets/5635476/e208c360-7f2a-471a-aa54-983ff0a14247">
2024-03-18 11:01:40 +07:00
Bogdan Chadkin 3c99452716 refactor: transpile expression without code generation (#3022)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Our code generation with jsep has a big problem of not preserving
parenthesis entered by user. And jsep is not able to provide the
information.

As a solution I suggest to switch parser to acorn. It is 10 times bigger
than jsep but provides more strict parsing with location info for every
node. Here I use it to transpile simply with string manipulation which
does not touch spaces or parenthesis entered by user.
2024-03-17 13:17:52 +07:00
Bogdan Chadkin a51bb2757d experimental: switch matched dynamic paths (#3011)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here added support for navigating to dynamic paths in preview mode by
using URLPattern matcher. Matched params are filled into address bar to
simplify accessing dynamic pages without manually entering params.
2024-03-16 13:02:14 +07:00
Ivan Starkov cf51f81330 fix: Improve marketplace performance (#3017)
## Description

- Single super fast query instead of 3 

This is only sql perf fix, probably other perf issues exist

## 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/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
2024-03-15 19:24:02 +03:00
Ivan Starkov 9c672cecc9 feat: TRPC caching support (#3016)
## Description

trpc procedures can be cached if wrapped with

```js
const cacheMiddleware = createCacheMiddleware(60 * 3); // 60 * 3 = 3 minutes cache
const cachedProcedure = procedure.use(cacheMiddleware);
```

Implementation supports trpc batching.
1. If any of calls inside trpc batch is not cacheable - nothing will be
cached.
2. If all trpc batch calls can be cached then the least max age among
all calls is selected for caching


- [ ] - Test caching on PR

## Steps for reproduction

Open marketplace, see trpc request has cache headers, see trpc request
has cache HIT from vercel or cloudflare

## 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/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
2024-03-14 20:18:44 +03:00
Ivan Starkov 82a318bb83 fix: Fix migration template (#3015)
## Description

For some reason DATABASE_URL was used

## 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/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
2024-03-14 18:30:24 +03:00
Ivan Starkov 8957792973 refactor: Generalize trpc client (#3010)
## Description

- [x] - Test that clone by authToken is working

Next PR:

Add caching headers support

## 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/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
2024-03-14 14:25:43 +03:00
Ivan Starkov b7911ce7f0 build: Release 0.142.0 (#3014)
## 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/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.142.0
2024-03-14 00:43:48 +03:00
Ivan Starkov 5194256c3a fix: Use direct url (#3013)
## 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/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
2024-03-14 00:36:14 +03:00
Oleg Isonen 5a7787b96c build: 0.141.0 (#3012)
## 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/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.141.0
2024-03-13 19:21:26 +01:00
Oleg Isonen d09eb7fa06 chore: Marketplace bugs (#3007)
Fixes all these bugs
https://github.com/webstudio-is/webstudio/issues/3004

## 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/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
2024-03-13 19:03:42 +01:00
Bogdan Chadkin e17f1e082a experimental: support system variable in compiler (#3009)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here switched to system variable in resources, page meta and component
generator. Removed legacy path params variable from schema.
2024-03-14 00:09:44 +07:00
Ivan Starkov b85cfa7950 fix: Switch on single router (#3006)
## Description

Preparation on using std trpc protocol for everything

## 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/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
2024-03-13 16:54:31 +03:00
Bogdan Chadkin c9db576826 experimental: switch to system variable for params in builder (#3005)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here replaced Path Params variable with system variable in builder. Now
system always prefilled with `{ params: {}, search: {} }` to let user
always see the structure and not get confused with undefined.
2024-03-13 17:16:17 +07:00
Bogdan Chadkin 39ee44b94e experimental: add system variable (#2997)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here added system variable to every page body instance. It will be used
to replace path params and support search params.

For now will be hidden until cms launch.

Added migration to modify every page in all projects. Added logic to
create and duplicate system data source along with pages.
2024-03-13 12:26:07 +07:00
Oleg Isonen a5ea558c21 build: 0.140.0 (#3002)
## 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/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.140.0
2024-03-12 18:31:00 +01:00
Jaya Krishna Namburu 66204427e9 feat: Add filter section in style panel (#2955) 2024-03-12 21:53:34 +05:30