96 Commits
Author SHA1 Message Date
Oleg Isonen 918ca2fa6f feat: Custom font family (#3845)
Closes https://github.com/webstudio-is/webstudio/issues/3817

## Description

This allows to enter any font family as well as adds safe default
chinese fonts.

Todo
- [x] use combobox
- [x] allow preview on hover
- [x] allow user to type fallback via comma, don't add a fallback to a
custom font
- [x] validate input?
- [x] add fonts
- [x] add global values

## 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-08-01 18:12:13 +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
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 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 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 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 87210fa069 feat: expand backgound-position shorthand (#3646)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Here replaced shorthand background-position with
background-position-x and background-position-y

Added shorthand expander, migration and merger
for css engine to improve browser support for offsets.
2024-06-29 13:43:37 +03:00
Bogdan Chadkin a7676c5042 feat: support -webkit-line-clamp (#3640)
Ref https://github.com/webstudio-is/webstudio/issues/2647 Closes
https://github.com/webstudio-is/webstudio/issues/3427

Here added -webkit-line-clamp and -webkit-box-orient properties support
which is the only way to add multiline truncation at the moment.

All properties with prefixes are stored without camel casing. With font
smoothing as the only exception because added very early.

<img width="911" alt="Screenshot 2024-06-28 at 17 48 08"
src="https://github.com/webstudio-is/webstudio/assets/5635476/ca773cf0-81f0-47d7-97c8-5f78751332d4">
2024-06-28 20:13:19 +03:00
Bogdan Chadkin a7cc5c8417 fix: prevent merging var with unset, initial and inherit (#3630)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Css wide keywords should be used only in longhand values not as part of
shorthands.
2024-06-27 18:59:36 +03:00
Bogdan Chadkin 6ec8aaeeb7 feat: support text-wrap (#3620)
Here revamped white-space and added support for text-wrap. Basically
both expands into

- white-space-collapse
- text-wrap-mode
- text-wrap-style

And then for better browser support all of them are merged in final css.

<img width="256" alt="Screenshot 2024-06-26 at 13 00 14"
src="https://github.com/webstudio-is/webstudio/assets/5635476/288de3c3-b045-4745-a9f0-34d97e97c0e9">
<img width="358" alt="Screenshot 2024-06-26 at 12 51 13"
src="https://github.com/webstudio-is/webstudio/assets/5635476/e2826389-0e00-443a-b402-e7890df4a02a">
2024-06-26 17:55:00 +03:00
Jaya Krishna Namburu 931e571081 refactor: drop parseTransition shorthand and add migration for transition shorthand (#3607)
fixes #3593 
## Description

This PR
- drops the `parseTransition` for parsing shorthand transition property.
- allows migration of existing transition property to long-hands.
- drops parsing `transition` when added from advanced tab. Because if we
parse and add it as proper layers. It will get remigrated again every
time the app is loaded.
- Adds tests for parsing individual transition properties and even
parses timing functions as timing functions now.


- [x] there is a bug associated with expanding transitions from
shorthands #3608 . Once fixed we need to test the new `FunctionValue`
parsing behaviour.

## Steps for reproduction

- Any previous values of `transitions` should we migrated into new
approach and should be available in the style-panel for using 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-06-26 06:53:05 +02:00
Bogdan Chadkin 0e468fe748 feat: merge longhand css into shorthands (#3615)
Here added optimization to css engine to produce much less classes when
some lonhands can be combined into shorthand.

Supported following properties

- border
- outline
- margin
- padding

Later the same utility will be used to make white-space and text-wrap
longhands better supported.

<img width="263" alt="Screenshot 2024-06-25 at 14 01 01"
src="https://github.com/webstudio-is/webstudio/assets/5635476/3b877e8b-969a-4e09-b3f4-557b2135d4cc">

<img width="270" alt="Screenshot 2024-06-23 at 17 39 33"
src="https://github.com/webstudio-is/webstudio/assets/5635476/e8de1c63-d7a5-465a-9f21-66fb67c1b02a">
2024-06-25 19:32:26 +03:00
Bogdan Chadkin 7f399154de fix: prefix more css properties (#3613)
These fields should have -webkit- prefix additionally to unprefixed
version to support more browsers.

- background-clip
- user-select
- text-size-adjust
2024-06-25 13:41:02 +03:00
Bogdan Chadkin bc5a355b37 refactor: drop legacy style rule (#3606)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Switched to nesting rule and style map generator
everywhere in builder.

Now will be much easier to implement properties prefixing and merging
utilities.
2024-06-24 14:29:50 +03:00
Jaya Krishna Namburu ce2dad417d refactor: use longhand properties to save transition values in style-panel (#3584)
## Description

fixes #3567 

Use long-hand properties to save `transition` values in the style-panel.

## Steps for reproduction
- Add some layers in transition panel in UI.
- Delete some layers
- Swap some layers

## TODO

- [ ] Allow `show/hide` for each layer.
- [ ] Add tests for all the layer handlers for transition.

## Code Review

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

@TrySound i made some refactor to use individual properties as
long-hands instead of short-hand property. I am still yet to add tests
for the new handlers, since they need to be handled in a different way
now for transitions. But you can still play around with the current
setup.

## 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
2024-06-23 13:23:56 +02:00
Bogdan Chadkin 9e23dc9580 feat: switch to overflow longhands (#3588)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Here refactored overflow UI to update "overflow-x" and "overflow-y"
longhands instead of "overflow" shorthand.

Removed "overflow" from advanced panel suggestions.

Added support for expanding overflow shorthand for webflow copy paste.

And implemented very basic migrations utility
which always run after data is loaded from server
and sends patch for expanding overflow longhands.
Patch is not sent when no properties are modified. Though eventually we
will need to support versioning to avoid executing old migrations.

<img width="279" alt="Screenshot 2024-06-18 at 19 33 21"
src="https://github.com/webstudio-is/webstudio/assets/5635476/ce44385e-3316-4e34-bc9c-5f790cbdcd4f">
2024-06-20 11:51:00 +03:00
Bogdan Chadkin 126fe3d66a experimental: expand font variant and synthesis shorthands (#3580)
Ref https://github.com/webstudio-is/webstudio/issues/2647
2024-06-18 17:51:26 +03:00
Bogdan Chadkin dfc216723a refactor: upgrade mdn-data (#3578)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Here upgraded to the latest mdn data and improved properties detection.
Excluded experimental and undocumented css properties.

- font-synthesis got longhands in mdn data
- background-position-x/y got excluded as experimental (though support
is good) but we anyway write as shorthand
- excluded white-space-collapse, text-wrap and text-wrap-* until decide
how to maintain them in the future
- field-sizing and zoom are new additions
2024-06-17 14:35:38 +03:00
Jaya Krishna Namburu 7b860d16de refactor: allow show/hide options for filters and backdrop-filters (#3502)
## Description

fixes #3451 
Allow `show/hide` for individual layers in `filters` and
`backdrop-filters`.

## Steps for reproduction

1. Add some layers for filters and backdrop-filters
2. Play with `show/hide` icon on each layer.


## 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
- [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-06-06 13:15:51 +02:00
Bogdan Chadkin a74f895487 refactor: host hyphenate-style-name (#3421)
hyphenate-style-name utility is basically oneliner but requires to
install two packages. Considering we will switch to hyphenate property
naming by default, no reason to rely on this package.

Also switched to unprefixed property in css preview and property name
tooltips.
Just shows background-clip instead of -webkit-background-clip.
2024-05-26 19:14:16 +03:00
Bogdan Chadkin cacfbee307 experimental: add content embed aka rich text component (#3315)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Embed Content is a component with a way to bind html from cms with
ability to style itself and all descendants generated from cms rich
text. All Content Embed children are "virtual" Descendant instances with
predefined selector.

<img width="1404" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5635476/8d7cf210-32cb-4e63-bfe7-8af8c3e2d78d">
2024-05-09 13:20:47 +04:00
Bogdan Chadkin 305436f820 experimental: add descendent component (#3313)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here added support for new `<ws:descendent />` component. It allows to
style any children or descendents of components. Primary usage is for
embed content which renders html and need to style tags.

Descendent component accepts "selector" prop which can be suffix like `
img`, ` .image` or `::first-child` pseudo-element.

Potentially it could be used as tag styling for any element.

Can be tested in any element by dropping "Descendent" component from
"internal" category.
2024-05-06 23:36:34 +04:00
Bogdan Chadkin 9f897f5d41 refactor: reimplement canvas style renderer (#3253)
Here refactored canvas styles with nesting rules which allow to update
each declaration incrementally and closer to our data format.

Things to test
- initial rendering
- updating values
- ephemeral values
- selecting state, rendered as separate stylesheet

Added shim.ts to contain simplified polyfills for future methods like
Set.prototype.difference which I use here to find added and deleted
styles.

Removed warning from parseCssValue which pollutes log with outdated
messages.

Additionally fixed old bugs
- support ephemeral styles with selector state, for example hover was
not updated on on canvas while updating ephemeral styles
- remove ephemeral custom property from body (bug appeared when added
support ephemeral styles in tokens)
2024-05-02 17:51:09 +04:00
Bogdan Chadkin 09491d7c0b refactor: simplify stylesheet caching (#3275)
Here got rid of top level stylesheet caching in favor of managing
caching by each rule. So nesting rule, font face and style rule based on
their inputs and methods manage own cached css string.

In stylesheet all the work left is building media queries and
concatenating all rules. This prevents hard to debug cached css after
updates.
2024-05-01 23:28:09 +04: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 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
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
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
Bogdan Chadkin beb3438224 experimental: support custom properties (#3047)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added support for css custom properties in style object model.
Added guaranteed-invalid value to schema to represent initial value of
custom properties.
2024-03-25 19:44:32 +07:00
Jaya Krishna Namburu 66204427e9 feat: Add filter section in style panel (#2955) 2024-03-12 21:53:34 +05:30
Jaya Krishna Namburu 0687ae1035 feat: Add FunctionValue to the css-engine to describe css functions effeciently. (#2986)
## Description

This PR adds a new `FunctionValue` type to the `css-engine`. This helps
in defining `blur(5px)`, `drop-shadow(10px 10px 10px red)` and
`translate3d(42px, -62px, -135px)` type of functions more clearly. There
is a flag in the `FunctionValue` with the name `seperator` which defined
that type of separator to be used while passing the function arguments.
In `css-tree` they use a `Operator` node. But we don't have something
similar to that in the schema. So, using a new flag to define it.

## 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] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [x] added tests
2024-03-10 18:24:20 +01:00
Oleg Isonen de7f764932 fix: Font familes with a space were not rendering correctly (#2860)
## Description

Now any font that contains a space should render

## Steps for reproduction

1. select any font that has a space in the name
2. check it actually renders on canvas

## 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-02-02 19:22:57 +01:00
Oleg Isonen c6bdef5084 feat: CSS engine has now a Style Sheet rendering with atomic classes which will lead to a 10x smaller bundle size (#2713)
## Description

CSS engine has now a Style Sheet rendering with atomic classes which
will lead to a much smaller bundle size

## 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
2023-12-30 21:08:37 +01:00
Ivan Starkov a939121318 fix: Incorrectly quoted URLs in CSS (#2642)
## Description

Even we have this

https://github.com/webstudio-is/webstudio-builder/blob/9af97656af2e06a789f416bd93e1e1d0e756f063/packages/asset-uploader/src/utils/sanitize-s3-key.ts#L26

Additionally seems like best practice is to add backslashes for `"` and
`\` symbols, even this symbols are impossible having sanitize we are
using. (In case of sanitizer change everything can break)




## 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
2023-11-22 18:53:36 +02:00
Jaya Krishna Namburu 60a6a7fbf2 feat: Add css transitions (#2511)
## Description

Adds support for `css-transitions` when users are in `local` state. In
any other state than local, the CRUD operations on transitions are
disabled.
2023-11-01 18:36:08 +01:00
Ivan Starkov 333f167c48 feat: Add helper functions for Tailwind support: shorthand expansion and variable substitution (#2371)
## Description

Gonna merge this before next step.

Helper functions to parse tailwind.

1. `expandTailwindShorthand` - Expands shorthand CSS properties into
their long-form equivalents. _'mx' is expanded to 'mr' (margin-right)
and 'ml' (margin-left)._
2. `substituteVariables` - Resolves CSS variables by replacing their
references with actual values. _Transforms `.class { --property: 1px;
margin: var(--property); }` into `.class { margin: 1px; }`._

## Steps for reproduction

See tests.

## 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
2023-09-28 09:36:54 +00:00
Bogdan Chadkin 2b52c53cbf Generate stories with new jsx component generator (#2322)
Here added "sdk-cli" package with "generate-stories" command which looks
for metas and generate stories from each one with template. This give us
more insight how component would look like on published sites.

Also removed old stories and added custom id support into embed template
to make stories ids stable.

Can be tested in local storybook
2023-09-17 17:59:54 +04:00
Bogdan Chadkin 87e69b2e85 Move style schema into css-engine (#2251)
Css-data now responsible for generated data and parsers which requires
heavy dependencies like csstree and openai.

Here moved style schema into css-engine which makes is responsible for
own input representation. So now schema and serialization are co-located
in single package.

Cli install size

```diff
du -ck node_modules
- 42680
+ 35516
```
2023-09-06 15:55:41 +04:00
Oleg Isonen 57417c7a58 Add font smoothing by default to the body (#1972)
## Description

Adding font smoothing by default to the Body component


https://discord.com/channels/955905230107738152/955907787299360788/1132882679189229649

```
  -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
```

## Steps for reproduction

1. open any project, see in dev tools these 2 added (or check visually)

## 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-builder/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
2023-07-25 12:38:58 +02:00
61f164d40e (feat): Ability to add box-shadow to nodes. (#1634)
## Description

This is a WIP PR, and will be adding more details about the feature and
the changes that are going in...

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi, 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory

---------

Co-authored-by: Bogdan Chadkin <trysound@yandex.ru>
Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-07-02 16:31:26 +02:00
Bogdan Chadkin c482db745c Add combined control descriptions (#1803)
Ref https://github.com/webstudio-is/webstudio-builder/pull/1785

Here fixed generated height description and added custom descriptions
for following controls

- background
- borderWidth
- borderStyle
- borderColor
- borderRadius
- sizing
2023-06-16 00:19:28 +03:00
Oleg Isonen b19142881b Css preview (#1740)
## Description

This PR introduces a CSS preview

<img width="934" alt="Screenshot 2023-06-10 at 03 48 55"
src="https://github.com/webstudio-is/webstudio-builder/assets/52824/c0d30136-f084-4cd5-a3e1-b98a2e29675b">



## Steps for reproduction

1. select any instance, add some styles
2. see in navigator css preivew

## 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-builder/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
2023-06-12 15:52:52 +02:00
Oleg Isonen 1962ba89b9 Breakpoints editor (#1543)
https://user-images.githubusercontent.com/52824/235469260-2a212e73-0815-4a4b-a02d-d98cf56c7a88.mp4



## Description

Closes https://github.com/webstudio-is/webstudio-builder/issues/1407

## Steps for reproduction

1. click edit breakpoints
2. test all possible inputs

## Code Review

- [ ] hi @rpominov , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview
- [ ] @TrySound please check if you have any concerns regarding removing
breakpoints and styles

## 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-builder/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
2023-05-01 20:13:57 +02:00
Bogdan Chadkin 3b16db748a Update css-engine transformValue on every update (#1495)
We have a bug that asset cannot be applied in background style section.
This is because image transformer was set only once on rule creation. We
need to reset it with actual assets on every styles updates.
2023-04-20 11:34:15 +07:00
Bogdan Chadkin a148507e48 Render style states (#1420)
Ref https://github.com/webstudio-is/webstudio-builder/issues/807

Refactored styles rendering in canvas to consider states and added style
states support to css text renderer.
2023-04-17 15:50:14 +07:00
Bogdan Chadkin 68639ab708 Drop asset.path (#1445)
This is computed field which is after moving logic to loaders equal to
asset.name so not really useful except for preview images.

Here object url for preview images is moved to container so there is no
need in asset.path here too.
2023-04-13 14:38:12 +07:00
Bogdan Chadkin 06b3f279ad Drop assets resolving from project-build (#1406)
This big chunk of legacy is no longer necessary.
We resolve style assets on client so css engine can accept db types now.
2023-04-10 23:14:10 +07:00