1743 Commits
Author SHA1 Message Date
Bogdan Chadkin 4991ec421f refactor: remove variable fallback on autocomplete (#4521)
Forgot to clear fallback after variable values preview.

<img width="335" alt="Screenshot 2024-12-06 at 13 40 03"
src="https://github.com/user-attachments/assets/0d35bcbe-f890-4082-9da1-e194645ad1bb">
2024-12-06 17:13:33 +07:00
Bogdan Chadkin ce2babe3d0 refactor: add child and descendant matchers (#4520)
Now we have two more matcher for direct children and descendants.
Eventually they will replace "detachable" flag in meta.

Here used new matchers to prevent user from deleting last tab trigger or
last tab content which cannot be readded from components panel.

Added matchers check to "delete" and "cut"
2024-12-06 16:46:44 +07:00
Ivan Starkov 564efe0bce fix: Prevent focus when selecting form label in builder (#4516)
## Description

Prevent forwarding the click event on an input element when the
associated label has a "for" attribute

In real browser emulates click event on input when label is clicked.

closes #4513

## 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:
0000)
- [ ] 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-12-05 19:13:20 +03:00
Oleg Isonen c57d308641 feat: Auto scroll CSS Value inputs when value is too long just by hovering with the mouse (#4502)
## Description

1. When not focused will scroll
2. Only active on fields with scroll potential

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

## Steps for reproduction

1. click button
3. 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:
0000)
- [ ] 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-12-04 21:39:20 +01:00
Bogdan Chadkin b2137c1a7c refactor: migrate dnd to new constraints (#4507)
Replaced legacy utilities with matchers

List item no longer possible to place into list item, thanks to new
parent matcher.

Dnd in navigator and on canvas can be tested
2024-12-05 00:24:23 +07:00
Ivan Starkov 9cf443a3c5 feat: Support new link selection in the text editor (#4509)
## Description

Same as #4505 but supports just created links too

ref #3994

## 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:
0000)
- [ ] 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-12-04 17:41:45 +03:00
Oleg Isonen f395bbedf9 feat: Make empty style panel sections easier to recognize as empty (#4497)
## Description

1. Its easier to scan the panel when titles are dimmed if there is
nothing in the content of that section
2. when section has nothing it shouldn't have a chevron on hover

<img width="252" alt="image"
src="https://github.com/user-attachments/assets/75bfb06e-ceec-4659-a836-02c8dacf8217">
<img width="250" alt="image"
src="https://github.com/user-attachments/assets/39ba04c8-7b2e-4099-83df-94567c963038">


## Steps for reproduction

1. click button
3. 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:
0000)
- [ ] 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-12-04 12:54:52 +01:00
Bogdan Chadkin 1a548226e6 experimental: show only block and ts children in navigator (#4506)
Ref https://github.com/webstudio-is/webstudio/issues/3994

<img width="279" alt="Screenshot 2024-12-04 at 17 32 32"
src="https://github.com/user-attachments/assets/277c7fbc-537a-459d-bab0-fbcb56c990b4">
<img width="284" alt="Screenshot 2024-12-04 at 17 32 41"
src="https://github.com/user-attachments/assets/8e1d870f-7751-441f-bb49-3da5180109cd">
2024-12-04 18:51:17 +07:00
Ivan Starkov 9806caa5d2 feat: Allow select link selector during text edit (#4505)
## Description

Before, there was no way to select a link inside the text on the canvas
in content mode (it was only possible through the navigation menu).
Now, when the cursor is over a link, it is displayed in the settings
panel.

This does not work with newly created links. Will do in the following
PR.



https://github.com/user-attachments/assets/7472bfd1-3cf7-4ad5-9d39-1bd2effdab26



## 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:
0000)
- [ ] 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-12-04 13:44:09 +03:00
Bogdan Chadkin 82d1bd255b build: bump dev deps (#4503)
- prettier
- vike
- vitest
- storybook
- eslint
2024-12-04 16:48:00 +07:00
Ivan Starkov bd3efe08e4 feat: Disable AI and Page Settings editing in Content Mode (#4504)
## Description

ref #3994


https://discord.com/channels/955905230107738152/1313579337940996096/1313591871926308914

## 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:
0000)
- [ ] 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-12-04 12:27:16 +03:00
Bogdan Chadkin 2d3d62ab75 refactor: add new insert constraints (#4499)
Here added new constraints format which will allow us build more
expressive lookups and matchers for internal logic and components
constraints.

For now added only ancestor, parent and self matchers with $eq, $neq,
$in, $nin operations.

Closes https://github.com/webstudio-is/webstudio/issues/2193 "$in"
operation works like "or".
2024-12-04 15:35:55 +07:00
Bogdan Chadkin e06de5322b refactor: add server as storage to sync engine (#4475)
Another layer in sync engine is composable storage.

Now you can specify a chain of storages. Each can listen transactions to
update some state. Though subscription for state is invoked one by one
until non-undefined is provided.

See tests to understand API.

Here I also migrated our server data loading and synchronization to this
storage api.
2024-12-03 21:43:39 +07:00
Jaya Krishna Namburu 05ab9cdc81 fix: truncate text for while showing text for padding and margin tokens (#4485)
## Description

fixes #4439 
While displaying tokens in the spacing section, it gets too cluttered if
the css-variable names are long. This PR will truncate text, to make it
less cluttered.
<img width="238" alt="Screenshot 2024-11-30 at 6 09 12 PM"
src="https://github.com/user-attachments/assets/864fdef7-84ae-4f95-8d5d-4a7863da8097">

## Steps for reproduction

- Create a super long css-variable.
- Now, use the variable for padding/margin.


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

## Before merging

- [x] tested locally and on preview environment (preview dev login:
0000)
2024-12-03 10:24:13 +05:30
Ivan Starkov 3a87233fd9 feat: Content Block publish component generator (#4495)
## Description

1 commit = fixtures
2nd commit = code changes
3rd = size changes

ref #3994

Publish result:
https://webstudio-fixture-project-a-0su3o.wstd.work/content-block

See fixtures for generated code.

## 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:
0000)
- [ ] 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-12-03 05:13:33 +03:00
Oleg Isonen 69fd8558a1 experimental: Set the menu items height along with the content mode shortcut and name (#4494)
## Description

- 24px height for menu items
- drive-by: content mode + shortcut cmd+c

## 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:
0000)
- [ ] 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-12-02 16:30:22 +01:00
Ivan Starkov 539e083256 fix: Show extended panels (#4493)
## 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:
0000)
- [ ] 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-12-02 17:36:16 +03:00
Oleg Isonen f837456d40 feat: Reset any css value when user deletes the input and hits enter (#4491)
## Description

closes https://github.com/webstudio-is/webstudio/issues/4481

## 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:
0000)
- [ ] 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-12-01 20:55:42 +01:00
Ivan Starkov 93fc476f8f fix: Collapsed state was incorrectly calculated in some cases. (#4492)
## Description

ref #3994

2 bugs:

1. Wrong calculation of 
```
Box
  Box display=contents
     Box
```

Example before this PR


https://p-882ed593-40cc-4382-b119-15c588d0ce6f-dot-main.development.webstudio.is/

<img width="1311" alt="image"
src="https://github.com/user-attachments/assets/0a036ed2-e054-41e6-9771-f8a655d1be7f">


Example After this PR

https://p-882ed593-40cc-4382-b119-15c588d0ce6f-dot-fix-collapse.development.webstudio.is/

<img width="1310" alt="image"
src="https://github.com/user-attachments/assets/368e12a3-0b9c-480a-ba43-b37b9a160469">

2. It was possible that Content Block was like
```
Box contents
  Box contents
```
what caused inability to find it position, outline and collapse
attributes

## 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:
0000)
- [ ] 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-12-01 18:56:06 +03:00
Ivan Starkov 71e0be8363 feat: Transform Plus button to Minus in case of Alt button is pressed (#4490)
## Description

ref #3994

<img width="260" alt="image"
src="https://github.com/user-attachments/assets/88652fef-7229-42cb-bf64-33ec07249426">

<img width="260" alt="image"
src="https://github.com/user-attachments/assets/e8199a7d-ebbc-4971-8641-d83424643ac8">

<img width="245" alt="image"
src="https://github.com/user-attachments/assets/804b8ef5-4f71-42b3-b9d1-5cf034706a02">


## 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:
0000)
- [ ] 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-12-01 18:29:13 +03:00
Oleg Isonen 2f15c2130e fix: flex dropdown items height consistency (#4488)
## Description

When I migrated to 24px inputs height, I forgot this one.

## 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:
0000)
- [ ] 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-12-01 11:35:44 +01:00
Ivan Starkov a66a674ad5 chore: Rename editable block component (#4489)
## Description

ref #3994

## 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:
0000)
- [ ] 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-12-01 06:02:09 +03:00
Ivan Starkov 974f6137f9 feat: Plus button hover polygon and menu icons (#4487)
## Description

ref #3994

Menu Icons are now from meta

<img width="229" alt="image"
src="https://github.com/user-attachments/assets/5e6e0fcd-6c1c-4eab-b493-94d70f2162f7">



Red is hover polygon (used to not lost hover) (small quad before was not
enough)

<img width="404" alt="image"
src="https://github.com/user-attachments/assets/0395d0db-3ec8-493f-b1b8-b40e117026e6">


<img width="383" alt="image"
src="https://github.com/user-attachments/assets/36544e8d-bda5-4a06-bfe4-a92d93247333">

<img width="417" alt="image"
src="https://github.com/user-attachments/assets/6ce49c43-cc37-4ba9-94cd-bb0bb6930253">


<img width="372" alt="image"
src="https://github.com/user-attachments/assets/8771b051-09a5-43fe-9903-5d8e60dc72a3">


## 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:
0000)
- [ ] 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-12-01 05:14:14 +03:00
Ivan Starkov d22dbd0718 feat: Allow delete/reorder Content Block children in Content mode (#4483)
## Description

In content mode children of the Editable Block can be reordered and
deleted now.

ref #3994 

## 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:
0000)
- [ ] 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-12-01 05:05:20 +03:00
Ivan Starkov 610f3e7048 feat: Reorder items in the build menu (#4484)
## Description

ref #3994

## 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:
0000)
- [ ] 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-11-30 18:12:02 +03:00
Bogdan Chadkin adadbe3aa2 refactor: enable isolated declatations in css data (#4476)
Moved transition related stuff into builder, simplified mdn-data and
added missing types to exports, removed popularity index.
2024-11-30 16:47:26 +07:00
Ivan Starkov aac3be5e08 feat: Add alt click (insert before) to editable block (#4479)
## Description

ref #3994

Add alt click (insert before)  to editable block

<img width="239" alt="image"
src="https://github.com/user-attachments/assets/933daab1-07d7-4300-8384-aa17442cca3e">

(Both Alt-click are supported, when opening menu, when clicking on menu
item even if menu was opened without alt)


## 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:
0000)
- [ ] 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-11-30 09:08:27 +03:00
Bogdan Chadkin 641619e4b4 refactor: remove instance selector from component hooks (#4469)
We need to remove reliance on instance selector iteration as much as
possible. In most cases we need only instance key which is a
JSON.stringify or instance selector to access computed props and
variables.

Here got rid of instance selector in component hooks and instead made
api to accept "instance data" with instance id, key and component
inside.
2024-11-29 21:23:24 +07:00
Bogdan Chadkin 09364f654c experimental: add shortcuts group to command panel (#4434)
Ref https://github.com/webstudio-is/webstudio/issues/1696

Added most of our shortcuts to command panel.

<img width="482" alt="Screenshot 2024-11-17 at 17 28 55"
src="https://github.com/user-attachments/assets/347f877f-43e5-4ab7-9061-a1728d5c9df8">
2024-11-29 20:20:19 +07:00
Ivan Starkov bbcdd2529c feat: Add Editable Block (#4468)
## 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:
0000)
- [ ] 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-11-28 04:46:31 +03:00
Bogdan Chadkin 6ed4b92e76 fix: stop rendering inherited styles in css preview (#4478)
Huge amount of css variables adds something like 8k of dom elements to
highlighted css preview.

Here as fast fix killed inherited styles so at least only root will lag
and everything else will not get performance hit.
2024-11-28 03:46:19 +07:00
Oleg Isonen 8c83b67cc9 experimental: Content mode icon and a new preview mode icon (#4473)
## 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:
0000)
- [ ] 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-11-26 20:13:52 +01:00
Bogdan Chadkin 260c903045 build: bump typescript (#4471)
Upgraded typescript to 5.7, removed it from packages to reuse from root
instead and fixed a couple of changes.
2024-11-26 11:59:07 +07:00
Bogdan Chadkin b8b489c93c fix: show flex child for collection item (#4467)
Fixes https://github.com/webstudio-is/webstudio/issues/4458

Collection is not stylable and was checked for display: flex but instead
should be skipped.
2024-11-25 12:13:32 +07:00
Bogdan Chadkin fd2bc2607d refactor: add more tests for nanostores sync object (#4457)
Cleaned up api a little and added more tests for nanostores sync object.
2024-11-24 21:29:04 +07:00
Bogdan Chadkin 766551fc0c refactor: stop importing remix overrides on canvas (#4466)
We want to decouple remix in cli and published sites from remix in
builder.

Here I stopped importing remix override components. So now we could
migrate CLI to react router without changes in builder.
2024-11-24 19:04:21 +07:00
Ivan StarkovandOleg Isonen 2acb4ac596 feat: Add Editable Block Component (#4437)
## Description

ref #3994 

Outline for content mode Editable Childs


https://p-64ece825-f290-4de0-8dac-223c8e88c258-dot-editable-block.development.webstudio.is/?mode=content

Like in notion if eny keyboard event is occured inside outlined block,
we hide it
Also + hovers are only on canvas

## 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:
0000)
- [ ] 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-11-24 10:04:09 +07:00
Bogdan Chadkin 7b7efd53a2 refactor: bump remix to 2.15 (#4462)
Last release before migrating to react router
2024-11-23 22:27:33 +07:00
Ivan Starkov c537a6a83d fix: Inifinite pending state for the "Build and download static site" button (#4460)
## Description

Cherry pick from release

## 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:
0000)
- [ ] 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-11-22 09:52:36 +07:00
Oleg Isonen eaf39c55be feat: make loading screen background dark (#4449)
## Description

A better looking loading screen

## 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:
0000)
- [ ] 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-11-21 17:09:08 +01:00
Ivan Starkov 7c3bf00dd0 chore: Use structured clone for transactions (#4456)
## Description

Fixes payloads with File Map Set etc.

## Steps for reproduction

Upload image. see it works

## 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:
0000)
- [ ] 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-11-21 21:57:07 +07:00
Bogdan Chadkin 6123a8ca74 build: upgrade devtools (#4455)
- storybook
- vitest
- eslint
- typefest
- types/node
- vike
- tsx
- pnpm
2024-11-21 21:06:22 +07:00
Bogdan Chadkin 524f83203e refactor: support nanostores as sync objects (#4454)
Here added support for syncing nanostores atoms
as sync objects. Had to add some tracking of update source though it
seems like a more solid solution than previous variant.

Need to test performance caz stores updates are now synchronous and not
debounced anymore.
2024-11-21 18:17:28 +07:00
Bogdan Chadkin 35ebd60b46 refactor: add sync object pool (#4453)
Sync client is getting some shape. Here I abstracted all immerhin
related api into SyncObject and added SyncObjectPool to combine multiple
objects. Objects are identified by unique name.
2024-11-21 10:41:51 +07:00
Jaya Krishna Namburu 9cdbf8108d fix: transition property selection when an exact property matched during search (#4450) 2024-11-21 08:50:39 +05:30
Bogdan Chadkin bf574fbc47 refactor: add new way to synchronize immerhin stores (#4451)
Here added SyncClient class which will be base for our new sync engine.
For now it can synchronize one immerhin store.

Event emitter is shared with canvas directly to avoid indirection of
iframe postMessage api.

This also partially fixes the issue with messages pollution and conflict
with react devtools.
2024-11-20 21:15:00 +07:00
Jaya Krishna Namburu 9ef2e1663a fix: show advanced options as highlighted for flex-sizing when used (#4438)
fixes #4408 

## Description

Fixes highlighting the advanced options icon, when advanced section is
used for flex-sizing.

## Steps for reproduction
- Add a element and set display to flex.
- Now add some child elements to the flex display
- Used advanced options from `flex-sizing` and set some custom values.
- Now, the `...` indicator for the advanced option should be
highlighted.


![fix-advanced-options](https://github.com/user-attachments/assets/342cc652-1534-43cf-aab9-af87d18f2114)

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - 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:
0000)
2024-11-20 11:09:30 +01:00
Ivan Starkov 145f8d9ed7 feat: Builder mode switch menu (#4423)
## Description

ref https://github.com/webstudio-is/webstudio/issues/3994

<img width="256" alt="image"
src="https://github.com/user-attachments/assets/ee37fe7d-41ed-40f3-909f-a29d12d07e4b">

## 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-11-19 21:04:18 +03:00
Bogdan Chadkin 1ac74854e8 refactor: bump to remix 2.14 (#4433)
Ref https://github.com/remix-run/remix/blob/main/CHANGELOG.md#v2140
2024-11-19 15:40:47 +07:00
Ivan Starkov 82785555fa fix: Page title field becomes unfocused after entering one character (#4436)
## Description

closes #4435

Cherry Pick from https://github.com/webstudio-is/webstudio/pull/4428

## 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-11-18 21:22:09 +07:00