1578 Commits
Author SHA1 Message Date
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
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
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
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
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
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
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
Ivan Starkov f653a116e7 chore: Update fixtures date (#4138)
## 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-19 23:08:58 +03:00
Ivan Starkov 3434322cb0 chore: new Domain publish prepare steps (#4125)
## 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-19 09:50:29 +03:00
Oleg Isonen 78895137de feat: Open the page settings in one click or key press from the top bar (#4126)
## Description

I noticed people are annoyed by the need to click the pages first, then
find the right page and click settings in webflow
https://x.com/thepixelgeek/status/1833583918756597875

While this is an advanced need and bloating the UI is not very good,
there must be a way to do this, so I added a modifier.

Now you can hold alt/option modifier + click or enter on page button in
the top bar and its going to open the navigator and

Demo: https://share.descript.com/view/mzqZLue17q7

Todo

- [ ] add this shortcut to shortcuts doc

## 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-18 21:58:13 +02:00
Oleg Isonen 30981bd019 feat: add modern system font stacks (#4123)
Closes https://github.com/webstudio-is/webstudio/issues/4121

## Description

We discovered this repository of awesome system fonts with fallbacks,
well organized.

https://github.com/system-fonts/modern-font-stacks

Assumption here is that most people don't actually need a very specific
font rendered, but rather need a type of a font and they are perfectly
fine with fallbacks, but without this awesome, tested fallbacks list,
how can you know which fallback to use.

With this we will encourage more people to use system fonts.

<img width="482" alt="image"
src="https://github.com/user-attachments/assets/2253c198-284b-4e3e-bbc2-44fa9af3c14b">


## 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-18 21:51:08 +02:00
Bogdan Chadkin dcc75c1fd5 refactor: rewrite backgrounds section with repeated style (#4112)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Switched to new style engine and repeated style component for
backgrounds section. A lot of utilities are replaced with more generic
solution.
<img width="251" alt="Screenshot 2024-09-12 at 10 23 07"
src="https://github.com/user-attachments/assets/75dcff67-4754-4a6b-98e8-760d1efa58e6">
2024-09-17 13:59:21 +02:00
Bogdan Chadkin 57465900c4 refactor: merge tree and navigator tree (#4122)
Separated navigator tree configuration into 2 modules complicated any
improvements. Here merged into single module.
2024-09-15 20:00:48 +02:00
Bogdan Chadkin c81b3d502f experimental: add css custom properties support to advanced styles (#4117)
Ref https://github.com/webstudio-is/webstudio/issues/3399

- added custom properties autocomplete in advanced styles
- fixed unit value detecting to not break var()
- show inherited custom properties in advanced styles
- dropped "types" from properties meta
- parse not top level var(), for example inside layers or function as
unparsed for now

<img width="239" alt="image"
src="https://github.com/user-attachments/assets/640690d4-a52e-43a4-a3a2-6032d30c600f">
<img width="871" alt="Screenshot 2024-09-12 at 21 53 38"
src="https://github.com/user-attachments/assets/f50e52a6-1307-4554-9ee2-cb2f20dd0e2c">
<img width="862" alt="Screenshot 2024-09-12 at 21 53 47"
src="https://github.com/user-attachments/assets/09788e29-df58-41ee-a96e-c28c4006dabb">
2024-09-14 01:37:10 +02:00
johnsicili db98c22b5c fix: robots.txt to allow login and nothing else (#4110)
Login was blocked with current rule set and order. I don't know of any
other URLs that should be allowed.

## 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-13 10:33:51 -07:00
Bogdan Chadkin 13e9e7b3a3 fix: use backdrop-filter styles in section (#4116)
Fixes
https://discord.com/channels/955905230107738152/1283966766258585621/1283966766258585621

Accidentally made "backdrop filters" section to render "filter" styles.
2024-09-13 12:17:30 +02:00
Ivan Starkov 02269af49d fix: Inserting Slots within Slots from the Marketplace causes infinite loop and crash (#4113)
## Description

closes #4111

- [x] - Fixes client side
- [x] - Fixes server side


https://github.com/user-attachments/assets/8bb6ffdc-2e78-45eb-b98b-e697daee822a

## Steps for reproduction

Now seems like impossible to save broken project. Tested locally on
broken project.


## 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-13 12:32:07 +03:00
Ivan Starkov 8b05d2c7f1 chore: Fast project opening (on subsequent openings) (#4100)
## Description

https://fast-open.development.webstudio.is/error?development-error=0
https://fast-open.development.webstudio.is/error?development-error=1
https://fast-open.development.webstudio.is/error?development-error=2
https://fast-open.development.webstudio.is/error?development-error=3
https://fast-open.development.webstudio.is/error?development-error=4
https://fast-open.development.webstudio.is/error?development-error=5

## 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-13 10:51:00 +03:00
Bogdan Chadkin 323ac058c9 experimental: migrate advanced section to new style engine (#4114)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Switched advanced styles to new style engine which will unlock css
variables support I will add in the next PR.

<img width="340" alt="Screenshot 2024-09-12 at 17 31 28"
src="https://github.com/user-attachments/assets/f8ab144d-2267-480c-a82a-9de936a29094">
2024-09-12 22:14:57 +02:00
Bogdan Chadkin 39c9bb2172 experimental: migrate background content to style object model (#4108)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Refactored background content popover and all its controls with style
object model.

Added out of the box repeated style support to select control.

<img width="528" alt="Screenshot 2024-09-11 at 14 28 30"
src="https://github.com/user-attachments/assets/56630834-4556-4a86-858d-fc108362d7a6">
2024-09-12 00:36:09 +02:00
Ivan Starkov edae537eda fix: Add CSP frame-src support for Entri (#4109)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

<img width="1659" alt="image"
src="https://github.com/user-attachments/assets/900b76ac-48bd-4113-aa5e-2e066283a604">

## 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-11 16:43:39 +02:00
Ivan Starkov 8f48a7bb79 fix: Disable auto-freezing for Safari structuredClone compatibility in sync-stores (#4106)
## Description

structuredClone fails sometimes on frozen objects

## 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-11 17:15:57 +03:00
Oleg Isonen 5343181c69 fix: fix integration templates insertion (#4104)
## Description

Previous change broke insertion of integration templates

## 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-10 21:13:57 +02:00
Bogdan Chadkin 534f4b2c56 experimental: migrate image control to style object model (#4102)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Refactored image control to maintain styles internally. Important to not
this is the first repeated style control. It accepts property and
additionally index of repeated style. Would work with future sections
like mask-image

We can also improve it to support both singular and repeated styles in
the future.

<img width="231" alt="Screenshot 2024-09-10 at 19 52 17"
src="https://github.com/user-attachments/assets/a0d27b1b-ae72-4454-b31e-d1f5af3bc4d1">
2024-09-10 20:29:25 +02:00
Bogdan Chadkin 90c62d1a11 experimental: migrate filter sections to style object model (#4097)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Refactored filter and backdrop filter sections with repeated styles.
Added tests for repeated style operations and added support for tuple.
Got rid of legacy "style layers list" as no longer used anywhere.
2024-09-10 12:26:37 +02:00
Bogdan Chadkin 54b6fd059c experimental: migrate shadows sections to style object model (#4092)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Refactoed box shadow and text shadow sections with "repeated style"
control and switched to new style engine. Simplified layer label logic.
2024-09-09 14:26:06 +02:00
Bogdan Chadkin 5d206b2e93 experimental: migrate typography section to style object model (#4091)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Smooth migration, slightly tweaked advanced typography layout.
2024-09-09 12:35:39 +02:00
Bogdan Chadkin e6b1d55e29 refactor: add repeated style utils (#4086)
Here replaced utils for adding and editing transitions with generic ones
which should cover cases for most other sections.

Can be tested adding and editing transitions and code
2024-09-09 12:30:21 +02:00
Bogdan Chadkin 288c9399da feat: forgive semicolon in css value inputs (#4090)
Closes https://github.com/webstudio-is/webstudio/issues/4075

<img width="256" alt="Screenshot 2024-09-08 at 16 57 17"
src="https://github.com/user-attachments/assets/d3a3ab56-244c-4111-be7e-4fc08c01027a">
2024-09-09 12:25:46 +02:00
Oleg Isonen 3d6d2ad4be fix: fix color control spacing, border and accessibility (#4089)
Closes https://github.com/webstudio-is/webstudio/issues/1244
## Steps for reproduction

1. see even outer spacing 
<img width="53" alt="image"
src="https://github.com/user-attachments/assets/39967869-4ada-4bd6-a687-7f465e64f277">
2. see border appears when color nears white but doesn't show up when
color is far from white
3. See that you can focus color swatch with keyboard arrows
4. See that keyboard enter opens the color picker
5. See that transparent chessboard pattern still works


## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
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-08 16:37:51 +02:00
Bogdan Chadkin ff9630b07a fix: delay showing tooltip in toggle group (#4088)
Ref https://github.com/webstudio-is/webstudio/issues/4087
2024-09-08 12:26:49 +02:00
Bogdan Chadkin 51d2e3e3e9 experimental: migrate transitions to style object model (#4084)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Here migrated transitions section to new style engine along with
"repeated style" control.

Changed behavior of transition code blue to write non-ephemeral changes
caz ephemeral do not have enough visual feedback.

Note: review with hidden spaces
2024-09-07 23:18:16 +02:00
Ivan Starkov 9348ce0af0 fix: Image upload via share link (#4083)
## Description

Use authToken token implicitly. Except queue cases like image upload and
patches.

## Steps for reproduction

Open any project with build or admin share link, upload image.

https://p-a82eaa2b-698e-4d3f-aa46-d4f3eee05fe0-dot-img-fix.development.webstudio.is/?authToken=a74ddf79-2638-47af-9dd1-e62f78187a8d&mode=edit

<img width="1025" alt="image"
src="https://github.com/user-attachments/assets/1de48271-f8c3-4df8-aa51-e61d74eb5c32">


## 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-07 18:43:03 +03:00
Oleg Isonen c64917aec3 fix: fix comma parsing in style value and support comma in numbers with math expressions (#4081)
## Description

Fixes a number of style panel value parsing errors:
- `transition-duration: 1s, 2s;`
- `width: 1.5px + 1.5rem`



## 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-07 15:17:26 +02:00
Ivan StarkovandOleg Isonen 50ff477c97 fix: Project Cloning Broken for Share Links (#4071)
## Description

closes #4068

<img width="267" alt="image"
src="https://github.com/user-attachments/assets/ba0d6287-1391-4f03-b513-cdd07a180a11">

AuthorizationContext - splitted on 4 types, user, token, service,
anonymous (before was a mix making it hard to understand permissions)

Clone - needs 2 contexts source and destination.



## Steps for reproduction

- **Log in as "Vasya Pupkin".** 
  `5de6:vasya@pupkin.com`
- **Create a project.**
- **Generate a ShareLink.**
- **Copy the ShareLink.**

`https://p-636d568a-0a42-43d7-9509-8b23607cd5e8-dot-clone-project.development.webstudio.is/?authToken=da7ef507-c91b-4393-a1fe-91848ba533c9&mode=preview`
- **Log out.**

---

- **Log in as another user.**
- **Paste the ShareLink then clone the project.**
- **See title etc in clone dialog**
<img width="588" alt="image"
src="https://github.com/user-attachments/assets/0a04ae59-548e-48ca-871c-d01c91778194">
- **Log out.**

---

- **Paste the ShareLink then clone the project.**
- **Login process**
- **See title etc in clone dialog after the login**
<img width="588" alt="image"
src="https://github.com/user-attachments/assets/0a04ae59-548e-48ca-871c-d01c91778194">
- **Log out.**

---

- **Paste ShareLink in the, go to the menu and copy the clone link.**
<img width="417" alt="image"
src="https://github.com/user-attachments/assets/5f2911c1-721c-4c36-8ad7-b91052c9f9c1">


`https://clone-project.development.webstudio.is/dashboard?projectToCloneAuthToken=da7ef507-c91b-4393-a1fe-91848ba533c9`

---

- **Log in as "Vasya Pupkin".**
- **Remove cloning permission for the project.**
- **Log out.**

---

Paste
`https://clone-project.development.webstudio.is/dashboard?projectToCloneAuthToken=da7ef507-c91b-4393-a1fe-91848ba533c9`
See  "unexpected server error"

---

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

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2024-09-07 09:18:40 +03:00
Bogdan Chadkin b75626cc5c experimental: migrate borders section to style object model (#4076)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Fixes
https://discord.com/channels/955905230107738152/1281501486580502568/1281501486580502568

Refactored borders section with new style engine. And fixed the issue
with default border radius in shorthand input.

<img width="257" alt="Screenshot 2024-09-06 at 17 29 12"
src="https://github.com/user-attachments/assets/bf0df9ff-d8ed-413c-a260-3aa1d6ce1678">
2024-09-07 00:23:52 +02:00
Ivan Starkov ca41c505bd chore: Additional checks for the redirect_uri to avoid authorization code leakage (#4066)
## Description

It was possible to use any builder subdomain for redirect_uri. What can
cause auth `code` leak.

Not a big deal having pkce but better to avoid as additional security
measure.


## 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-05 23:30:48 +03:00
Bogdan Chadkin cafba33352 refactor: migrate outline section to style object model (#4074)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

- refactored outline section into single module for simplicity
- replaced css value input container with text control
- visually aligned color input and length inputs

<img width="253" alt="Screenshot 2024-09-05 at 16 44 37"
src="https://github.com/user-attachments/assets/888335a7-e562-4dc2-b8cb-9c4f568cb688">
<img width="267" alt="Screenshot 2024-09-05 at 16 44 19"
src="https://github.com/user-attachments/assets/fd977d46-3f3f-46a0-a6e7-2ea7cc806b79">
2024-09-05 19:14:07 +02:00