Commit Graph
2522 Commits
Author SHA1 Message Date
Ivan Starkov 8be665e68d experimental: SSG download support (#3783)
## Description

See corresponding [SaaS
PR](https://github.com/webstudio-is/webstudio-saas/pull/311) too

## Steps for reproduction

Click Publish/Export

<img width="363" alt="image"
src="https://github.com/user-attachments/assets/fbc1f4e5-3a2c-4bb9-9242-025196f991bc">


Deploy zip to netlify
<img width="1710" alt="image"
src="https://github.com/user-attachments/assets/daca4ead-6272-4729-8e82-0986301e5c8b">


## 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` file
2024-07-30 08:57:33 +03:00
Bogdan Chadkin dca04597fb build: publish 0.173.0 (#3816) 2024-07-29 17:48:40 +02:00
Bogdan Chadkin 50a71564f5 feat: support static site generation in cli (#3813)
Closes https://github.com/webstudio-is/webstudio/issues/3763

Added ssg to the list of templates.
2024-07-29 13:30:30 +02:00
Bogdan Chadkin 8a746f6594 feat: drop data-ws-* attributes (#3806)
Ref https://github.com/webstudio-is/webstudio/issues/3763

We no longer rely on data-ws-id and data-ws-component in generated apps.
Now we get a few benefits

- smaller workers to deploy
- cleaner html to inspect
- generated ssg can be modified directly by user

See generated fixtures

<img width="726" alt="image"
src="https://github.com/user-attachments/assets/59012201-0dce-47f3-aa80-387c77b8f7d6">
2024-07-28 21:30:26 +02:00
Bogdan Chadkin 1c1c09f6c6 feat: submit webhook form without n8n (#3811)
Closes https://github.com/webstudio-is/webstudio/issues/3789

Here stopped submitting webhook form with custom action to n8n and
requested directly from generated code. This has a few benefits

- self-hosted websites (vercel, netlify) no longer have to setup n8n to
support forms
- we can pay n8n for these executions no more
- user no longer have to unsubscribe from emails when setup custom
webhook
2024-07-28 20:44:26 +02:00
Jaya Krishna Namburu d56df607f2 chore: move transforms section behind a flag (#3810)
## Description

This PR moves the `transforms` section behind a feature flag. The
section needs to add tooltips for all properties and scale need to have
a `lock` behaviour between the `scaleX` and `scaleY` properties.


## 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)
2024-07-28 14:33:22 +02:00
Oleg Isonen e0552f0815 fix: Ensure AI doesn't return json markdown (#3809)
## Description

Detect route started returning json in markdown instead of pure json
`json\n[\"generate-template-prompt\"]\n`

## 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` file
2024-07-28 14:26:17 +02:00
Bogdan Chadkin d7531b73b7 refactor: manage forms with resources (#3803)
Ref https://github.com/webstudio-is/webstudio/issues/3789

Here changed a few things

- replace WebhookForm action prop with resource, which is sent with
hidden field instead of instance id
- prevented generating method and action in client side code
- generate "action" resource instead of form properties for server

action prop is replaced only inside cli to not require support in
builder yet, in the future this can be part of client migrations
2024-07-27 20:20:29 +02:00
Bogdan Chadkin 34ae0411db refactor: decouple resource loader from generated requests (#3798)
Ref https://github.com/webstudio-is/webstudio/issues/3789

Unified resource generation to output computed request factory to use in
both loader and action.
2024-07-27 11:59:46 +02:00
Jaya Krishna NamburuandOleg Isonen 5b46f791af feat: add transform section under style-panel with ui controls (#3718)
## Description

Adds the primary `translate`, `scale`, `rotate`, skew` properties under
transform section. Related to #3411

## Steps for reproduction
- Add multiple properties under the transform section.
- Update values of each property from the UI.
- Hide/Delete each individual property

## Todo
- [x] Need to discuss if the `isExperiemental` flag need to be removed
before merging the branch.

## Code Review

- [x] 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
- [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)
- [x] added tests
- [ ] if any new env variables are added, added them to `.env` file

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2024-07-27 09:20:53 +02:00
Bogdan Chadkin 31bdec9f3b feat: use classes for regular styles (#3796)
Closes https://github.com/webstudio-is/webstudio/issues/3788

Here switched from attribute selector to classes when atomic styles are
disabled. This will let us get rid from data-ws-* attributes in
generated html.
2024-07-26 14:00:20 +02:00
Bogdan Chadkin 091fd74c5a refactor: disable atomic styles in generate stories (#3795)
Ref https://github.com/webstudio-is/webstudio/issues/3788

Here switched back to regular (non-atomic) styles
in generated stories in radix sdk.
2024-07-26 12:56:21 +02:00
Bogdan Chadkin 6c4b5f5e0e refactor: move project cloning into sql function (#3790)
Our project cloning does a lot of roundtrips to database and got
fragmented across 3 packages. The logic is too complicated to represent
with postgrest.

Here written single sql function which is invoked safely with postgrest
rpc.
2024-07-26 12:33:06 +02:00
Bogdan Chadkin f73680027f feat: use classes for preset styles (#3794)
Closes https://github.com/webstudio-is/webstudio/issues/3787

Replaced [data-ws-component=...] selector with classes in generated
styles. This will unlock cleaner html output in the future.
2024-07-26 10:45:29 +02:00
Oleg Isonen 7f1af26ad8 fix: fix webflow html embed preset styles (#3791)
Fixes
https://discord.com/channels/955905230107738152/1265688229529784320

wf embed is display block by default, but we have nothing that would set
this because our own preset sets display to content

## Description

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

## Steps for reproduction

1 copy code embed/html embed from webflow
2.paste it and see the display is block, not contents

## 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` file
2024-07-25 21:26:11 +02:00
Ivan Starkov 8d51926dc5 chore: Add Docker-in-Docker Support for Utilities like Supabase CLI (#3785)
## 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` file
2024-07-25 20:50:52 +03:00
Ivan Starkov 2114168044 chore: Improve prisma and api debugability (#3784)
## 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` file
2024-07-24 20:19:39 +03:00
Oleg Isonen a4ee2f8187 fix: style panel layers list rendering (#3778)
## Description

Currently it reserves space for the menu when it shouldn't

before
<img width="245" alt="image"
src="https://github.com/user-attachments/assets/f5afaa7c-be33-405c-9b23-97b8c32f40a7">
after
<img width="248" alt="image"
src="https://github.com/user-attachments/assets/c63bcf18-6556-40eb-93cd-3bb14dee5a7f">


## 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` file
2024-07-23 19:59:31 +02:00
Oleg Isonen b9e60e9f7c feat: Keep original case of custom attributes (#3777)
## Description

- [x] name category with Properties & attributes for clarity
- [x] adapt humanizeString from prop/attribute names
- [x] add description to the combobox
- [x] Class Name > Class 
- [x] add validation for custom attributes

## 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` file
2024-07-23 19:46:59 +02:00
Bogdan Chadkin 37791ee4c1 experimental: support ssg with vike (#3773)
Ref https://github.com/webstudio-is/webstudio/issues/3763

Here added new "ssg" template to cli.
Generated non-remix app. `vike build` generates
static site at `dist/client`.

```
cd fixtures/ssg
pnpm build
npx sirv-cli client/dist
```
2024-07-23 10:51:36 +02:00
Bogdan Chadkin 2518719ba9 refactor: merge tsconfig from CLI templates (#3774)
Here changed tsconfig copying logic to merge instead of override. This
simplifies alternative frameworks support.
2024-07-22 13:49:10 +02:00
Bogdan Chadkin a10c9d16b3 refactor: replace constants in templates (#3770)
Here made constants path easier to access from dynamic paths by
automatically replacing __CONSTANTS__ with actual relative path.

This is necessary for vike support which has folder based routes.
2024-07-21 15:34:07 +02:00
Ivan Starkov 231c792ebf experimental: Enhance Performance by Using Postgrest to Fetch Data from Build Table (#3758)
## Description

[Big Project
Example](https://postgrest.development.webstudio.is/builder/be939bf2-9095-4e17-b175-69de2bbf9597)

Reduces time of big projects loading:

✓ { scenario:new_o }...........: avg=2.58s min=1.99s med=2.54s max=3.53s
p(90)=2.95s p(95)=3.15s p(99)=3.44s count=31
✓ { scenario:old_o }...........: avg=5.5s min=4.55s med=5.12s max=15.58s
p(90)=5.44s p(95)=6.02s p(99)=12.87s count=31

2 times faster. (but highly depends on test times, project size etc
sometimes it's 6x difference)

Reduces patch time too.

## 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` file
2024-07-20 18:34:36 +03:00
Bogdan Chadkin 1c3e878ca0 refactor: merge exclude from search flags (#3765)
Write environment flag to page meta in load instead of exposing to
client.
2024-07-20 11:22:12 +02:00
Bogdan Chadkin 4977e82031 refactor: move social asset into page meta (#3764)
Removed social asset form top level and moved into generated page meta.
Will be less generated data and simple page head.
2024-07-19 21:32:22 +02:00
Oleg Isonen 4c41ca05c7 feat: Display navigator item show state (#3761)
Fixes https://github.com/webstudio-is/webstudio/issues/3750

## Description

Indicate show=false in the navigator

## Steps for reproduction

1. toggle show switch
2. see item in the navigator opacity changed including it's children

## 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` file
2024-07-19 21:15:42 +02:00
Ivan Starkov 5d5843ba22 fix: Do not load full Build data at builder loader (#3759)
## Description

Loading of html (first request)


https://project-load-perf.development.webstudio.is/builder/be939bf2-9095-4e17-b175-69de2bbf9597
700ms

Same on main 8sec

https://main.development.webstudio.is/builder/be939bf2-9095-4e17-b175-69de2bbf9597

10x difference

## 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` file
2024-07-19 13:18:00 +03:00
Bogdan Chadkin a533debc3b build: bump remix (#3749)
- netlify got rid of opentelemetry
- postcss is deduped
2024-07-18 13:28:54 +02:00
Bogdan Chadkin aede354cbd refactor: isolate remix specifics in cli (#3753)
We wanna support other frameworks than remix.
At least to support SSG we need to additionally deploy vike.dev.

Here split all remix specifics into separate module. It provides the
list of components (including overrides) and templates getter.

Templates allow to provide multiple module per route which is essential
for many frameworks like svelte and vike which do not rely on
treeshaking for client/server splitting.
2024-07-18 13:09:08 +02:00
Bogdan Chadkin 10b9533e31 fix: support backdrop-filter in safari (#3748)
Safari was the first to build this feature but still supports only
prefixed version. Might land unprefixed in safari 18.
2024-07-17 13:48:08 +02:00
Bogdan Chadkin b0726f1be1 build: bump storybook (#3731)
Storybook cut a lot of transitive packages. Now upgrades should be
easier. Future 8.3 promise to cut even more.
2024-07-17 13:32:18 +02:00
Ivan Starkov d7e07d6ba1 fix: Dashboard thumbnail disappears on asset deletion (#3747)
## Description

Dashboard thumbnail disappears on asset deletion

## Steps for reproduction

Delete any asset see dashboard thumb is still exist

## 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` file
2024-07-17 13:42:14 +03:00
Bogdan Chadkin cfde2f33b3 refactor: parse complex aspect ratio as unparsed value (#3740)
Fixes the issue with pasting images from webflow.
2024-07-16 17:49:09 +02:00
Ivan Starkov b01c453ce7 fix: DOMContentLoaded is not firing for inline module scripts (#3727)
## Description

closes #3724

## Steps for reproduction


https://embed.staging.webstudio.is/builder/f3843f61-c4dd-4fc6-9463-bb88e8cc5f9b

2 "Client Only" Embeds

```html
<!--Embed 1 -->
<script type="module">
  import _ from 'https://cdn.jsdelivr.net/npm/lodash-es/lodash.js';

  console.log(_.join(['Hello', 'World', '1'], ' '));

  document.addEventListener('DOMContentLoaded', (event) => {
    console.log('DOM fully loaded 1');
  });
</script>

<!--Embed 2 -->
<script type="module">
  console.log('Hello 2');
  document.addEventListener('DOMContentLoaded', (event) => {
    console.log('DOM fully loaded 2');
  });
</script>
```

Before this PR gave output with following errors:
- Broken order
- Broken `DOMContentLoaded`

```log
Hello 2
Hello World 1
```

Now no issues

```log
Hello World 1
Hello 2
DOM fully loaded 1
DOM fully loaded 2
```




## 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` file
2024-07-16 00:14:44 +03:00
Bogdan Chadkin 6b52b5ad4e refactor: move filter parsers to generic value parser (#3729)
Here reuse generic css value parser for filter and backdrop-filter
properties. Added section to parse filter functions with tuple
arguments.
2024-07-15 22:56:59 +02:00
Bogdan Chadkin a65ab3379f build: forbid unused parameters (#3732)
Enabled flag in tsconfig to forbid unused parameters.
2024-07-15 21:17:13 +02:00
Bogdan Chadkin b1ef716ae7 refactor: move transform parser into css value parser (#3726)
Here dropped custom transform parsers in favor of generic value parser.
Also switched to layers when single value is specified in scale and
translate.
2024-07-15 15:02:03 +02:00
Ivan Starkov f4159b5652 build: Update wrangler (#3699)
## 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` file
2024-07-15 15:20:11 +03:00
Bogdan Chadkin 0373c52a53 refactor: move shadow parser into value parser (#3723)
We don't need separate parsing logic for box-shadow and text-shadow
properties. Generic css value parser is able to produce the same ast.
2024-07-15 11:42:17 +02:00
Bogdan Chadkin 101fb0d8f8 experimental: optionally support parsing custom properties (#3722)
Ref https://github.com/webstudio-is/webstudio/issues/3399
https://github.com/webstudio-is/webstudio/issues/1536

Here added optional support for custom properties in css parser. Also
refactored basic style object model tests with css/jsx fixtures.
2024-07-15 10:57:46 +02:00
Bogdan Chadkin 18a0f028c9 refactor: split css literal parser (#3721)
Here refactored value parser with literal parser
which can be reused in all functions, tuples and layers.

Color parser now relies on specific ast types.

Tuples are generated for all values with multiple nodes.

This all will let us build more universal parsers with less effort.
2024-07-14 20:30:12 +02:00
Bogdan Chadkin ae35b7d8f0 refactor: add universal css fragment parser (#3712)
Here added new utility for builder to support parsing css fragments in
style controls like background, transition, shadows etc.

The idea is to use regular parseCss where possible and fallback to
specified property parsing.

This way we do not need to strip property name manually and can always
have shorthands expanded in result.

Also user can paste multiple properties at once like background-color
and background-image when describe gradient.

<img width="266" alt="Screenshot 2024-07-11 at 16 38 06"
src="https://github.com/webstudio-is/webstudio/assets/5635476/8d3b8454-0f8a-48b2-adbd-389a28993e3a">
2024-07-11 22:11:53 +02:00
Jaya Krishna Namburu d744cdef4b experimental: parse scale css property into tuples (#3705)
## Description

Adds support for parsing `scale` css property. Will be used in bringing
support for transforms ection in style panel.

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

- [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)
- [ x added tests
2024-07-11 08:41:26 +02:00
Jaya Krishna Namburu c7a688c3c6 experimental: parse translate css property into tuples (#3696)
## Description

Parses `translate` css property and converts them into tuples. Related
to the series of PR that enables transform property #3411

## 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)
- [x] added tests
2024-07-11 08:24:27 +02:00
Jaya Krishna Namburu 6abceecd74 experimental: parse transform css property into tuples (#3704)
## Description

Parse `transform` value into tuples. We need to use shorthand transform
property for `skew` and `rotate` to support the UX.

- **skew** doesn't have individual property yet. So need to use this as
backup.
- **rotate** doesn support setting individual `x, y, z` properties on
the long hand property like in the design. So, we are can use transforms
as backup and allow to set individual `rotateX`, `rotateY` and `rotateZ`
values.


## Code Review

- [ ] hi @TrySound , I need you to do
  - detailed review (read every line)
  

## Before requesting a review

- [x] made a self-review


## 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
- [x] added tests
2024-07-11 08:09:25 +02:00
Ivan StarkovandBogdan Chadkin b6a164f90d fix: expandShorthands fails and prevent builder to load (#3702)
---------

Co-authored-by: Bogdan Chadkin <trysound@yandex.ru>
2024-07-10 17:37:48 +02:00
Ivan StarkovandOleg Isonen 6e41286635 experimental: Add Desktop Webflow Navbar support (#3665)
## Description

This 
<img width="856" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/f8894380-0dbb-45c7-a1a5-410dbcb01fc8">

To this
<img width="1049" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/bf618095-08be-4c6f-850f-56354e74e738">

## Known issues:

### All
- w-nav-link preset colors do not match

### Mobile
Mobile burger is not shown 
- w-nav-button does not have breakpoint style i.e. display: none->block
for mobile
- w-nav-menu does not have breakpoint related style i.e display: block
-> none for mobile
- we don't have widget icons like burger i.e. `"data": { "widget": {
"type": "icon", "icon": "nav-menu" } }` _having breakpoint issues and
that user in any case need to use Sheet on mobile this is ok_



## Steps for reproduction

Copypaste Navbar from webflow 2 webstudio

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

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2024-07-10 18:36:01 +03:00
Bogdan Chadkin 1fcd542469 refactor: allow any style value to be hidden (#3703)
This simplifies maintaining style values.
No more checked for hidden possibility. Just check the flag for true.
2024-07-09 22:17:17 +02:00
Bogdan Chadkin 6505b5ad7c build: drop jest-jsdom (#3678)
Looks like we don't really need jest-jsdom for our tests all checks here
are just null checks.
2024-07-09 13:00:14 +02:00
Bogdan Chadkin d7b529a118 refactor: merge timing function parser into value parser (#3694)
All value parsers can be generalized at some point to make adding new
feature easier. Here moved timing-function parser into value parser and
reused it in builder.
2024-07-07 17:52:20 +03:00