Commit Graph
1223 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
Oleg Isonen 1f435cc7f9 chore: Disable marketplace resource (#3799)
Fixes https://github.com/webstudio-is/webstudio/issues/3680
And fixes " Marketplace lets people access gated features (resource
settings need to be disabled on free)" in
https://github.com/webstudio-is/webstudio/issues/3700

## Description

- Allow user see resources from marketplace but no changes if not on pro
- When not on pro, you can fully see hints and even select Resources,
but you can't change them, changes won't be saved and user will see a
banner


## 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-30 04:01:36 +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
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
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 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 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 fa99a90690 feat: move bug report into help menu (#3780)
## Description

Decided to move bug report into the help menu, because that's the most
likely place people will go anyways

## 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 20:54:40 +02:00
Oleg Isonen 1170a87135 fix: fix validation for selected attributes/properties (#3779)
## Description

Previous pr introduced a bug

## 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 20:04:10 +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
johnsicili ea3520d92a docs: change dashboard intro video to use new 101 playlist (#3775)
## Description

Recorded a new video series and added them to a playlist. Changed intro
vid in dashboard to open the playlist.

## 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 10:31:02 +02:00
Oleg Isonen 459511c8a3 fix: Fix show property handling from navigation (#3771)
## Description

1. when show was not set before, its undefined and needs to be treated
as false
2. when instance has no properties at all, show prop needs to be created

## Steps for reproduction

1. test with a new instance that has no properties e.g. body
2. test with an instance that had never set show to true or false, so
its undefined

## 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-21 18:17:23 +02:00
Oleg Isonen aa364048aa feat: Show/hide toggle in navigator (#3766)
Closes https://github.com/webstudio-is/webstudio/issues/237

## Description

Now you can show/hide directly from navigator

## Steps for reproduction

1. focus/hover any navigator item
2. show/hide item works as expected
3. in sync with show/hide in settings

## 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 17:16:11 +01: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
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
Oleg Isonen c994c689b9 fix: Set correct tag when pasting a Block from webflow (#3762)
## Description

We were currently not setting the tag that comes from webflow properties

## 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 17:25:23 +02:00
Oleg Isonen 30c7600143 fix: Skip empty combo class when pasting from webflow (#3755)
## Description

Skipping unnecessary combo class

## Steps for reproduction

1. in webflow, add element with class .a, define color
2. add element with class .b, define font size
3. add element with class .a.b  don't define anything
4. paste .a.b into webstudio - see .a .b tokens are added, but no .a.b

## 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:57:28 +02:00
Oleg Isonen 0cd5080d76 fix: Prevent accidental clicks on label with boolean control (#3756)
Fixes https://github.com/webstudio-is/webstudio/issues/3751

## Description

Clicking on a label that toggles the switch is not necessary and leads
to accidental changes.

## 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:57:17 +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
Ivan Starkov 19c95fe9f0 fix: Lightbox paste partial support (#3744)
## Description

Now can be pasted

https://www.relume.io/components/gallery-7

## 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-16 21:08:36 +03:00
Ivan Starkov f3a625f96f fix: Image paste from webflow (#3743)
## Description


https://discord.com/channels/955905230107738152/1262723546669645865/1262723682032287838



## 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-16 19:30:02 +03:00
Bogdan Chadkin d7a46f3c4f experimental: fix webflow validation error (#3742)
This error happened because we assumed local styles to be strings but
for example order can be number. Relaxed validation to unknown. Value is
used only in template literal.
2024-07-16 18:24:21 +02:00
Bogdan Chadkin 308acbbaf7 experimental: add transparent color when paste bg clip from webflow (#3739)
Here fixed the issue with pasting gradients from webflow. Their css
engine output -webkit-fill-color: transparent along with background-clip
property. This is very implicit behavior from css point of view.

Here I instead added logic to add color: transparent from paste from
webflow overriding previously set color. It will not work in 100% but
should cover relume templates.
2024-07-16 17:44:11 +02:00
Oleg Isonen 531dc6a4e8 experimental: Pasting from webflow 15 (#3733)
## 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-16 14:09:52 +02:00
Bogdan Chadkin ed05084db4 fix: ignore transparent color when paste gradient (#3736)
Ref
https://discord.com/channels/955905230107738152/1115982879651016814/1262152122774851675
2024-07-16 01:00:36 +02:00
Bogdan Chadkin dc78b53c13 experimental: fix local styles when copy from webflow (#3735)
Fixed the issue with pasting components with local styles for exmaple
quick stack.
2024-07-16 00:21:28 +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 fc81392df9 fix: transition bugs (#3730)
- fixed default duration
- fixed repeating logic when view, add or delete transitions
- prevent showing transition-behavior property when use transitions UI
2024-07-15 18:28:23 +02:00
Bogdan Chadkin 8632212278 refactor: support presets in style object model fixtures (#3725)
Refactored all left style object mode tests with new fixtures.
2024-07-15 13:33:34 +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 9665689538 refactor: add repeated style control (#3717)
Our repeated sections like background or transitions are too repetetive
and require logic to store multiple properties as single style value.

Here added new control which covers more use cases out of the box and
allows to avoid repetition for shorthand properties.

Switched only transitions for now.
2024-07-13 01:24:32 +02:00
Oleg Isonen 429c406d2b experimental: More comboclass fixes (#3716)
## Description

Source order specificity in webflow is completely unpredictable. I am
just trying to do a wild guess based on testing with relume what would
be the right order.

## 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-12 12:48:24 +02:00
Oleg Isonen 4c60e957ff experimental: Combo classes for wf copy paste (#3713)
## Description

When webflow has a combo class out of .a.b.c we need to check .a, .b,
.c, .a.b, .a.c etc all combinations because in webflow they can apply as
it does with regular css

## 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-12 01:18:50 +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 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
Jaya Krishna Namburu 3c32053c0e fix: add style-source indicator for transitions section title (#3697)
## Description

Added missing transition section title label indicator for style-source.

<img width="239" alt="Screenshot 2024-07-10 at 12 41 10 PM"
src="https://github.com/webstudio-is/webstudio/assets/11075561/036ecd90-9b3f-45cb-812f-5bfef56410ab">

## Code Review

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

## 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:06:30 +02:00
Bogdan Chadkin 4abb5ce83e experimental: support webflow custom properties (#3706)
Webflow wraps its custom properties (which are not actually custom
properties) with `@raw<|value|>` which our parser just skips because
unable to parse.

Here simply stripped with regex all such wrappers.
2024-07-11 01:04:29 +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
Oleg Isonen fb9b6b3bd7 experimental: Only add a breakpoint when there are styles on that breakpoint (#3701)
## Description

Instead of adding all wf breakpoints at once, we now will add them
incrementally if there are styles on a particular breakpoint

## 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-10 11:59:31 +02: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
Oleg Isonen 915de5c46d experimental: Paste from webflow 14 (#3687)
## Description

- support combo classes

## Steps for reproduction

1. create project A, create class .a and set some style A
2. copy element with class .a 
3. create a project B with also class .a, set some other style B
4. create a class .b, set some style C
5. create a combo class .a.b, set some style D
6. copy first project element with class .a into ws
7. copy second project element with combo class .a.b into webstudio
8. expect the element to have 3 tokens: `.a .b .a.b`, expect .a to have
style A, .b to have style B and .a.b to have style D defined on them

## 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-09 11:43:31 +02:00
Bogdan Chadkin 0e457fe0ad experimental: support webflow local styles (#3695)
QuickStack component use local styles or instance style overrides. Here
added converted it to webflow style format and parsed the same way as
classes.
2024-07-07 17:58:26 +03: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
Ivan Starkov 6ebcd5cefd fix: Fix transition (#3676)
Fixes https://github.com/webstudio-is/webstudio/issues/3675
2024-07-06 21:15:20 +03:00
Oleg Isonen e6ef2dfa0d fix: Fix nsubscribe logic when entering builder second time (#3689)
## Description

Canvas crash.

When store.subscribe callback can be called sync and unsubscribe
function isn't yet defined, it will crash

## Steps for reproduction

1. open project
2. go back to dashboard
3. open project again
4. should not crash

## 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-06 13:12:37 +02:00
Oleg Isonen cc596bb969 experimental: Relax asset schema for wf data (#3688)
## Description

That schema is currently too string, and throws an error

## 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-06 11:53:20 +02:00
Bogdan Chadkin f988e2b918 experimental: support breakpoints in css parser (#3685)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Here added additional `breakpoint` property to parsed style declaration.
It basically a sanitized media query like `(min-width:768px)` which is
easy to parse. Styles inside unsupported conditions are just stripped
away.
2024-07-06 11:13:45 +03:00
Oleg Isonen 499189eb0e fix: Set initial canvas width once selected breakpoint is known (#3684)
Close https://github.com/webstudio-is/webstudio/issues/3682

## Description

1. on initial load resize handes were not visible because initial width
was not set

## 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-05 23:11:32 +02:00