Commit Graph
5224 Commits
Author SHA1 Message Date
Bogdan Chadkin cf92442ce3 refactor: generate metas.json (#3096)
Here reduced server bundle size by moving metas and props metas into
static json which can be accessed from the client and hosted as asset.
2024-04-05 16:55:37 +07:00
Bogdan Chadkin e75c174f75 build: release 0.144.0 (#3090) 0.144.0 2024-04-04 22:34:52 +07:00
Ivan Starkov 3205c81c51 fix: Broken rich text panel (#3095)
Broke rich text, what to do is written in reopened issue.
https://github.com/webstudio-is/webstudio/issues/3021
2024-04-04 22:10:47 +07:00
Ivan Starkov 49038fe2de build: Add social image to fixture (#3094)
## 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-04-04 18:05:26 +03:00
Oleg Isonen b2ef61ea0a feat: add Resource type descriptions to the select box (#3091)
This should clarify that Resource is a safe for using private keys
inside them.

<img width="567" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/9c530ff5-3ca2-4aff-857b-225ac7cf95dd">



## Steps for reproduction

1. create a variable
2. hover over type options

## 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-04-04 16:36:21 +02:00
Ivan Starkov 49ac5dc032 build: Udate envs (#3093)
## 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-04-04 17:30:57 +03:00
Bogdan Chadkin 2c1f7d23bb refactor: use vite in cli templates (#3088)
Here switched to vite in all templates.
Followed migration instructions and templates.
Still no way to test before new versions are published to pnpm.
2024-04-04 20:37:07 +07:00
Bogdan Chadkin 39f5f5b20d experimental: hide new form component behind flag (#3089)
Here added new "filters" flag which hides new form component form
components panel and renamed server form back to just form until we
agree on name.
2024-04-04 20:32:31 +07:00
Bogdan Chadkin e6695a84ac build: upgrade esbuild (#3086)
Need to bump storybook to use vite in remix.
2024-04-04 16:06:05 +07:00
Bogdan Chadkin 201ffd5fb8 refactor: generalize css api and add test (#3081)
Here just small refactoring. generateCss will accept only maps instead
of arrays of tuples. Also added one test to not break on changes.
2024-04-03 19:26:06 +07:00
Oleg Isonen 77f14266bd fix: Allow multiple folders to have an empty slug (#3074)
Fixes.
https://discord.com/channels/955905230107738152/1223709963025907854

Empty slug is not a slug, it's an absence of one, so there can be any
amount of folders with empty slug


## Steps for reproduction

1. add 2 folders with empty slug
2. expect no error

## 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-04-03 13:59:37 +02:00
Ivan Starkov 97f055d94e feat: Vanilla Remix Form component (#3079)
## Description

Prevoius form renamed to Server Form


<img width="251" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/0c849bee-1018-468a-a26b-b92bf9472d25">

## 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-04-03 12:34:05 +03:00
Bogdan Chadkin 4f2d805e64 fix: forbid empty expressions (#3078)
Empty expressions lead to publish errors.
Need to lint them away. Also improved parsing error to more easily see
the source of it.
2024-04-03 15:50:00 +07:00
Bogdan Chadkinandistarkov f5873f7738 refactor: upgrade to remix v2 (#3076)
Bumped remix to v2 everywhere in CLI, fixtures and builder. Caught a lot
of type stuff. Runtime seem to work without changes. Removed
@vercel/remix and had to upgrade `remix-auth` packages.

Unable to test netlify and vercel from monorepo and need to have sdk
remix with updated remix. So will test after packages release.

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

---------

Co-authored-by: istarkov <istarkov@gmail.com>
2024-04-02 17:26:45 +07:00
Bogdan Chadkin 33d3dbc546 refactor: prepare remix types (#3075)
Here replaced LoaderArgs and ActionArgs with LoaderFunctionArgs and
ActionFunctionArgs to simplify bump with remix v2 which changed named of
these types.
2024-03-31 22:45:30 +07:00
Bogdan Chadkin 86e747e09d fix: update package.json dependencies with cli (#3073)
Here improved CLI build command to upgrade dependencies in user
package.json whenever we change them in template.

For our own dependencies added "internal" template with `workspace:*`
2024-03-30 23:29:50 +07:00
Bogdan Chadkin adfbe51a8f fix: resolve social image asset at build time (#3072)
This fixes the issue with looking for social image asset in server only
image assets array. Data is generated client side but only for social
image similar to favicon asset.
2024-03-30 23:19:34 +07:00
Bogdan Chadkin e34aa862bb refactor: move remix root into template (#3071)
React sdk not necessary to depend on remix. It will even complicate
remix upgrade.
2024-03-30 19:13:51 +07:00
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