4794 Commits
Author SHA1 Message Date
Ivan Starkov 50be0047a1 feat: Add system.origin (#3254)
## Description

review per commit.

- Add system.url.origin to the props, rename publishedUrl ->
publishedOrigin
- Add system.url.origin to the published sites

Example on published site
https://saas-sitemapxml-x1g2n.wstd.work/

Example on builder
<img width="342" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/bea3c9b4-c7dc-4936-a56a-fa33327ab6d0">

We use because as of now system is not available on canvas
<img width="448" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/2eaa02b0-7566-492b-b98e-7af8a4f636e0">


## 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.148.0
2024-04-30 08:59:28 +03:00
Ivan Starkov 52553be0af fix: Clone timeouts (#3257)
## Description

- reduces amount of queries inside transaction from 26 to 7
- removed read of assets and build from db to api


## Steps for reproduction

1. click button
3. 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-30 08:08:06 +03:00
Bogdan Chadkin a9584b8435 refactor: drop tsconfig paths (#3256)
We use tsconfig paths option only to resolve single constants module. It
requires additional plugin in vite and all other tools. At least in
generated published sites it can be just dropped.

Moved __templates__/route-template.tsx to app/routes/template.tsx
2024-04-29 23:51:38 +04:00
Oleg Isonen 8a7e956732 chore: used wrong component, showed dialog inside dialog (#3255)
Fixes this

<img width="710" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/69d6098c-f7a3-4286-abf8-bc074ad03681">


## 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-29 16:51:12 +02:00
Jaya Krishna Namburu e0941ac349 fix: Move css filter properties to be used as tuples instead of layers in the data-layer (#3247)
fixes #3243 

## Description
 
We should use tuples for handling filters. Don't know when i switched to
layers, but the initial implementation of the filters started as tuples
itself.

- [ ] We might probably need a migration for the existing projects to
change it to tuple if needed. Let me know, I can help with that as well.

## Steps for reproduction
1. Add a css filter in the sections panel.
2. Add another css filter and edit it using the code view.
3.  Swap filters using the drag and drop action.
4. Deploy the project and the multiple filters applied in the same
element should work as expected.

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

- [x] tested locally and on preview environment (preview dev login:
5de6)
- [x] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
2024-04-29 14:35:55 +02:00
Oleg Isonen 6c0a09f782 fix: fix style panel list item covering the border of the panel (#3242)
For some reason the box shadow border of the right panel can not render
on top specifically that button when it has a background color defined,
inherit solves the issue nicely but WTF.

<img width="98" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/1888ba1f-7b37-4e25-a432-d2e7a7fe39dc">

## 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-29 14:00:44 +02:00
Oleg Isonen 2d91ef4203 chore: don't fix boolean attributes to empty string values in html embed (#3251)
## Description

When validating html embed, dom innerHTML always turns boolean
attributes into empty string, e.g. <div hidden></div> will always become
<div hidden=""></div> and this is not necessary, we can ignore those
mismatches.


## 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-29 13:51:47 +02:00
Ivan Starkov cc72849a62 feat: Canvas drawing of xml element (#3245)
## Description

This is only for Canvas rendering.

<img width="829" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/b63efe11-effd-4ed7-b9ff-a19d4a19a125">

<img width="244" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/3f59819b-486a-4d75-8890-c5c14950393c">

Editable
<img width="269" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/e25af3b0-0903-4390-aec8-1fc7383ec24b">

For generating it will change a little.

## Steps for reproduction

[Play Ref
https://xml-element.development.webstudio.is/builder/cab934af-8615-411a-99c1-5822a98eac74](https://xml-element.development.webstudio.is/builder/cab934af-8615-411a-99c1-5822a98eac74)

## 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-29 14:08:27 +03:00
Oleg Isonen 84395189bb chore: Display styles label for advanced properties behind a menu on the icon button (#3250)
Previously I tried a clever trick using dots in the ellipsis as an
indicator for the style source, but its too small, now we can set it on
the button itself since it's open state is not any more primary blue

## Steps for reproduction

1. Typography > advanced > set properties > see icon button reflects the
color and alt+click works for reset
2. same for object position ellipsis button

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/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-29 11:53:45 +02:00
Jaya Krishna Namburu 5152cc6a01 fix: Allow users to redirect to home page in redirects (#3252)
## Description

fixes #3224 
Allow users to set `/` in new-path. So, from any old-path users can
redirect to the home page.

## Steps for reproduction
1. Go to Project Settings -> redirects.
2. Enter a `old-path` and set the `/` in the new path.
3. Deploy the project
4. And when we use the `old-path` in the URL, the project should take
the route to the home page.

## Code Review

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

## Before requesting a review

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

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
2024-04-29 11:17:20 +02:00
Oleg Isonen bdc14a06b2 experimental: xml icon (#3249)
<img width="93" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/131f9441-7a94-4c07-b6d0-298f742675c7">


## 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-29 11:37:47 +03:00
Oleg Isonen c478e65029 fix: Prevent editing Code Text component as text (#3246)
Code Text component is designed to render code and in the future also to
add syntax highlighting. With this PR it won't be possible to treat it
like a Box any more and code will be entered using code property.

Benefit is: better UX for editing code and no unintended side effects
later with highlighting.

## 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-04-27 21:33:57 +02:00
Bogdan Chadkin 147a495393 refactor: reimplement atomic styles with nesting rules (#3248)
Here used new nesting rules to generate atomic styles. Replaced separate
atomic style sheet class with just a method to generate styles
atomically. Inheritance doesn't work well with private fields caz
require a lot of internals to be public.
2024-04-27 23:00:09 +04:00
Bogdan Chadkin d27a874eca build: fix prisma migrations (#3237)
Fixed the command in migrations cli
2024-04-26 19:36:39 +04:00
Ivan Starkov d411890d77 fix: Remove @see @link and @deprecated from html properties descriptions (#3244)
## Description

Format of descriptions has changed
```
Defines a human readable text alternative of aria-colindex.\n@see aria-rowindextext {@link .....}
```

Remove for now. 

## 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-26 13:27:15 +03:00
Ivan Starkov cf99753b1d build: Update action versions (#3241)
## Description

preview-worker-deployment
Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: actions/checkout@v3, pnpm/action-setup@v2.2.4,
actions/setup-node@v3. For more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.


## 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-25 11:00:11 +03:00
Ivan Starkov 1b3032d4fe feat: Switch to single queue (#3239)
## 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.147.0
2024-04-24 23:59:17 +03:00
Oleg Isonen dd1657c86e chore: Only allow dragging dialog using title (#3238)
## Description

Previously it was possible to drag dialog also using content, now only
using title

## 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-24 17:17:22 +02:00
Bogdan Chadkin b8b3e5c7d2 fix: save resources on reload (#3235)
Here fixed the issue with resources not refreshed while editing and
clicking on refresh button. Also fixed cached value not restored after
closing resource panel.
2024-04-24 20:47:28 +07:00
Bogdan Chadkin 7de5786909 fix: support -d argument in curl parser (#3236)
This fixes the issue with pasting curl command with -d argument for body
which I forgot to support.
2024-04-24 20:15:47 +07:00
Oleg Isonen 90db933b6b feat: Resizable and draggable inspector dialog (#3232)
Make an option for resizable and draggable dialog. Inspector and
marketplace will benefit from it




https://github.com/webstudio-is/webstudio/assets/52824/53c1c9fa-bb81-4fcd-b7a3-80b508537fdd





## 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-24 14:18:23 +02:00
Bogdan Chadkin c09f7ea4d7 refactor: drop background-clip workarounds (#3234)
Seems like unprefixed background-clip: text is supported in all browsers
including chrome (since december 2023) and no longer need to have
workarounds with var().

Though still left prefix in css engine to have better support for
published sites.
2024-04-24 18:40:13 +07:00
Ivan Starkov d8994140ba feat: Sitemap resource (#3228)
## Description

## First Part 

Here is only new local resource `/$resources/sitemap.xml` support

It can't be implemented as route for now as we have 2 issues:
1. Cloudflare does not allow server fetches from same domain
2. Remix does not have fetch like sveltekit allowing to bypass real http
roundtrip when fetching local resources

The idea is to write/use it like any route in case of anything of above
will be solved.

Most PR Size is generated new fixture page.
Move SiteData into the resource.

Here is example of rendering this resource using html.

Project to play:

https://sitemap.staging.webstudio.is/builder/cab934af-8615-411a-99c1-5822a98eac74

Published site:
https://sitemap-saas-t6j12.wstd.work/

<img width="785" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/b62af518-37bb-4daa-9f57-9145b4c77364">

## Next steps:

- Add `origin` to the system, or even better add `system.hostUrl` with
origin, hostname etc
- Add xml element and hardcoded sitemap.xml page

## Steps for reproduction

1. click button
4. 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-24 13:05:53 +03:00
Bogdan Chadkin 20a2a1ec55 refactor: add mixin rule to css engine (#3233)
Here added new mixin rule to represent reusable
parts like our tokens and maintain their cache.
In the future can be rendered as native css.
2024-04-24 02:05:29 +07:00
Oleg Isonen 98a6fee5ab feat: Allow seeing inspector in parallel with variable editor (#3231)
When setting up a Resource variable, you want to see what data comes
back instantly, seeing inspector comes in quite handy


## 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-23 21:02:15 +02:00
Bogdan Chadkin 0cdcfc562c refactor: add nesting rule to css engine (#3227)
Nesting rule is universal representation for
instance style with support for nested state selectors and nested media
queries. Css is generated css of course without css nesting and optimize
media queries but in the future may be generated with nesting for
simplicity.

This is essential to support mixins in css engine. Will support it in
atomic css in other PRs.
2024-04-24 01:37:01 +07:00
Oleg Isonen 5bac838abb refactor: Only use scrub distanceThreshold on inputs (#3226)
I just noticed that using scrub on any other things but inputs became
less responsive because of the threshold and its not needed anywhere but
in the inputs in 2 places

## 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-23 13:11:04 +02:00
Ivan Starkov 7e1ec54079 build: Fix timeout error (#3222)
The only way I found to make it work is to deploy all functions again
Was:
<img width="1245" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/2ce88b6a-3bdd-4c58-b690-fa2f5b35cb18">

Now:
<img width="1228" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/a90ee191-fb4b-4666-859f-502e06929099">


Any ideas why rest/ai so much smaller than all other routes?
2024-04-23 11:48:39 +03:00
Oleg Isonen 2a7f0aab40 chore: Use textarea for large Resource URLs (#3223)
## Description

URL input was hard to use when url gets long

## 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-22 21:14:36 +02:00
Oleg Isonen 47c074d6fa fix: Fix page settings icon button color (#3220)
## Description

Wrong color was used on the active item 

<img width="45" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/89f839b3-468f-4c4e-9b73-649c8b5ee2d1">


## 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-22 10:42:27 +02:00
Oleg Isonen 42ab6a7117 feat: add eyedropper to color picker (#3221)
## Description

<img width="240" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/2c3d1414-2d46-481f-b197-531d93c3c651">

## Steps for reproduction

1. click button
2. expect xyz

## 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-22 00:41:13 +02:00
Oleg Isonen c15b62e518 chore: disable console.log (#3219)
We should never keep console.log, but use console.info and console.error
if we need logging in prod/cli

## 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-21 16:41:16 +02:00
Bogdan Chadkin cb5e43580b refactor: replace uuid with crypto.randomUUID() (#3218)
crypto.randomUUID() is globally available in node and browser
environments. Uuid package is no longer necessary for our cases.
2024-04-21 15:38:39 +07:00
Bogdan Chadkin 8cb6a2a666 build: upgrade to node v20 (#3217)
Node 20 brings a few cool features
- stable test runner
- recursive readdir
- global crypto.randomUUID()
2024-04-21 13:40:44 +07:00
Ivan Starkov b0a28b8c40 build: Switch on aws s3 copy, fix typo (#3210)
## Description

Fix
clouldfare -> cloudlfare

## 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.146.0
2024-04-20 15:38:53 +03:00
Oleg Isonen 8ac51b5d39 fix: Suppoort min() and other functions in advanced section (#3215)
Closes https://github.com/webstudio-is/webstudio/issues/3203

If DOM parser is available, let it do the parsing and don't rely on
csstree if possible for validation

## 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-20 14:07:34 +02:00
Oleg Isonen f4f4e7c5ab chore: Visual regression tests for advanced section (#3214)
Visual regression tests for advanced section

Note: didn't add any mocking to make it functional in all states

## 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-20 13:57:37 +02:00
Bogdan Chadkin d110cce1a6 experimental: support GET forms in preview (#3202)
Here added support for sending get requests to pages and update search
params in preview.

The logic is same we use for links but instead of href search params
system is updated with form fields.

This is essential filters feature to support testing without publishing.

Also modified form component to fallback to native form when absolute
action is used
to avoid casting it to relative path.

## Steps for reproduction

1. create form
2. set current page url
3. add select
4. add button
5. go to preview
6. click the button
7. go to canvas
8. select body
9. inspect system variable
2024-04-20 18:47:16 +07:00
Bogdan Chadkin b2355e828f refactor: cleanup system variable (#3213)
Use sdk type for system variable and make it required in pages since it
was added to all pages with migration.
2024-04-20 17:44:01 +07:00
Oleg Isonen cac97829a5 fix: Several advanced section fixes (#3211)
## Description

1. Use mono font for properties and values
2. Use blue color for the property like the syntax highlighter
3. Fix focus after adding a new property
4. Fix added properties natural sort order

<img width="244" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/97386d1e-1820-4202-ab8d-013e9c7e5598">


## Steps for reproduction

1. click button
5. 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-20 11:46:37 +02:00
Bogdan Chadkin 7c36918b95 fix: avoid error while running any patch (#3209)
Here enabled patches, map and set in immer which were broken after
moving canvas and builder to client side.
2024-04-20 01:50:55 +07:00
Oleg Isonen 129aa5d826 experimental: New webhook form icon + update meta (#3208)
## Description

<img width="232" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/874d761a-f2d0-444a-a2e5-aba859b05b63">

## 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-19 20:26:36 +02:00
Ivan Starkov b965f33eb5 build: Create r2 artefact instead of Docker (#3205)
## Description

### Time of building the same project 
new:
<img width="318" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/f3695b88-c52c-4bad-93e4-7af665e0d01c">

was:
<img width="327" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/69f96159-1905-4392-b8f6-e6bcb7677313">


## 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-19 20:51:21 +03:00
Oleg Isonen 6019107d9a experimental: Webhook form icon and name (#3207)
## Description

- renamed the old form to Webhook Form
- added a special icon 

<img width="241" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/51de24dd-08aa-4ade-a0b3-f02f6146c635">


## 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-19 15:39:09 +02:00
Oleg Isonen 19e69a2e44 chore: fix React key warning (#3206)
## 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-19 10:56:20 +02:00
Oleg Isonen 3512b0e77b chore: Highlight slot and it's children in the navigator and on canvas with purple color (#3193)
## Description

Added new colors for navigator to mark slot and it's children

<img width="818" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/988b991d-1fee-4cec-9c6a-920736f781de">


## 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-19 10:55:43 +02:00
Oleg Isonen 56a8d35872 fix: Don't modify the text case in select boxes (#3204)
## Description

Menu is still upper case by default and Select is based on menu styles,
but needs to have the right text variant

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)


## 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-19 10:31:16 +02:00
Bogdan Chadkin 868c9bb496 build: regnerate lockfile (#3201)
New lockfile format is applied only after changing any dependency. Here
removed override from typescript caz it just deduplicated instances.
2024-04-18 16:26:01 +07:00
Oleg Isonen 15daa47b1f fix: Make colon in advanced section look more aligned (#3196)
## Description

<img width="233" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/e4368482-cce2-4784-b0bf-d65a30cde9ff">

## 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-18 11:21:22 +02:00
Oleg Isonen 82b544be48 fix: Fix binding button covering too much of the control (#3195)
## Description

Made the bleed option for binding button 

## 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-18 09:35:40 +02:00