Commit Graph
5646 Commits
Author SHA1 Message Date
Bogdan Chadkin 2d7cfba8a4 fix: descendants constraint (#4609)
Forgot we have markdown embed. Now everything should work well.
2024-12-19 22:05:02 +07:00
Oleg Isonen 88217acc26 fix: hide background mode from the user in vimeo component (#4618)
## Description

This mode is a combination of loop and autoplay and controls, so one can
make it, currently its confusing because it doesn't affect these
controls when toggling it


## 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-18 19:00:07 +01:00
Oleg Isonen 7a1daca089 feat: Add export dialog to the menu, add shortcuts shift+P and shift+E (#4612)
## Description

- More discoverable export dialog access from the menu
- shift+P and shift+E shortcuts, same es webflow 

## Todo

- [ ] add the shortcuts to the docs

<img width="210" alt="image"
src="https://github.com/user-attachments/assets/e35c1725-067b-4ea1-8b6d-bb4afe5c9e66"
/>


## 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-18 11:51:00 +01:00
Bogdan Chadkin 1fd71f550a refactor: treat remix as runtime overrides for CLI (#4598)
Here removed remix sdk from builder and moved all extra props and meta
to react sdk. This completely decouples components from remix
implementation so we can map other frameworks to these props.
2024-12-18 17:07:03 +07:00
Bogdan Chadkin 0fa310b69f refactor: add instance path (#4614)
Ref https://github.com/webstudio-is/webstudio/issues/4364

The new $selecedInstancePath is a list of co-located instance and its
selector from selection until the root. It allows to skip the knowledge
about missing collection item and removes boilerplate of resolving
"instance" from selector.
2024-12-18 17:00:42 +07:00
Oleg Isonen 7c283a58f4 fix: small css fixes (#4605)
## Description

- background content toggle group width of the buttons
- commands ui input vertical alignment
- extracted controlHeight into theme, because 24px height for all
controls is our main value

## 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-17 12:16:24 +01:00
Bogdan Chadkin 7f7a8fd9de refactor: split jsx testing utils into template package (#4604)
We can start using testing utilities for components meta. It will
drastically simplify maintenance of components, already works pretty
well for tests.

Here just replaced @webstudio-is/sdk/testing with
@webstudio-is/template.
2024-12-17 16:54:13 +07:00
Bogdan Chadkin c768f11f99 refactor: fallback missing pages to home page (#4600)
See
https://discord.com/channels/955905230107738152/1318274135679438959/1318274135679438959

With undo current selected pages can be deleted
though we do not have a logic reverting selected page or instance.

So here is quick fix to always fallback to home page if pageId in url
references missing page.
2024-12-17 16:50:27 +07:00
Bogdan Chadkin 7e414f9c64 fix: stop requiring dialog title and description (#4603)
Ref
https://discord.com/channels/955905230107738152/1318292995023306803/1318292995023306803

Here removed constraints for dialog title and dialog description in
dialog content. Users often delete them though radix starts throwing
warnings about it for a while now.
2024-12-17 16:45:54 +07:00
Oleg Isonen b839e3fa4c fix: improve complex value detection to show maximize button (#4602)
## Description

Added a bunch of other value types for which we show maximize button in
css value input

## 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-17 10:00:50 +01:00
Ivan Starkov 916d59f1ab fix: Pasting gradient into color field breaks CSS parser (#4593)
## Description

closes #4578

## 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-16 15:46:20 +01:00
Oleg Isonen c779a8ec9e experimental: Commands UI design tweaks (#4594)
## Description

- Bigger border radius for the dialog and floating panels as well for
consistency
- Bigger search container height, same as titles in dialogs

## 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-16 15:29:17 +01:00
Bogdan Chadkin 9dd1d8979b experimental: add wrap/unwrap commands (#4588)
Ref https://github.com/webstudio-is/webstudio/issues/1696
https://github.com/webstudio-is/webstudio/issues/4356
https://github.com/webstudio-is/webstudio/issues/3981

Added following new commands

- wrap in box
- wrap in link
- unwrap

All three follow constraints and prevent unwanted wrapping and
unwrapping for example wrap in link will not wrap a text with link or
list with list item cannot be unwrapped.

<img width="420" alt="image"
src="https://github.com/user-attachments/assets/698168e1-d583-43e1-b6f7-bd0185cad7df"
/>
2024-12-16 17:33:22 +07:00
Ivan Starkov b52ae7676b fix: Empty description space for color-inputs in the combobox (#4591)
## Description

closes #4585

Do not show description panel if zero descriptions are available

## 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-16 12:48:26 +07:00
Bogdan Chadkin 58e614306b refactor: drop preset tokens (#4577)
We stopped using them long time ago. Better remove now.
2024-12-16 12:40:13 +07:00
Ivan Starkov c9b7cdc705 fix: Code Mirror autocomplete click closes popovers and dialogs (#4583)
## Description

closes #4573

## 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-16 11:10:58 +07:00
Oleg Isonen 215034f4d8 feat: Allow maximizing CSS value for complex values (#4566)
## Description

When the value is not a simple keyword or unit, we now show a maximize
button in the css value input and that lets you edit comfortably a long
value.

When dialog gets closed, value gets applied.

## 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-15 21:35:04 +01:00
Oleg Isonen 987740c5e8 chore: Use sidebarWidth variable everywhere (#4587)
## Description

We need to make the dependency on 240px size more clear, its the sidebar
width

## 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-15 11:22:50 +01:00
Jaya Krishna Namburu c226e7b31d fix: multiple property reset when using shortcuts on toggle groups (#4584)
## Description

fixes #4411 
When `PropertyLabel` is used inside `ToggleGroupControl` if we don't
stop after handling the reset. The event keeps bubbling up and effect
the reset shortcut handler of `ToggleGroupControl` and ends up resetting
the whole group.

## Steps for reproduction

- Add a `div` and make the parent's display as `flex`
- And now add some values for `sizing` under the `flex-child`. 
- Click on advanced option, and use `Alt + click` on any of the property
label.

More details about reproducing are here #4411 

## 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")
2024-12-14 10:04:17 +01:00
Bogdan Chadkin e703bf8926 refactor: drop detect-font (#4581)
Looks like we don't use it for a long time.
Browser style is used only to convert keywords into unit values.
2024-12-13 23:33:52 +07:00
Bogdan Chadkin 302f5daa7f refactor: hardcode asset and upload path in builder (#4579)
We hardcoded asset base url in image loader.
Though locally different one is not resolved properly. So aligned local
and deployed image paths with /cgi/asset/ everywhere. Images are now
uploaded to public/cgi/asset locally.
2024-12-13 23:18:22 +07:00
Ivan Starkov 4034b401c3 fix: CSS Select menu jumping (#4575)
## Description


https://discord.com/channels/955905230107738152/1115982879651016814/1316758494191419393

## 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-13 22:58:41 +07:00
Bogdan Chadkin 1f3e8a68b2 refactor: bump uno (#4576)
Nothing critical. Api is not asynchronous. Oklch is used by default
though I opt out into legacy color space which is supported by our
parser.
2024-12-13 18:36:24 +07:00
Bogdan Chadkin a02e9d1afe refactor: prepare react 19 types (#4553)
React 19 simplified ref object story, moved JSX from global into react
package. Here prepared our code to not refactor too much in packages
bump.
2024-12-13 16:20:54 +07:00
Oleg Isonen 64b8abbb61 fix: fix ai button aspect ratio (#4574)
## Description

AI Button  in the AI toolbar got into elliptic shape by accident

## 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-12 22:17:24 +01:00
Bogdan Chadkin cfeb75c876 refactor: replace detachable: false with constraints (#4548)
Here got rid of detachable flag in favor of more universal constraints
queries.

Despite of detachable constraints allow to drag such nodes but limits
drop target more precisely.

Try any radix component.
2024-12-13 00:55:36 +07:00
Ivan Starkov b867e67a91 feat: Experimental INP fix (#4560)
## Description


https://vercel.com/blog/demystifying-inp-new-tools-and-actionable-insights

## new 
https://inp-inp-inp-inp.wstd.work/

## prev
https://no-inp-no-no.wstd.work/

## 20x slowdown new (click)
<img width="323" alt="image"
src="https://github.com/user-attachments/assets/08b063f6-93a3-4e2b-8e5d-e9521f97a40d"
/>
## 20x slowdown new (keyboard)
<img width="305" alt="image"
src="https://github.com/user-attachments/assets/3a1bb563-392f-40d9-9067-7cb085adcedd"
/>


## 20x slowdown old (click)
<img width="308" alt="image"
src="https://github.com/user-attachments/assets/41ff36cd-bd27-4e5d-b569-9040ce12b845"
/>
## 20x slowdown old (keyboard)
<img width="304" alt="image"
src="https://github.com/user-attachments/assets/4cc41ef9-f6d1-4e2a-ad41-de601d713bc9"
/>



## 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-12 16:43:24 +03:00
Ivan Starkov 8cd3dc3c8d fix: Pressing Escape during component dragging makes the canvas unselectable. (#4571)
## 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-12 14:33:20 +03:00
Ivan Starkov 5de42b2d02 fix: Ensure outline stays within canvas bounds (#4570)
## Description

Playground


https://p-183a0702-0620-49ac-84b6-066dbce1d300-dot-fix-outline.development.webstudio.is/


<img width="1229" alt="image"
src="https://github.com/user-attachments/assets/5c6a8c73-70e6-48af-8cbd-6c12144d55ee"
/>

todo:
- [x] - fix if horizontal scroll 
<img width="629" alt="image"
src="https://github.com/user-attachments/assets/d904d7ac-f74a-4116-993f-00b8b14c39dd"
/>

- [x] - fix if vertical

## 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-12 13:09:51 +03:00
Bogdan Chadkin a82ee06fb3 refactor: remove assetBaseUrl from image loaders (#4569)
Asset base url is now automatically added by builder or component
generator and passed to loader as is.

Saas loader removes /cgi/asset when detected.
All other loaders just use full relative path without changes which
simplifies them a lot.
2024-12-12 15:22:25 +07:00
Bogdan Chadkin 78d98a5519 refactor: pass wsImageLoader directly (#4567)
Split our saas image loader into separate function which is passed
directly everywhere without createImageLoader.
2024-12-12 13:56:46 +07:00
Bogdan Chadkin 729978a78e refactor: drop image base url from cli and templates (#4563)
In all cli templates asset base url and image base url are the same so
we can safely switch.

Removed image loader from prebuild.ts.

Dropped imageBaseUrl from sdk react context.
2024-12-12 11:43:18 +07:00
Ivan Starkov 8733d132f6 fix: Combo mouse select is not working (#4564)
## Description

I'm afraid that fix can introduce new bugs.
Must be very carefully tested.

Also fixed jumps



https://github.com/user-attachments/assets/33af39d4-7ac1-4eb7-8c49-c474f6a9aae7



## 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-12 06:01:09 +03:00
johnsicili ea30909e78 chore: add ascend and financeflow to trpc (#4565)
FinanceFlow
e761178f-6ac6-47f6-b881-56cc75640d73

Ascend
ef82ee51-e4d6-4a69-a4cc-7bf1dee65ed7

## 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-11 20:28:57 +01:00
Bogdan Chadkin f7f98b6f4b refactor: drop image base url from builder (#4556)
Builder rely on cloud based image resolution which does not require
additional configuration. Here I dropped IMAGE_BASE_URL env and replaced
bypassing it to loader with loader default.
2024-12-11 22:48:23 +07:00
Ivan Starkov 724dab8f31 fix: Radix components bugs during edit (#4558)
## Description

Also small fix of collapsible calculations.

## 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-11 18:14:55 +03:00
Bogdan Chadkin 8115ee9e55 fix: show whole block tree to support radix components (#4555)
We decided to show whole block tree so clients could open popover or tab
content and edit text inside.

<img width="282" alt="image"
src="https://github.com/user-attachments/assets/36d872f2-15f5-4fd5-98aa-e3a644883cf1">
2024-12-11 22:10:40 +07:00
Bogdan Chadkin 18082cb69f fix: relax list item constraint (#4554)
Latest constraints improvements let us support direct child constraints.
Which can be useful for very coupled components. Though in case of list
and list item should be avoided because list item can be used inside of
slot and collection.

Perhaps eventually can be fixed with tag matchers.
2024-12-11 18:41:32 +07:00
Bogdan Chadkin 823843845a fix: navigator dnd bugs (#4546)
- fixed dropping into non-container instances (like image)
- fixed dropping instances from another block
2024-12-10 16:48:32 +07:00
Ivan Starkov 1d2138a26d fix: Fast switch between selected instances (#4545)
## Description

Removes display etc fast switching changes on instance change. 

## 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-10 12:13:11 +03:00
Bogdan Chadkin 4c04c36bcd experimental: support navigator dnd in content mode (#4542)
Ref https://github.com/webstudio-is/webstudio/issues/3994

- upgraded pragmatic-drag-and-drop
- fixed extra level in collections and slots
- render placeholder properly in content mode
2024-12-10 14:07:40 +07:00
Ivan Starkov 22633eb7c2 fix: Reduce amount of draw on resize (#4544)
## 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-10 09:37:33 +03:00
Ivan Starkov cd4041e0d1 fix: Speedup resize, part 1 (#4543)
## Description

Removes rerender of the whole builder during resize.

Still some debounced resize of style panel etc exists. But will
investigate in following PR

## 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-10 12:18:06 +07:00
Oleg Isonen a3d9ac449f feat: Change spacing alt-click behavior to reset only one value (#4540)
## Description

- When using alt modifier, on a spacing value, currently you can't reset
one value only, you would reset the opposite value too.
- When alt-click happens outside of label-button, no reset should happen
- when using input in spacing, hodling alt/shift and then pressing enter
allows to set opposite and all sides

## 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-10 01:03:30 +01:00
Oleg Isonen 7f09077b7d chore: Update Colors (#4541)
## Description

Used lighter, colder background colors

## 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-09 16:31:13 +01:00
Bogdan Chadkin c896006fe3 refactor: enable isolated declarations for image package (#4500)
React components need to be annotated with ForwardRefExoticComponent
until we migrate to react v19
2024-12-09 14:49:29 +07:00
Bogdan Chadkin dad162cc23 fix: stop duplicating required children on reparent (#4537)
Turns our delete does not clear instances when detachable check fails.
Good news: new child constraints were added only to tabs. Bad news: I
think deleting pages kept instances in the build, oops.

Fixed reparent and added checks for delete only where necessary.

How to test

- insert tabs content
- delete second trigger and content
- reposition trigger
- it is duplicated
2024-12-09 01:05:24 +07:00
Bogdan Chadkin fb2c6b57cc refactor: improve constraints errors (#4535)
Now errors are toasted when insert or paste anything. Legacy constraints
are removed from components.
2024-12-08 21:39:15 +07:00
Ivan StarkovandOleg Isonen 0dbdbe624c feat: Add new button mode switch button (#4532)
## Description

ref #3994

<img width="256" alt="image"
src="https://github.com/user-attachments/assets/18e74c3a-9bc9-4de0-aae3-df943ba708a4">

<img width="223" alt="image"
src="https://github.com/user-attachments/assets/82c65222-c07f-406e-bdce-a208ae898b27">

<img width="223" alt="image"
src="https://github.com/user-attachments/assets/262fc4f0-0a33-49f3-aa7b-656f4ae8d849">
<img width="223" alt="image"
src="https://github.com/user-attachments/assets/552620a1-1259-4ed0-9a60-03d4c24b98b1">


## 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-12-08 17:35:53 +03:00
Ivan Starkov c3e0a6aa63 fix: Do not show empty content blocks in preview mode (#4533)
## 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-07 20:30:18 +03:00