Commit Graph
5363 Commits
Author SHA1 Message Date
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
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
Jaya Krishna Namburu 45d931715e experimental: parse linear-gradient and extract stops, angle, side-or-corner and hints from the gradient. (#4131)
## Description
This PR is to kick off the #3448 track. First of everything we need to
build the gradient selector/indicator

![image](https://github.com/user-attachments/assets/6901327d-0ba0-4b7d-a3ff-41dbcf806912)

Which should be able to parse the gradient and pick the `stops` and
`colors` and `hints` from it.


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
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 14:34:34 +02: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 654c1345b1 fix: fix unknown font family support (#4136)
## Description

Last pr introduced a regression when font family is used that isn't in
the stakcs

## Steps for reproduction

1. type a random font family
2. expect it to land in the dom

## 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 22:43:04 +02: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 45ca54353a refactor: deprecate tree component (#4130)
Tree component we use for pages and instances got overcomplicated with
time and should be reimplemented to move forward with css variables.
2024-09-18 01:49:22 +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 0d341008bb refactor: switch to react aria focus in navigator (#4120)
Related to https://github.com/webstudio-is/webstudio/issues/3399

Rewrote keyboard navigation in navigator tree with focus manager from
@react-aria/focus. Now navigating with keyboard rely on dom instead of
data representation. It will help to integrate ":root" without huge
rewrite.
2024-09-16 11:12:03 +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
Oleg Isonen 09c44866a4 feat: add integrations section in the marketplace (#4101)
## Description

We want to differentiate page templates and cms 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 20:15:23 +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
Ivan Starkov df5a8e8c27 fix: Disabling image optimize breaks image path (#3931)
## Description

closes  #3754

## 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-09 15:28:13 +03: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 1e615a18fc build: CLI release (#4079)
## 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-07 23:39:43 +03: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>
0.179.0
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
Bogdan Chadkin 61eec6815b experimental: migrate layout section to style object model (#4072)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

- test display flex and inline-flex showing flex controls
- test wrap showing align content

<img width="249" alt="Screenshot 2024-09-05 at 14 40 45"
src="https://github.com/user-attachments/assets/11c4be6e-0737-467e-bb9d-5ec17939d4eb">
2024-09-05 16:43:40 +02:00
Bogdan Chadkin 611174a044 experimental: migrate size section to style object model (#4073)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Most changes is object position switching to new style engine.

<img width="559" alt="Screenshot 2024-09-05 at 15 58 13"
src="https://github.com/user-attachments/assets/2ada00a8-37f1-40e1-a001-425753221198">
2024-09-05 16:25:38 +02:00
Bogdan Chadkin e381a70580 experimental: migrate style section to style object model (#4065)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Power style section and its colorful dots with new style engine.

Can be tested

- size section
- background section
- transforms section
- advanced section
2024-09-05 01:12:32 +02:00
Bogdan Chadkin ca62a9837e experimental: migrate gap controls to style object model (#4067)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Refactored flex gap with new style engine.
Synchronize linking both ways not only row=column.
2024-09-05 01:05:54 +02:00
Ivan Starkov 766d7eb95f chore: Add CSRF protection to prevent Canvas script execution vulnerability (#4047)
## Description

how it works
https://github.com/webstudio-is/webstudio-saas/issues/317#issuecomment-2317121292

- attack example
https://p-845e975a-4e84-4186-b312-431f3a6f99ea-dot-main.development.webstudio.is/
- attack fixed
https://p-845e975a-4e84-4186-b312-431f3a6f99ea-dot-csrf.staging.webstudio.is/

corresponding PR #4060 (Add postMessage token to secure against Canvas
script execution)

Additionally

csp on iframe (see comments)
destination checks - to prevent including loaders/pages into iframes

<img width="1015" alt="image"
src="https://github.com/user-attachments/assets/2d8c6840-e195-424e-942f-8b8d05203e18">


## 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-04 17:08:08 +03:00
Bogdan Chadkin 5d15ad78bf experimental: migrate toggle group to style object model (#4063)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Switched to new style engine for toggle group controls. Those are tricky
caz have property tooltip internally.

Improved tooltip to not show reset button and source when highlight not
selected toggle button.

Can be tested
- background "repeat"
- flex child "sizing"
- flex child "order"
- size "overflow"
2024-09-04 14:01:16 +02:00
Oleg Isonen 74420860cb chore: add unused ref to fix the warning (#4062)
## 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-04 13:14:34 +02:00