Commit Graph
90 Commits
Author SHA1 Message Date
Bogdan Chadkin 097d2922c3 build: remove unused eslint suppressions (#3876)
Looks like we forgot to enable the flag
2024-08-04 23:37:59 +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
Ivan Starkov dd7447a0b6 experimental: Upload Webflow background-image assets on copy-paste (#3638)
## Description

Upload backgrounds on webflow paste.

## Steps for reproduction

Create backgrounds with images at webflow
paste into the new project.

Example (everything is pasted from webflow in a single copy-paste)

https://upload-style-assets.development.webstudio.is/builder/dc6eae9d-dae6-4ba8-ade2-abd86f733d6a

Layers use assets
<img width="495" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/aed96a08-f369-48b4-84ec-3e935c293510">


## 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 18:44:44 +03:00
Bogdan Chadkin 14791a476b refactor: switch preset styles to nesting rules (#3604)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Moved preset styles to new nesting rules in css engine. Will simplify
future prefixer solution.
2024-06-22 22:30:19 +03:00
Ivan Starkov 7d89ccfb09 fix: Fix focus bugs with text editing on canvas (#3454)
## Description

closes #3021

Currently if we are in a text edit mode we sometimes can't focus on any
input inside builder.
This fixes this.


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-05-30 19:41:46 +03:00
Oleg Isonen 700c9b95ab feat: Improve autoplacement when inserting component via 1-click in components panel or via paste (#3422)
Closes https://github.com/webstudio-is/webstudio/issues/3149

## Description

As a user when I have Heading, Text or similar instances selected which
have a single text node instance, I expect an added component to insert
AFTER such instances.

## Steps for reproduction

1. add heading
2. select heading instance
3. 1-click box
4. see box was added after the heading
5. repeat the same with paste
6. repeat the same with any instance that has only text inside

## Code Review

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

- [ ] hi @johnsicili , I need you to do
  - 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-05-27 10:18:22 +02:00
Bogdan Chadkin ed0c94574f fix: enforce text editor focus after clicking on toolbar (#3386)
Here trying to fix the issue with text editor loosing focus after
cliking on buttons and as a result blur never happen and changes are not
saved.
2024-05-20 09:09:03 +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 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 da7a3e632c refactor: drop react-use (#3111)
Here replaced react-use utilities with own solutions because could not
bundle it with vite. It also had a lot of transitive deps which bloated
our bundle and node_modules. Win-win.
2024-04-08 00:53:57 +07:00
Ivan Starkov 3c189aff97 fix: HTML Embed Code editor inside Dialog Content looses focus (#3020)
## Description

closes #2998

Also fixes name edits etc.
The same issue with radix as we had in the past, focus lock on any
mutation inside dialog aquires focus.
And we have no good way to prevent programmatic focus inside iframe.



## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-03-20 22:42:44 +03:00
Ivan Starkov ddb7e068ab fix: Style updates on all instances upon change (#3037)
Closes https://github.com/webstudio-is/webstudio/issues/2988

## Description

When a token value is modified, the change will be immediately visible
across all N instances using the same token

## Steps for reproduction

Create token, use it on 2 instances, change token styles, local styles
etc to see it work


## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-03-20 22:05:03 +03:00
Oleg Isonen 9f113a5f0a fix: Scroll new instance into view (#2976)
Closes https://github.com/webstudio-is/webstudio/issues/2973

## Description

When a new instance is added to the canvas, it should be scrolled into
the view when its outside of viewport

## Steps for reproduction

1. click add new component when body has lots of instances and is
scrollable
2. see canvas is being scrolled to the inserted instance
3. same thing for marketplace items
4. no changes for drag&drop

## 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-03-07 12:45:19 +01:00
Ivan Starkov e67b13d64d fix: Dialog focus issues (#2908)
## Description

closes #2889

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-02-13 20:40:28 +03:00
Bogdan Chadkin 39579c904b feat: preserve last selected style source on instances (#2873)
Fixes https://github.com/webstudio-is/webstudio/issues/2575
2024-02-06 20:22:59 +07:00
Oleg Isonen b2bf220ed6 chore: Rename all *Store to $store (#2747)
## Description

Pure renaming, nothing else.

## 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-01-09 13:32:51 +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
Bogdan Chadkin d361c9ecee feat: add collection component to builder (#2657)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added a "core" collection component to support iterating over json
arrays.

There is a lot of room for unification of all this logic though would
require building reactive tree abstraction.

Canvas automatically renders stub component for collection to make it
droppable. We can do the same for slot component.

Slot and Fragment eventually will go to "core" components too.

Added json/parameter prop types to embed template to support collection.

Fixed loosing focus while typing in json prop.

## Steps for reproduction

1. Drop collection component
2. play with it
2023-11-29 17:07:28 +03:00
Bogdan Chadkin cac813f2b6 refactor: move click canvas event to commands (#2514)
One less pubsub event replaced with clickCanvas.
Added store for sidebar active panel to manage from commands.

## Steps for reproduction

1. close breakpoints menu by clicking on canvas
2. close sidebar panel by clicking on canvas
2023-10-21 00:50:25 +04:00
Bogdan Chadkin 45f311150c refactor: render ephemeral styles with synced store (#2512)
Here replaced updateStyle and previewStyle pubsub events with
synchronized $ephemeralStyles store to reduce pubsub spread across the
codebase.
2023-10-20 15:17:25 +04:00
Bogdan Chadkin 8f47d4a4f2 refactor: cancel drag with command (#2509)
Here replaced the last legacy shortcut with command. One less event in
pubsub.
2023-10-20 01:18:35 +04:00
Bogdan Chadkin 4ddac0e7ff refactor: replace editor events with commands (#2508)
Ref https://github.com/webstudio-is/webstudio/issues/2354

We are moving away from emitting events and subscriptions. Here migrated
lexical toolbar to canvas commands.

Command handlers rely on global active editor to update currently edited
instance.

In the future we can explore alternative way to synchronize text editor
between builder and canvas with yjs.
2023-10-19 20:28:48 +04:00
Bogdan Chadkin 92e6dbd118 refactor: move text editing into commands (#2394)
Here fixed two-way synchronization of commands between builder and
canvas. Added flag to not share hotkey with other apps.

Added first two commands specific to canvas: editInstanceText and
escapeSelection. Builder is able to reuse commands by specifying inn
"externalCommands" which basically extends the union of commands.
2023-09-30 14:13:10 +04:00
Bogdan Chadkin 743d2f1842 refactor: add commands emitter (#2389)
Added new commands emitter utility to manage hotkeys across plugins and
separate a lot of logic from canvas.

Here migrated only togglePreview as an example.

Later we can build commands panel and hotkeys overrides on top of this
utility.
2023-09-29 20:47:25 +04:00
Bogdan Chadkin b6e8bddd38 refactor: drop react wrappers from dnd store (#2368)
Similar to https://github.com/webstudio-is/webstudio/pull/2365

Here migrated drag and drop store away from react wrapper.
2023-09-25 18:37:38 +04:00
Bogdan Chadkin 63f597225b refactor: drop react wrapper from preview mode store (#2365)
Nanostore react wrappers in many cases introduce additional renders
because of subscription even when only store.set is used. Searching for
references become complicated because we have both direct store access
and react wrapper.

Here migrated to use direct store access for preview mode store and
renamed it to $previewMode according to new convention.
2023-09-25 17:11:31 +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
Bogdan Chadkin 5794e8d1e7 Move app schema to sdk (#2237)
We are planning to decouple cli from prisma and all unrelated packages.
Here moved whole app schema into sdk package.
2023-09-03 22:27:30 +04:00
Bogdan Chadkin f5882256b8 Move assets schema into sdk package (#2220)
We are planning to move all types necessary to represent generated site
into separate package. This way we will be able to make CLI as small as
possible.

Here moved only assets schema. Now we get rid of aws, sharp and one
prisma usage (project-build still use it)

```diff
- 99MB
+ 75MB
```
2023-08-31 19:39:20 +04:00
Bogdan Chadkin cc0336e50d Drag on canvas closest detachable (#2197)
Before when start dragging we searched for closest rich editor under
cursor and did nothing when the instance is not detachable (for example
select value or switch indicator).

Here I changed the behavior to also look for closest detachable instance
and drag whole thing. This way we do not need toast like in navigator
and can canvas dnd just work.

Also fixed placeholder in "Select Value" component. Before was no way to
change it.
2023-08-27 21:28:33 +04:00
Ivan Starkov 3df5c96a9c Fix jumps on editing text inside tooltips, and probably other components (#2054)
## Description


![image](https://github.com/webstudio-is/webstudio-builder/assets/5077042/dc764c12-8612-4ea4-9a07-46384a8ed5a7)

https://discord.com/channels/955905230107738152/1137452246876033114

## 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-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-08-06 14:09:57 +03:00
Bogdan Chadkin 923a3868a1 Fix drag&drop on canvas (#2007)
Here fixed droping new components on canvas.
Template was used to check constraints but failed
when no template found. Fixed by using fallback.
2023-07-31 13:23:55 +04:00
Bogdan Chadkin 9328961b87 Allow to disable components detaching (#1986)
Here added meta.detachable flag which allows when set to true disable
copying, dragging and deleting instances of this component without ts
parent instance.

This is necessary to constrain components based on external code and
prevent deleting hidden components user cannot add again.
2023-07-27 20:43:46 +03:00
Bogdan Chadkin 6037a039b7 Compute insert constraints for tree (#1954)
Fixes https://github.com/webstudio-is/webstudio-builder/issues/1950

Here added new utility to compute constraints for tree when insert embed
template, paste something or reparent. I previous implementation all
constraints were merged which gave us false positives like when paste
List>ListItem we got "requiredAncestors: [List]". Here tree layout is
considered to exclude such false positives.

For testing try to copy paste List>ListItem
2023-07-19 22:23:34 +03:00
Bogdan Chadkin b424f9fbde Fix invalid ancestors for deeply nested instances (#1932)
Fixed the issue with pasting checkbox into button
which is wrapped into label

Prevented inserting label, checkbox, radio button and input into
buttons.
2023-07-14 19:28:29 +03:00
Bogdan Chadkin 1263a9ab08 Provide params with context (#1743)
Ref https://github.com/webstudio-is/webstudio-builder/issues/213

Before we set params globally which works yet only because they do not
change often. Here explicitly passed all params with context or by
passing them where necessary.
2023-06-12 16:51:27 +03:00
Bogdan Chadkin dcae1b5a9d Allow inserting into editable containers (#1735)
Here I removed "rich-text" type from components. Instead "container" can
be edited when has only text or rich text children.

And any time user can drop into editablle container which will wrap all
text and rich text children into "Span" component.

Had to implement position adjustment to consider text children which do
not have representation in navigator tree and canvas dnd.

Span has temporary SpanContainer name to not conflict with existinig
Span for styled text in rich text. Will rename in other PR when remove
no longer necessary components.
2023-06-10 00:55:46 +03:00
Bogdan Chadkin 7c6d06bfd8 Use meta stored in atom in builder and canvas (#1687)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1545

All complex use cases already switched to get meta from arguments and
from atom.

Here migrated the last cases and dropped legacy meta register in
react-sdk package. Now we ready to split components into separate
packages.
2023-05-30 17:45:12 +07:00
Bogdan Chadkin 7c66afef74 Add requiredAncestors and invalidAncestors to meta (#1684)
Here added two component restrictions to meta.

requiredAncestors prevent inserting components outside of required ones
here restricted ListItem to always be inside of List.

invalidAncestors prevent inserting components inside of invalid ones
here prevented nested buttons
2023-05-30 12:33:44 +07:00
Bogdan Chadkin c7ac312702 Store component meta in atom (#1661)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1545
https://github.com/webstudio-is/webstudio-builder/issues/1129

Here register all component metas to atom which is sychronized with
builder.

Replaced getComponentNames with registered metas keys. We no longer need
to maintain this list.

Old registration still there because there is a lot of usages of
getComponentMeta.
2023-05-22 17:01:00 +07:00
Bogdan Chadkin 25c1fb3706 Drop css endpoint (#1656)
See https://github.com/webstudio-is/webstudio-builder/pull/1565

We don't use it anymore and it's conflicts with vanilla-extract
integration in remix.
2023-05-20 14:27:43 +07:00
Bogdan Chadkin f9add7acdd Fix breakpoints width and rendering (#1631)
Ref https://github.com/webstudio-is/webstudio/discussions/30

Here fixed width update which always relied on base breakpoint instead
of selected one.

Another issue found and fixed is wrong order of rendered breakpoints.
2023-05-17 01:23:52 +07:00
Ivan Starkov cad34a3040 Fix types (#1629)
## Description

Makes AllComponent type better


Found null bug.

Enforced for all components 
```
    [componentAttribute]: instance.component,
    [idAttribute]: instance.id,
```
to be non-optional. 

cc @TrySound should fix your issue with Html 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-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-15 12:21:12 +04:00
Ivan StarkovandOleg Isonen 6a3368add0 Fix collapsed outline sometimes not visible (#1597)
## Description

<img width="499" alt="image"
src="https://user-images.githubusercontent.com/5077042/236811571-0f98099d-907a-47d4-8733-59dba654d26f.png">

Now on connected outlines, it will not be the thin border like before.
(But the thin border has an issue that in some cases it can become a
solid line)

Imo this looks better vs thick 4px outlines at the webflow

## 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-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: Oleg Isonen <oleg008@gmail.com>
2023-05-08 13:58:23 +02:00
Ivan Starkov 91cf072068 Fix background image edit (#1592)
## Description

Image background layers are invisible during edit
fixes
https://discord.com/channels/955905230107738152/955907841070346300/1104430743049994331

## 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-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-07 19:59:14 +04:00
Bogdan Chadkin 4e31256b2a Restrict allowed parents with config in meta (#1542)
Added `allowedParentComponents: string[]` option to meta which prevents
dropping, inserting or pasting components into wrong parents. For
example ListItem now can be placed only inside of List component.

This will unlock better experience with compound radix components.
2023-05-02 15:20:22 +08: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