Commit Graph
5408 Commits
Author SHA1 Message Date
Bogdan Chadkin 07eaefa1fb fix: find proper drop target in collections (#4198)
Fixes https://github.com/webstudio-is/webstudio/issues/4192
https://github.com/webstudio-is/webstudio/issues/4202

Figured the way we address instances and render tree should be the same
to compute proper drop targets. As a result collection got extra level
of depth.

![Screenshot 2024-10-02 at 13 19
00](https://github.com/user-attachments/assets/9ff5b1ac-7515-41fc-a9f1-f9c77115ecb9)
2024-10-05 22:40:20 +03:00
Ivan Starkov 67892b0690 fix: Identifier names must not be reserved words (#4221)
## Description

- [x] todo use
https://github.com/sindresorhus/reserved-identifiers/blob/main/index.js

## 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-05 21:16:14 +03:00
Bogdan Chadkin 4a8a4a9a73 refactor: autocomplete variables lazily (#4220)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Here improved combobox component to accept
options factory instead of ready to use array.
This function is invoked only when combobox is open.

As a result each of 500 css variables will no longer subscribe to
available variables which should reduce scripting time and lagging.

Here's local test

![Screenshot 2024-10-05 at 02 03
02](https://github.com/user-attachments/assets/968b3123-9d02-4898-9f82-76a198b35577)

![Screenshot 2024-10-05 at 02 05
16](https://github.com/user-attachments/assets/610dbf7a-e142-4255-9c68-0085a2b40835)


Preview test

![Screenshot 2024-10-05 at 02 23
58](https://github.com/user-attachments/assets/fd8e4c91-3841-4a7e-b960-2763fe40a50a)
![Screenshot 2024-10-05 at 02 22
44](https://github.com/user-attachments/assets/3d7aa1c4-ce3a-4ab8-a36d-197888723c58)
2024-10-05 11:22:06 +03:00
Bogdan Chadkin 63460bd2cb experimental: support css variables in dedicated sections (#4212)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Added support for entering and autocomplete of css variables to
dedicated style sections like size and typography.

- color control
- text control

Also improved autocomplete to search with both var(--name) and --name.

![Screenshot 2024-10-04 at 01 51
12](https://github.com/user-attachments/assets/aca0f63d-8063-4676-877b-cc90e492ce9a)
2024-10-05 01:41:35 +03:00
Bogdan Chadkin 5bfdd683b3 refactor: enable isolated declarations in icons (#4208)
Enforced isolated declarations which requires annotating all inputs and
outputs for exports like flow enforced some time ago.
2024-10-04 20:44:35 +03:00
Oleg Isonen da7e9cdce7 experimental: support nested and attribute selectors (#4213)
## Description

Needed to support all wf presets for fixing this
https://github.com/webstudio-is/webstudio/pull/4155

## 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-04 17:23:09 +02:00
Ivan Starkov f1aa37cdfb fix: Skip unsafe attribute names on generation (#4216)
## Description

We can also do not skip but 
do `<Dom {...{"1unsafe": value}} />` 
BTW that looks useless.

closes #3573
closes
https://github.com/webstudio-is/webstudio-community/discussions/190#discussioncomment-10832279

## 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-04 17:55:09 +03:00
Bogdan Chadkin 0ceaac9ba8 refactor: improve advanced section performance (#4215)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Here did a few things to improve performance of advanced panel with
hundreds if css variables.

- remove unused dom elements
- replaced field-sizing polyfill with css property which is supported in
chrome since March

Here's perf stats from local test, both scripting and rendering cut 1s
each

![Screenshot 2024-10-04 at 13 31
13](https://github.com/user-attachments/assets/122969f4-1ed8-4cc5-a7e9-8070c6d9bf2d)
![Screenshot 2024-10-04 at 14 20
55](https://github.com/user-attachments/assets/ceff3221-4b63-4467-a7de-cd845e2b351a)

Here's the result in branch preview
![Screenshot 2024-10-04 at 14 30
19](https://github.com/user-attachments/assets/97939e31-9eba-465e-888c-ed89aa0d1205)
![Screenshot 2024-10-04 at 14 31
22](https://github.com/user-attachments/assets/dc3d116e-fef7-4e31-b054-17107e160590)
2024-10-04 17:17:41 +03:00
Ivan Starkov ab86c89cde fix: Unexpected end of JSON input in Webhook Form (#4214)
## Description

closes #4050

This PR modifies the response handling logic to attempt parsing all
resource data as JSON. If an error occurs during parsing, an error
response is only returned if the Accept header is explicitly set to
application/json.

204 responses are skipped too.


## 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-04 15:40:35 +03:00
Oleg Isonen 3d98a692d4 chore: faster font weight detection (#4211)
## Description

Using willReadFrequently option makes it 3-5 times faster

## 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-04 00:40:41 +02:00
Bogdan Chadkin 5a88b404c2 experimental: hide inherited root styles (#4210)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Root styles are bloating all instances
so as a temporary solution we do not show any styles inherited from them
in advanced panel.
2024-10-03 23:53:33 +03:00
Bogdan Chadkin 58df4bc3a9 experimental: show color picker in advanced panel (#4206)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Now users can tinker colors in css variables

![Screenshot 2024-10-03 at 14 47
26](https://github.com/user-attachments/assets/fc48334a-fc72-41ee-922b-1ae31039fe7a)
2024-10-03 19:47:39 +03:00
Oleg Isonen 5031292cca fix: fix color thumb vertical alignment (#4207)
## Description

Noticed this 1px misalignment because display inline-block is affected
by line-height.

<img width="55" alt="image"
src="https://github.com/user-attachments/assets/729e1a37-be3b-44dd-a672-855e6d87f4ad">

<img width="50" alt="image"
src="https://github.com/user-attachments/assets/f9930925-800c-4930-8a75-12383d8babe3">


## 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-03 16:40:44 +02:00
Oleg Isonen 9fd5ce0552 experimental: Abort controller (#4195)
## Description

I tried how the code will look like with abort controller, if you don't
like it - we can close this without merging


## 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-03 13:55:43 +02:00
Bogdan Chadkin 22e8f2b239 experimental: parse length and color in css variables (#4204)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Here improved parsing to automatically infer unit and color style values
in css custom properties.

This will let us in the future leverage strictly typed custom properties
for interpolation in animations.

Now the benefit is proper ui and filtering out unit in color pickers and
color in length inputs. Not implemented though yet.

![Screenshot 2024-10-03 at 13 31
20](https://github.com/user-attachments/assets/b32db3d3-8589-4cd4-b375-fb2036a308a0)
2024-10-03 14:44:50 +03:00
Bogdan Chadkin 1a4f663577 experimental: allow pasting styles into style source (#4200)
Ref https://github.com/webstudio-is/webstudio/issues/3399

He added support for paste style declarations into style source or
state. It will let us create collections of custom properties like open
props with a few clicks.

The downside is browser prompt with permission confirmation because we
use "unsafe" navigator.clipboard.readText() instead of paste event.



https://github.com/user-attachments/assets/8e0153b6-5b98-4f07-bb2c-aac6bc51c6d3
2024-10-02 18:26:32 +03:00
Bogdan Chadkin bbf37d3e61 refactor: simplify var value fallbacks (#4201)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Initially css variable fallback was defined in schema as array though
it's actually a single value by spec and may contain commas. We don't
have css variables in data yet so should be safe to change schema before
too late.
2024-10-02 18:05:05 +03:00
Oleg Isonen f4bd1d1a2a fix: avoid props autofocus (#4199)
Closes https://github.com/webstudio-is/webstudio/issues/3996

## Description

Auto focusing the first property value in settings when switching to
settings seemed like a good idea until the point if you leave settings
open and switch instances, you don't want that focus to be taken away
from navigator or anything else.

Seems like better to not have it autofocus at all in this case.

## 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-02 15:13:33 +02:00
Bogdan Chadkin ce475d4677 experimental: support copying root styles from marketplace (#4193)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Now we have a way to deliver custom properties to user projects.
2024-10-02 15:06:14 +03:00
Ivan Starkov 73a160186b fix: Unexpectedly losing focus while editing input fields. (#4191)
## Description

closes #4183


## 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-02 15:05:11 +03:00
Bogdan Chadkin 275ec4a91a fix: switch to available inspector panel (#4194)
Fixes https://github.com/webstudio-is/webstudio/issues/4190

Broke the logic of auto switching to first available panel.
2024-10-02 14:03:26 +03:00
Oleg Isonen 052fe9e55c feat: auto-detect font weight based on selected font family (#4134)
## Description

I rewrote the font weight display logiс in the following way:

1. We now detect for each font  which weights are supported
2. Unsupported weights are lighter gray in the list, but user can still
choose them, we just hint that the weight may not be supported, because
with font stacks, you can have different fonts supporting different
weights, we are testing the one user can see right now

## Steps for reproduction

1. try switching between different stacks and see that when hovering the
font width that is light gray, its not affecting canvas, meaning our
detection was correct and that weight is not supported
3. same thing for any custom font

## 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-01 22:55:10 +02:00
Bogdan Chadkin d74b3e6b65 refactor: remove deprecated tree (#4180)
We refactored both pages and navigator with new tree.
2024-10-01 18:49:07 +03:00
Ivan Starkov 75e1630147 chore: Upgrade postgrest (#4187) 0.183.0 2024-10-01 14:08:27 +03:00
Bogdan Chadkin c05ccdd851 experimental: generate root styles for published sites (#4177)
Ref https://github.com/webstudio-is/webstudio/issues/3399

- render layout hack (display: grid; min-height: 100%) as root preset
styles
- generate root user styles on published sites
- moved typography preset from body to the root
- bumped a couple of deps

<img width="240" alt="Screenshot 2024-09-28 at 23 25 08"
src="https://github.com/user-attachments/assets/eaf7476e-f488-4f1f-89db-6d464c05b35f">
2024-10-01 13:54:10 +03:00
Ivan Starkov 482839e83a chore: Remove prisma from the Builder app (#4182)
## 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-01 13:51:50 +03:00
Ivan Starkov 0765d38047 fix: User defined class name is not being escaped (#4185)
## Description
 
closes #4181

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-01 13:50:15 +03:00
Oleg Isonen 2c60a3eea4 fix: Fix font family bugs (#4184)
## Description

2 bugs are getting fixed here:

1. when opening fonts manager, we immediately set a value on blur, but
when font manager is open this should not be needed
2. when on blur and onhighlight (dropdown) value is set, its not being
parsed as css, so the entire stack: "Arial, Verdana, serif" becomes a
value in a stack {type: 'fontFamily', value: ['Arial, Verdana,serif']}
instead of {type: 'fontFamily', value: ['Arial', 'Verdana', 'serif']}

## 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:
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-01 10:08:59 +02:00
Bogdan Chadkin 6eae04dccc fix: generate hidden body correctly (#4179)
Here fixed rendering body with bound show prop.
2024-09-29 17:14:12 +02:00
Ivan Starkov d6e2177a40 fix: Collapsed recalculate loop during load (#4178)
## 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-09-29 13:57:29 +03:00
Bogdan Chadkin 84250f4cd8 experimental: add :root support (#4175)
Ref https://github.com/webstudio-is/webstudio/issues/3399

Now we have a way to change rem and define global css variables

- show root node in navigator behind flag
- show style panel when root is selected
- inherit styles from root
- show advanced styles defined on root in descendents
- show browser styles for root (`html { display: block }`)
- show initial values instead of `inherit` in root typography
- render root styles on canvas
- property label shows root as the source

Note: generated sites are not supported yet
<img width="825" alt="Screenshot 2024-09-27 at 19 24 41"
src="https://github.com/user-attachments/assets/4c17f86a-74d8-4518-8145-854dbdbee11a">

<img width="1304" alt="Screenshot 2024-09-27 at 19 09 51"
src="https://github.com/user-attachments/assets/6003fd49-5ecb-46cd-9df7-85c571f82e32">
2024-09-28 13:01:43 +02:00
Ivan Starkov 34cd2104d2 fix: canvas autoscroll issue when selecting instances (#4174)
## Description

closes #4169

## Steps for reproduction

Shoud be tested well as having various scroll/resize/mutation obserevers
we have, everything can cause infinite cycle

## 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-09-27 21:14:01 +03:00
Ivan Starkov 334caf4ec6 build: CLI release 0.182.0 (#4172)
## 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-09-27 20:52:28 +03:00
Bogdan Chadkin 671fdd50b2 refactor: reimplement navigator tree with new component (#4165)
Ref https://github.com/webstudio-is/webstudio/issues/3399

What to test

- hover
- select
- hiding (with show button) item should be transparent
- slot should be purple
- hide slot fragment
- render collections
- enter should trigger edit instance text
- support editing instance label with cmd+e
- should prevent dragging rich text child
- should prevent dragging non detachable instances (accordion header)
- should support reparenting after the last child
2024-09-27 19:33:00 +02:00
Ivan Starkov d7af39652a fix: DNS copy buttons don't trigger/show tooltips like "Copied" (#4160)
## Description

closes #4152

## 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-09-25 20:36:50 +03:00
Ivan Starkov 329ddea871 fix: Tooltip delay removed when doing things other than hovering over tooltip trigger (#4162)
## Description

closes #3477

## 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-09-25 20:36:29 +03:00
Oleg Isonen ae287ab66a fix: Fix scrolling for some users on Windows 10 + Chrome 129 (#4163)
Closes https://github.com/webstudio-is/webstudio/issues/4128

## Description

should fix both: style panel and canvas scrolling

## 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-09-25 19:15:05 +02:00
Oleg Isonen a0bce7284c fix: fix font family control when value is inherit (#4161)
## Description

Turns out value in controls can also be {type: 'inherit'}, not just type
fontFamily

## 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-09-25 16:37:01 +02:00
Ivan Starkov 6ba6fc5ce8 feat: Preview by publishing to subdomain only aka staging (#4143)
## Description

closes #2644

- [x] - Merge this https://github.com/webstudio-is/webstudio/pull/4156
into this PR

- If the user has no custom domains:
  - [x] Checkbox for Pro users is not shown.
  - [x] Checkbox for Free users is shown but disabled (Tooltip enabled).

- If the user has custom domains:
  - No Pro:
    - [x] Checkboxes are shown disabled with Tooltips.
  - Pro:
    - Users can select any checkbox (no Tooltips).

- Current indexing logic:
- If a user has custom domain(s), upon publishing, the `*.wstd.io`
domain will receive the meta tag:
    ```html
    <meta name="robots" content="noindex, nofollow">
    ```

- [x] - Fix example.com in tests (NEXT PR #4156) 
- [ ] - saas cleanup should be changed (we need to preserve latest build
by domain now) (NEXT PR)
- [x] - Disable Publish Button if no checkboxes are selected

- "With the Pro, you’ll gain the ability to publish to each domain
independently!"
<img width="477" alt="image"
src="https://github.com/user-attachments/assets/105577e5-318f-4146-a3eb-38c2117f6f79">

## Steps for reproduction

### Non Pro

- Login as a new non Pro User `pass:vaska@pupkin.ru`
- Create a new Project, Click Publish. Expect Disabled Checkbox with
Tolltip is visible. Publish is Enabled.
<img width="445" alt="image"
src="https://github.com/user-attachments/assets/e48654af-1969-4f96-b048-a3fa72303b8f">
- Publish, check it published.
- Add custom domain, Publish, check both are published.

### Pro

- Login as a Pro User `pass`
- Open new Project. Expect No checkbox. One wstd domain.
<img width="351" alt="image"
src="https://github.com/user-attachments/assets/c62f9ae5-669a-46ad-a2f2-32ba333068f9">
- Publish. Expect it published.
- Add domain. See checkboxes visible after domain activated.
- Publish. Expect both published.
- Uncheck checkboxes, see publish button disabled. See it has tooltip.



## 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-09-25 10:24:23 +03:00
Oleg Isonen 0ff51ebfad fix: allow user to define a custom font stack (#4153)
## Description

Previously defining a custom stack - comma separated list of fonts, was
broken, we only used the first font

## Steps for reproduction

1. comma separated fonts, more than one
2. see that its rendered in dev tools and that we don't add a default
fallback to it

## Code Review

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

## Before requesting a review

- [ ] 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-09-24 18:23:18 +02:00
Bogdan Chadkin 6e424c9a3f build: upgrade to storybook 8.3 (#4154)
The new version significantly reduced install size and got rid from a
lot of dependencies including codemod stuff.

See https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md#830
2024-09-24 11:41:14 +02:00
Bogdan Chadkin 8bd3897dae refactor: make new tree sortable (#4145)
Added dnd support for the new tree with pragmatic-drag-and-drop. Can be
tested in stories.
New drop indicator reuse pragmatic utility and much simpler to maintain
than previously used horizontal shift.



https://github.com/user-attachments/assets/f3cdd80f-0c2d-4f4a-a140-aee66ad8b29f
2024-09-23 21:20:37 +02:00
Bogdan Chadkin d48149fd60 fix: handle invalid or unknown properties (#4151)
Fixes the issue with non existent "before" and "after"
https://discord.com/channels/955905230107738152/1286696101076009031/1286696101076009031
2024-09-23 17:15:31 +02:00
Oleg Isonen adf473b403 chore: chanigng the amount of free custom domains to 1 (#4148)
## Description

Reason is that users are creating several accounts and with 5 per
account, they can easily get way too many custom domains for free.

## 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-09-23 14:26:13 +02:00
Bogdan Chadkin 632a9ee2e3 build: publish 0.181.0 (#4147)
Here fixed node version in publish dialog and published cli packages.
2024-09-23 13:15:42 +02:00
Jaya Krishna Namburu 41ef20fe43 fix: check for expanded templates when a template is selected from the cli init flow. (#4107)
fixes #4105 
## Description

This issue fixes picking the default vanilla template in the cli
init-flow. Right now, when a template is selected from the
`PROJECT_TEMPLATES` we are directly sending the value to `build`. But we
need to check for the `expanded` value of the template in order to pick
all the series of templates needed for the build.


## Steps for reproduction
- create a project in the editor.
- Now, create a share-link for the project and copy it.
- Run `webstudio` in your local terminal and then the cli prompts for
the URL, parse the url from the above step.
- Now, pick `Vanilla` as a template from the list of the templates.
- The project should build a vanilla template without any errors.

## Code Review

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

## Before requesting a review

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

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
2024-09-20 08:53:54 +02:00
Ivan Starkov 5370b7a409 fix: DNS, add public suffix support, remove 2 underscores from txt (#4124)
## Description

- [x] - Todo Backward compatibility in SaaS

ref #2744

closes #3124

Corresponding SaaS PR must be merged on Release

## Steps for reproduction

<img width="979" alt="image"
src="https://github.com/user-attachments/assets/ac73026d-610a-42b5-a493-a37442501d76">

<img width="339" alt="image"
src="https://github.com/user-attachments/assets/4e0061e5-6c83-482d-8c23-6b76063d93e0">

https://new-txt.poke-method.work/

See test for public suffix.


## 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-09-20 09:35:59 +03:00
Ivan Starkov ffa714736f chore: Fix prettier check (#4141)
## Description

main checks are  broken. 

## 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-09-20 09:30:05 +03:00
Bogdan Chadkin 8aa750de13 feat: make pages tree accessible from keyboard (#4132)
Added new implementation for tree component in design system which has
out of the box keyboard support without tying with dnd.

Now only home page is tabbable, all others are accessible with arrows.
Right arrow can both expand folder and access "settings" button. Both
left and right arrows are able to travel between folders/pages.

https://github.com/user-attachments/assets/8d3264ca-1069-4168-97d9-afd7bdd4759e
2024-09-19 22:35:26 +02:00
Bogdan Chadkin c664b5b7ce refactor: migrate transform panels to new style engine (#4118)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Switched translate, scale, rotate and skew panels to new style engine.
Simplified style updates.

<img width="286" alt="image"
src="https://github.com/user-attachments/assets/01e6b7cf-d3d9-430b-a1bd-efcd0db2b125">
<img width="257" alt="image"
src="https://github.com/user-attachments/assets/ede684ad-a029-4a03-9c1b-05878d4ba1f8">
<img width="264" alt="image"
src="https://github.com/user-attachments/assets/6270a781-b311-4759-a379-d9fe3627efd4">
<img width="253" alt="image"
src="https://github.com/user-attachments/assets/040d5463-38e0-4bf0-bf9b-c823a284a48f">
2024-09-19 22:09:29 +02:00