21 Commits
Author SHA1 Message Date
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 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 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
Bogdan Chadkin 2c28259c16 experimental: fix style preset generation (#3677)
Here fixed style presets generation to reflect new parsed css format.
2024-07-05 17:22:55 +03:00
Bogdan Chadkin 18005cf5d9 experimental: parse unknown properties as unparsed value (#3658)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Here improved our value parser to not output invalid type every now and
then and just represent unknown properties as unparsed. This will let us
parse it in the future without loosing anything on paste.
2024-07-02 14:16:17 +03:00
Bogdan Chadkin 373eacaf7c experimental: support last shorthands (#3657)
Ref https://github.com/webstudio-is/webstudio/issues/2647

- animation-range
- view-timeline
- caret
- position-try
- overscroll-behavior
2024-07-02 14:07:43 +03:00
Bogdan Chadkin 6c93a1a93f experimental: expand shorthands with css-wide keywords (#3656)
Ref https://github.com/webstudio-is/webstudio/issues/2647

According to spec css-wide keywords on shorthands should be passed to
all their longhands as is.
2024-07-02 13:21:30 +03:00
Bogdan Chadkin 7331b729b6 experimental: improve parsing transition-property (#3653)
Fixed parsing "none" in transition-property.
Switched to unparsed as property type to semantically distinct from
keyword.
2024-07-01 17:44:33 +03:00
Bogdan Chadkin ad5d050308 experimental: parse css wide keywords correctly (#3651)
Here added universal support for css wide keywords. initial, inherit and
unset will be parsed the same way for layered properties and singular
properties.

It will never be part of layers and always be represented as root
keyword.
2024-06-30 22:45:30 +03:00
Bogdan Chadkin 2af8d57b8e experimental: support transition-behavior property (#3650)
This is the new property and not supported by csstree out of the box. So
we try to parse it manually. Fixes a few invalid in webflow preset.
2024-06-30 15:15:11 +03:00
Bogdan Chadkin 009c5d8e2d experimental: parse non-standard properties (#3648)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Fixed parsing non-standard properties with prefixes

- font-smoothing
- -webkit-font-smoothing
- -moz-osx-font-smoothing
- tap-highlight-color
- -webkit-tap-highlight-color
- -webkit-overflow-scrolling
2024-06-30 02:25:18 +03:00
Bogdan Chadkin c1fc58ff4f experimental: expand background shorthand (#3647)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Here added support for background shorthand in css parser. Refactored
background image parser and simplified figma paste parser.
2024-06-29 19:44:00 +03:00
Oleg Isonen 3cf3da0f77 experimental: Copy from webflow 12 (#3642)
## Description

- fix all types of links (wf doesn't use attr for those, completely
custom data structure)
- update presets, add tons of missing presets

## 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-06-29 12:11:37 +02:00
Oleg Isonen fa9d2276cd experimental: Copy from Webflow 12 (#3631)
## Description

- support line breaks
- support span
- error asset variant

## 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-06-28 14:20:09 +02:00
Oleg Isonen 853c0f7d48 experimental: Paste from webflow 11 (#3623)
## Description

- support pseudo states
- support pseudo elements

## 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-06-27 14:35:14 +02:00
Oleg Isonen 25d72a11ff experimental: Paste from webflow 9 (#3602)
## Description

- updated mdn build
- fixed font-width
- render unset instead of var()
- skip properties with empty values
- temp rendering input instead of select
- remove the flag
- unprefix -webkit-appearance

## 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-06-22 23:23:29 +02:00
Oleg Isonen f8635a6691 experimental: Paste from webflow 8 (#3572)
## Description

- adds breakpoints when they are missing
- adds some form components
- rewrites tests to jsx

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

## 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-06-21 18:10:28 +02:00
Oleg Isonen 3827146b4f experimental: Paste from webflow 7 (#3549)
Ref https://github.com/webstudio-is/webstudio/issues/2647

## Description

- show a toast when skipping unsupported elements
- handle shorthands
- RichText test and link inside rich text fixes

## 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-06-14 13:52:59 +02:00
Oleg Isonen 8de6c4aee4 experimental: Paste from webflow 6 (#3519)
## Description

1. add rendering states e.g. :hover
2. keep the original rules order
3. remove overwritten properties
4. code embed component

## 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-06-12 10:51:39 +02:00
Oleg Isonen 2e1f6a35f1 experimental: Paste from webflow 5 (#3509)
## Description

When parsing webflow presets:
- skip selectors with combinators
- support states

## 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` file
2024-06-07 17:04:23 +02:00
Oleg Isonen 4aef12cd7a experimental: Paste from webflow 4 (#3491)
## Description

- webflow css preset

## 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-06-05 17:14:23 +02:00