Commit Graph
5484 Commits
Author SHA1 Message Date
Ivan Starkov ab2a985451 fix: Xml namespaces support (#4351)
## Description

closes #4343

## Steps for reproduction


https://p-cddc1d44-af37-4cb6-a430-d300cf6f932d-dot-sitemap.staging.webstudio.is/?pageId=FsnS9ui6btzM4W3YELE3Q&authToken=1cdc6026-dd5b-4624-b89b-9bd45e9bcc3d


<img width="423" alt="image"
src="https://github.com/user-attachments/assets/711bbda5-cf92-4421-853b-23eddcb8a8a7">


Resulting xml

https://webstudio-fixture-project-a-0su3o.wstd.work/sitemap.xml

```xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://webstudio-fixture-project-a-0su3o.wstd.work/</loc><lastmod>2024-05-07</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://webstudio-fixture-project-a-0su3o.wstd.work/en"></xhtml:link></url><url><loc>https://webstudio-fixture-project-a-0su3o.wstd.work/olegs-test</loc><lastmod>2024-05-07</lastmod><xhtml:link rel="alternate" hreflang="en" href="https://webstudio-fixture-project-a-0su3o.wstd.work/olegs-testen"></xhtml:link></url><url><loc>custom-hand-made-location</loc><lastmod>2020-10-10</lastmod><xhtml:link rel="alternate" hreflang="en" href="custom-en-location"></xhtml:link></url></urlset>
```

## 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-10-28 23:09:13 +03:00
Ivan Starkov afc77fa72a feat: Block editing with arrow keys (#4334)
## Description

- Double click now sets cursor to the click position
- Up/Down arrows on a first/last line trying to preserve cursor x
position (visible in case of block above block)
- Right/Left arrows switch blocks if cursor is at block begin/end.



## 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-10-28 19:44:08 +03:00
Bogdan Chadkin d61945402c build: upgrade to typescript 5.6 (#4345)
Only some apis added to types.
2024-10-28 12:17:43 +03:00
Bogdan Chadkin ac03a10a9a refactor: generate prisma before meigrating (#4349)
Forgot to test migrations with deleted `__generated__` folder
2024-10-28 11:43:51 +03:00
Bogdan Chadkin f987b50220 refactor: switch to lezer highlight (#4347)
We already use lezer code highlighting in codemirror. Here I replaced
prism.js with lezer for css preview as well.

Also switched theme in code editor to the same solarized light extracted
from thememirror.net.

Html highlighting is improved a little.
![Screenshot 2024-10-27 at 13 23
42](https://github.com/user-attachments/assets/2fc42a38-456e-4c8c-8f05-ea767c9e1a13)
2024-10-28 11:40:38 +03:00
Bogdan Chadkin 65b32e8a40 refactor: drop display: contents (#4348)
We have advanced panel which allows to set any value. No need to have
display: contents behind the flag anymore.
2024-10-28 11:07:08 +03:00
Bogdan Chadkin f48bfa4542 build: drop prisma build (#4346)
This shaves a few seconds from all GitHub actions
2024-10-26 19:09:13 +03:00
Bogdan Chadkin ac74d634ac refactor: bump ui libraries (#4344)
Here only patches with bug fixes. Shouldn't affect us. Bumping right
after release so we have time to tinker with UI.
2024-10-25 13:21:37 +03:00
Bogdan Chadkin ac2e8d9d1e feat: support editing sides in space and inset controls (#4341)
Here made space and inset controls to remember active properties when
open side input.

Test inset and space controls with alt and shift pressed.



https://github.com/user-attachments/assets/c6718245-9426-49ed-91a5-05f83c3ccb88
0.188.0
2024-10-25 11:38:14 +03:00
Bogdan Chadkin c7c9033d14 refactor: move sidebar panels into features (#4332)
This removes 2 levels of nested folders for 5 features. Will simplify fs
navigating a lot.
2024-10-25 01:09:26 +03:00
Bogdan Chadkin 119a36a3cf fix: forbid scrubbing css variables (#4340)
Css variables takes a lot of space inside of input and user need to have
text selection work natively. Scrub does not fit in this.
2024-10-25 01:05:32 +03:00
Bogdan Chadkin 54f6c1c953 fix: select "space" autocomplete with mouse (#4339)
Here fixed closing space popover before selecting value from
autocomplete with mouse.
2024-10-24 23:31:25 +03:00
Bogdan Chadkin 82c301372b refactor: remove css variables feature flag (#4337)
Css variables are landed. No need for conditional rendering.
2024-10-24 20:48:46 +03:00
Bogdan Chadkin 0c25e5028b feat: preview variable values in autocomplete (#4336)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Here added 2 things to improve accessibility of variables for users

1. Added color and unit values preview in autocomplete list
2. Color inputs no longer autocomplete unit values and unit inputs no
longer autocomplete color values.

![Screenshot 2024-10-24 at 00 40
15](https://github.com/user-attachments/assets/2406460c-ad68-4657-97ea-0abc4080ce2f)
![Screenshot 2024-10-24 at 00 35
49](https://github.com/user-attachments/assets/36c68bb7-9365-4914-bf3d-4324be7fae96)
2024-10-24 12:26:27 +03:00
Bogdan Chadkin c28faf27ab build: bump eslint (#4325)
eslint-plugin-react-hooks now works with eslint 9 and do not require
@eslint/compat wrapper.
2024-10-22 17:20:47 +03:00
Bogdan Chadkin 73dd80ae27 refactor: control floating panel open state (#4331)
Slightly change floating panel "open" state to make it controlled from
outside. This is important with form validations.
2024-10-22 15:33:08 +03:00
Bogdan Chadkin 7c23583b75 refactor: decouple features from sidebar (#4304)
Here removed reliance on sidebar from all its panels so we can store
them as features and not just panels.

This will greatly reduce folder nesting and simplify navigation from
command line.
2024-10-22 12:51:46 +03:00
Oleg Isonen 02551fa0c0 feat: improve vertical space usage (#4307)
## Description

- all inputs/buttons have now 24px height
- horizontal paddings on all panels are 12px, vertical 8px - optimized
for better vertical density
- drive-by: removed all old colors, now its all entirely based on
typography collection from figma and so we can now make dark mode
reality

## 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-10-22 01:58:06 +02:00
Ivan Starkov 73328b3dbc fix: Prevent tooltip on focus (#4318)
## Description

closes #4293

One of solution also
```
        onCloseAutoFocus={(event) => {
          event.preventDefault();
        }}
```

on dialog and popover content, but it's lost element focus.

This solution doesn't lost focus. Just prevent tooltip from being shown
on focus.


## 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-10-21 19:08:02 +03:00
Bogdan Chadkin e5a4b0e2c8 fix: expand border-bottom-left-radius from shorthand (#4326)
Overlooked
2024-10-21 16:42:25 +03:00
Bogdan Chadkin 5ee0860cd9 fix: show "delete variable" in variable tooltip (#4322)
Ref https://github.com/webstudio-is/webstudio/issues/3399

![Screenshot 2024-10-20 at 10 41
55](https://github.com/user-attachments/assets/d194cc13-efec-40fa-8021-13d2473188a1)
0.187.0
2024-10-21 14:18:58 +03:00
Bogdan Chadkin 257d760222 feat: support paste styles in advanced section (#4323)
Ref https://github.com/webstudio-is/webstudio/issues/3399
https://github.com/webstudio-is/webstudio/issues/3540

Here added two more features to advanced panel

1. When search for property, user can enter css declarations like
`width: 100px; height: 200px;` and press enter instead of searching for
property and editing property after creation.

2. When search for property, user can paste css declarations from some
theme editor or figma, this is useful interop with other tools

Note: this does not support breakpoints, states or tokens. Declarations
are inserted only within currently selected style source and state.


https://github.com/user-attachments/assets/1f37f5d1-11b9-4f05-ae4d-a7c647ae14b6
2024-10-21 12:07:24 +03:00
Bogdan Chadkin 4168a2dd80 fix: prevent creating css variable with invalid name (#4319)
Closes https://github.com/webstudio-is/webstudio/issues/4292

Here instead of validation error I just remove "create" option. It is
consitent with just random invalid name not starting with `--`.



https://github.com/user-attachments/assets/214b71b9-1b88-49de-8eb0-4e815c67486f
2024-10-20 13:12:21 +03:00
Bogdan Chadkin 8d7cf574fc fix: generate text-wrap-style: auto (#4321)
Fixes https://github.com/webstudio-is/webstudio/issues/4218

Turned out text-wrap-style got removed but supported alternative
text-wrap: wrap was not generated instead.
Now all should work.

Also removed invalid text-wrap-mode: auto
2024-10-20 11:50:41 +03:00
Bogdan Chadkin 325eff1469 feat: support css variables in transitions (#4317)
Ref https://github.com/webstudio-is/webstudio/issues/3399

- stop filtering when open combobox suggestions
- prevent showing selected description when highlight css variable
- support css variables in duration
- support css variables in delay

Also replaced select with css value input for easing. Had to get rid
from out easings presets though now we can use easings from css
variables which I think a better trade.

Presets will make sense with dedicated UI for easings like
https://www.easing.dev.

![Screenshot 2024-10-19 at 21 55
02](https://github.com/user-attachments/assets/4cdbb799-d01c-4c3f-93dc-c54e9723635e)
2024-10-20 10:30:28 +03:00
Ivan Starkov 8545ca7a94 fix: Infininite loop in backgrounds (#4299)
## Description

Just inifinite loop fix

## 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-10-19 16:30:02 +03:00
Ivan Starkov 32615ba44b fix: Canvas resize on Linux (#4310)
## Description


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

## 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-10-19 15:20:31 +03:00
Ivan Starkov 513d78681b fix: After modifying style, it takes two clicks to select the next instance (#4314)
## Description
Style Source looses focus after adding Token


closes #4309
closes #4306

## 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-10-19 15:14:35 +03:00
Ivan Starkov 309b6a8b27 fix: Hovering over autocomplete ignores actual input value (#4312)
## Description

closes #4301
closes #4308

## 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-10-19 15:00:46 +03:00
Ivan Starkov c9ce12c77b fix: Сombobox if the menu is opened using the up or down arrows, we want to display all items without applying any filters (#4311)
## 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:
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-10-19 13:35:00 +03:00
Bogdan Chadkin 6939a99759 fix: allow inserting into textual collection items (#4305)
Fixes https://github.com/webstudio-is/webstudio/issues/4294
2024-10-19 12:24:28 +03:00
Bogdan Chadkin 7d111f4428 fix: prevent failing navigator when instances are inconsistent (#4303)
Users somehow make instances tree inconsistent. For example deleting
instances does not delete id from parent children.

I still have not idea how to reproduce this but we need to stop failing
users with broken state. Here just logged into console instead of
throwing error.
2024-10-18 14:16:18 +03:00
Oleg Isonen 0f39f7ed4c feat: a new global root icon (#4298)
## Description

To symbolize global settings we are changing the icon

## 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-10-17 09:52:22 +02:00
Jaya Krishna Namburu b07b904bcd fix: show custom option in easing dropdow only when used (#4290) 2024-10-16 17:41:36 +05:30
Ivan Starkov 2337551767 fix: Fix multiline expression (#4297)
## 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:
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-10-16 14:25:54 +03:00
Ivan Starkov 17b3159c49 fix: Input arrow up and down pulls up autocomplete now instead of incrementing (#4291)
## Description

closes #4287

- [x] Up/Down now uses `onChange` instead of `onChangeComplete` (this
should be faster)
- [x] Up/Down in the Space control now works with modifiers (it seems
this never worked before)
- [x] Up/Down no longer opens the combobox if the input is
numeric-like​⬤

## 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-10-16 13:43:40 +03:00
Ivan Starkov 87e2a1ceb8 fix: Movement jumps on windows (#4296)
## Description

Seems like 
closes #4236

For me bug on windows looks a little bit different like a huge scrubbing
jumps. But anyway seems like fixed everything described in corresponding
issue.


## 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-10-16 11:38:41 +03:00
Oleg Isonen 89bca4d7d0 feat: Publish settings section in project settings (#4295)
Closes https://github.com/webstudio-is/webstudio/issues/4272

## Description

- I moved the only publish setting we have to a separate section, so we
can add more in the future.
- Added a settings button in publish dialog

<img width="625" alt="image"
src="https://github.com/user-attachments/assets/8c72028c-69e6-4fb6-849f-bdb9ee0594cc">
<img width="327" alt="image"
src="https://github.com/user-attachments/assets/70c892de-65ef-4962-a790-fb8c6e6b49e7">


## 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-10-16 10:33:32 +02:00
Bogdan Chadkin d29065b7fe build: publish 0.185.0 (#4286) 2024-10-14 22:13:18 +03:00
Bogdan Chadkin 3e056f9130 experimental: support css variables in shadows (#4283)
Ref https://github.com/webstudio-is/webstudio/issues/3399

![Screenshot 2024-10-14 at 20 13
34](https://github.com/user-attachments/assets/6518141b-b0f4-40e8-89db-7fcf68093ff6)
0.185.0
2024-10-14 21:36:15 +03:00
Oleg Isonen 994813dd99 feat: Switch to 1px outline for all inputs and buttons, as well as use background color in lists (#4276)
## Description

Most controls are affected 2px > 1px
Navigator and project settings lists now use background color instead of
outline

## 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-10-14 17:44:00 +02:00
Bogdan Chadkin fc14133f28 experimental: autocomplete variables in backgrounds code (#4281)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Using dedicated inputs to autocomplete variables makes UI more complex.
Though we already have "Code" fields which can be used for the same
purpose.

Here added css fragment editor to background gradient.

![Screenshot 2024-10-14 at 15 56
54](https://github.com/user-attachments/assets/2c41f3e7-9f79-46c3-92be-870f69ac515d)
2024-10-14 17:34:51 +03:00
Bogdan Chadkin 0e7125511b experimental: add more hints about css variables (#4282)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Added a few hints

![Screenshot 2024-10-14 at 16 12
07](https://github.com/user-attachments/assets/4a7cf0f8-9cd1-408a-9c16-6cb6c8d77970)
![Screenshot 2024-10-14 at 16 08
04](https://github.com/user-attachments/assets/7d4be8b3-596a-4d07-9761-0677f1acd40b)
![Screenshot 2024-10-14 at 16 07
56](https://github.com/user-attachments/assets/73facdda-724c-4ef8-935e-69cbd0775d6c)
2024-10-14 17:16:02 +03:00
Ivan Starkov 11f5450b9a fix: CSS unitless properties parsing (#4278)
## Description

ref #3399

## 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-10-14 13:51:24 +03:00
Ivan Starkov 80778e3405 fix: Style panel style value combobox doesn't close on ESC (#4277)
## Description

closes #4269

## 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-10-14 11:09:03 +03:00
Bogdan Chadkin af931ac3c0 experimental: improve repeated styles with css variables (#4275)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Here added a few improvements to repeated style to handle variables
properly. For now all changes affects only backgrounds section.

- single layer can use css variable with multiple gradients
- with multiple layers each can have css variable with single gradient
- when single variable inside multiple layers has multiple gradients all
thumbnails become transparent, it should be and indicator of invalid
gradients
- fixed toggling hidden considering variables
- fixed deleting layers considering variables
- now when single layer has variable with multiple gradients only first
gradient can be deleted or toggled
2024-10-13 22:19:47 +03:00
Bogdan Chadkin 4b9f2c3d1b experimental: show computes values in tooltip when alt is pressed (#4228)
Ref https://github.com/webstudio-is/webstudio/issues/3399

One of the worst thing with our internal theme is I don't know what
actual values used for example in theme.spacing[5] without going into
theme file.

Here added info about computed value in property tooltip. It computes
initial, inherit, unset, currentColor and css variables.


![Screenshot 2024-10-06 at 13 25
32](https://github.com/user-attachments/assets/741b65d1-bcb6-487a-a7fe-e576ad1a6fc2)
2024-10-13 16:58:32 +03:00
Bogdan Chadkin ebced4532a experimental: improve css variables parsing (#4273)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Here added support for parsing var() when paste styles and fixed cyclic
dependency when use the same var() a few times like `background-image:
var(--gradient), var(--gradient)`.
2024-10-13 15:28:38 +03:00
Ivan Starkov c1041f7eb5 fix: Form filters reset scroll position (#4267)
## Description

closes #4229

## Steps for reproduction

https://form-scroll-reset-iodju.wstd.work/?opt=c


## 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-10-12 00:48:05 +03:00
Bogdan Chadkin 1d9f2ad238 experimental: support css variables in transforms (#4270)
Ref https://github.com/webstudio-is/webstudio/issues/3399

![Screenshot 2024-10-11 at 23 34
48](https://github.com/user-attachments/assets/aade8738-3b52-4c22-aad0-1411d45bf1ef)


One thing I noticed, our implementation does not compose scale and
rotate well.
According to spec rotate should be computed before scale but in our
implementation rotate goes after scale.

https://www.w3.org/TR/css-transforms-2/#ctm
2024-10-12 00:03:39 +03:00