1207 Commits
Author SHA1 Message Date
Bogdan Chadkin e87cc005bb experimental: add graphql resource control (#3368)
Here added new "GraphQL" option into variable "type" select. It allows
to switch to special resource subset with "query" and "variables" fields
instead of single json body.

<img width="571" alt="Screenshot 2024-05-16 at 17 54 27"
src="https://github.com/webstudio-is/webstudio/assets/5635476/db9ab321-18e9-4208-a46e-13bd7a88b6c7">
<img width="324" alt="Screenshot 2024-05-16 at 17 54 06"
src="https://github.com/webstudio-is/webstudio/assets/5635476/07b9f6d4-117c-4974-b31c-a581bfdf4668">
2024-05-16 20:57:03 +03:00
Oleg Isonen ba1f582324 feat: Fullscreen preview when on base breakpoint (#3276)
Closes https://github.com/webstudio-is/webstudio/issues/2324

Explanation https://share.descript.com/view/8NayOadrxo8

Biggest problem it addresses is that users on base breakpoint want to
see the site in a full width without having to resize each time.

Additionally user doesn't want it to resize when switching between
preview and canvas on a custom selected size.

1. removed remaining hook wrappers from nanostores
2. moved the resize handles to the outside of the canvas and gave them
some space - fixes the problem with dragging to the edge and then not
being able to get them back because mouse grabs the browser itself
3. On base breakpoint and higher when there is no min-width breakpoint
and user switches to preview, we use the entire workspace, then going
back, we calculate based on base breakpoint start.
4. On all other breakpoints we keep the size user has chosen between the
preview and canvas, we don't reset it.

## Steps for reproduction

1. without min breakpoints on canvas
- on base, switch to preview, see maximum canvas size, switch back to
canvas, see base canvas width
  - on every breakpoint and in between see that it keeps the size
1. add min-width breakpoint, on base, switch to preview, see the same
size

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

- [ ] 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.example`
and the `builder/env-check.js` if mandatory
2024-05-16 11:08:08 +02:00
Bogdan Chadkin 53ba464ed4 refactor: use native validation for resource headers (#3367)
Here switched resource headers to native validation. Now it finally
blocks closing variable popover and shows errors. Works even for
multiple headers with the same input.name.

Had to workaround InputField cases like ref -> inputRef and
event.currentTarget -> inputRef.current.

<img width="393" alt="Screenshot 2024-05-16 at 02 07 12"
src="https://github.com/webstudio-is/webstudio/assets/5635476/49d172ca-a87b-4b41-8fe8-a2d7b3079b59">
2024-05-16 10:57:30 +03:00
Bogdan Chadkin dae9952aa9 refactor: use native validation for resource url (#3366)
Here integrated native fields validation into our form utilities. It
will let us have more isolated validation complexity within each field.

The trick was to detect if any error are not shown. Solved by iterating
form.elements and checking its input.validity.valid and data-color=error
attribute.

<img width="417" alt="Screenshot 2024-05-16 at 01 08 37"
src="https://github.com/webstudio-is/webstudio/assets/5635476/ce112f00-aafd-4388-bb0b-a64baccaffac">
2024-05-16 02:01:32 +03:00
Bogdan Chadkin c57d75c911 refactor: align text area error with input field (#3365)
Here replaced state=invalid with color=error in textarea to align with
input field and fixed focused input with error style.

<img width="233" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5635476/bf649fec-cfdc-423f-a668-977d23aa1738">
2024-05-15 23:16:58 +03:00
Oleg Isonen bf7f0210ee feat: add email to the dashboard menu (#3364)
Closes https://github.com/webstudio-is/webstudio/issues/3277

## Description

As a user I want to be able to see what email my login is using

## 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.example`
and the `builder/env-check.js` if mandatory
2024-05-15 21:26:16 +02:00
Oleg Isonen d81b727a02 feat: Warn user when they use browser zoom on canvas (#3362)
Fixes https://github.com/webstudio-is/webstudio/issues/3295

<img width="401" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/f12226e2-45ea-4cf6-85ac-05a1a6d4b3ce">


## Description

User may be accidentally on a zoom and this will result in unpredictable
media query application.
We show warning only when user has non 1 zoom level

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @TrySound , 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.example`
and the `builder/env-check.js` if mandatory
2024-05-15 16:04:44 +02:00
Ivan Starkov eea7a5a408 fix: Style non-XML sections as disabled on page edit/create (#3357)
## Description

ref #3343

Overlay or hidden support for headers etc to make it look more disabled

<img width="479" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/b390ff27-ad49-490b-bf22-d8acb15b792a">


## Steps for reproduction

Create/Edit Page, change type on XML

## 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.example`
and the `builder/env-check.js` if mandatory
2024-05-15 16:04:20 +02:00
Bogdan Chadkin 8bf04f66a9 refactor: define resource control explicitly (#3360)
Here simplified detecting system resource control with explicit resource
field. Without it ui falls back to http ui.

Will be useful for graphql ui later.

Also disabled system resource option for non-paid users

## Testing

- create sitemap resource
- close variable popover
- open again and see system control instead of default http control
2024-05-15 16:55:20 +03:00
Ivan Starkov 36d477e5f5 fix: Slow performance on a large site during text editing (#3351)
## Description

Update edited element on blur


https://fast-canvas-edit.development.webstudio.is/builder/ab3439dc-8eab-4050-a5b4-71247fba7d4c

## 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.example`
and the `builder/env-check.js` if mandatory
2024-05-14 19:19:04 +03:00
Bogdan Chadkin ce8298bf9f fix: settings panel breaks when resource url is an expression (#3353)
JSON.parse is not safe to parse expressions. Better execute it with
try/catch.
2024-05-14 18:36:49 +03:00
Jaya Krishna Namburu 483b943625 chore: change layout for shadow UI (#3352)
## Description

Handle layout changes for individual shadow properties.
<img width="245" alt="Screenshot 2024-05-14 at 12 35 52"
src="https://github.com/webstudio-is/webstudio/assets/11075561/5facc8d8-ff21-4399-ad3a-69b56b3b2df6">
<img width="242" alt="Screenshot 2024-05-14 at 12 35 45"
src="https://github.com/webstudio-is/webstudio/assets/11075561/00295503-c4bd-43c3-8536-bb675b9074cc">

## Code Review

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

## Before requesting a review

- [x] made a self-review

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
2024-05-14 10:49:26 +02:00
Bogdan Chadkin ea5b5c8a32 experimental: autocomplete path params (#3346)
Here added support for autocompleting inferred path params where their
values are not specified by user.

<img width="312" alt="Screenshot 2024-05-12 at 14 33 23"
src="https://github.com/webstudio-is/webstudio/assets/5635476/0576039d-4fab-4499-923b-61867c12e096">
2024-05-13 03:08:23 +03:00
Oleg Isonen 8aca48042d fix: Fix breakpoints editor layout (#3345)
## 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.example`
and the `builder/env-check.js` if mandatory
2024-05-12 09:46:11 +02:00
Bogdan Chadkin 31ceb2bc44 fix: support multiline graphql in curl (#3342)
Here fixed the issue with parsing curl by switching argv parser.
2024-05-11 21:32:32 +03:00
Oleg Isonenandistarkov 2496f68d32 feat: Add System Resource instead of $resources url (#3341)
## Description

ref #3308

<img width="274" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/dd7ae367-76d8-40cc-9eec-d795aaab54eb">

<img width="286" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/6f57142d-ad6a-43ef-92ba-dff4afce38bf">


# TODO:

- [x] - Remove copy for curl
<img width="344" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/bdd6b92b-5436-4537-b724-a5ecca08e7ca">


## Steps for reproduction

Add Variable, System Resource, open Select, check texts

## 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.example`
and the `builder/env-check.js` if mandatory

---------

Co-authored-by: istarkov <istarkov@gmail.com>
2024-05-11 17:55:49 +03:00
Jaya Krishna NamburuandOleg Isonen cfe222c375 refactor: use style-layer-list for all layers based sections in style-panel (#3328)
## Description

This PR refactors the values in style-panel that handles complex values.
Properties like `box-shadow`, `text-shadow`, `filter`,
`backdrop-filter`, `transition` handles multiples values which needs to
be displayed as list. And then allow users to edit them using a content
panel. This PR removes all the individual layers of each property and
created a common layer list item.

## Steps for reproduction

1. Add values to all the sections,
2. Re-order the layers between the values of each property.
3. Deploy / Export the 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

- [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)

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2024-05-10 18:14:09 +02:00
Ivan Starkov 45e5c39751 feat: Hide style settings on non html pages (#3337)
## Description

Do not show styles at all on non html page

## Steps for reproduction

Open any page with document type xml, see no style panel is present

## 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.example`
and the `builder/env-check.js` if mandatory
2024-05-09 18:00:08 +03:00
Ivan Starkov 595b443ee0 feat: Show xml category for xml, hide in other cases (#3338)
## Description

#3337 related

## 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.example`
and the `builder/env-check.js` if mandatory
2024-05-09 17:59:47 +03:00
Bogdan Chadkin eb2e397d0a build: drop eslint-plugin-import (#3333)
Turns out no-internal-imports did not forbid anything out of the box but
requires specifying specific folders to forbid. This does not scale well
and this rule mostly harms because requires either excluding each
package with submodules or suppressing it with comment.
2024-05-09 18:53:35 +04:00
Bogdan Chadkin 6afc136bc1 build: drop eslint-plugin-react (#3332)
Most rules protect from legacy and class component apis.
Many rules are checked by typescript.
A few rules just do not bring much value.
The package brings too many dependencies.
2024-05-09 14:46:30 +04:00
Bogdan Chadkin cacfbee307 experimental: add content embed aka rich text component (#3315)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Embed Content is a component with a way to bind html from cms with
ability to style itself and all descendants generated from cms rich
text. All Content Embed children are "virtual" Descendant instances with
predefined selector.

<img width="1404" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5635476/8d7cf210-32cb-4e63-bfe7-8af8c3e2d78d">
2024-05-09 13:20:47 +04:00
Ivan Starkov 29abc47820 fix: Do not check user authenticated on trpc (#3330)
## Description

We should not check user auth on trpc, 
context security is enough

## Steps for reproduction

Open in Incognito

https://trpc-auth.staging.webstudio.is/builder/95821bd9-040a-4294-aa7f-edf26d7f1ebe?authToken=137726f9-7914-4807-8d62-091eea59296b&mode=edit

Click publish

## 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.example`
and the `builder/env-check.js` if mandatory
2024-05-08 23:29:13 +03:00
Jaya Krishna Namburu ce1f9026cd feat: Add support for text-shadow property in style-panel (#3318)
## Description

This PR adds support for using backdrop-filter property in the
style-panel. Here are more details on the property to test it around.
https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow

## Steps for reproduction

1. Add an element to the canvas.
2. Click on the "+" icon in the style panel next to the `Text Shadows`
section.
3. Edit the default filter that is added.
4. Swap the layers and publish the 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

- [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-05-08 17:55:03 +02:00
Jaya Krishna Namburu f5297231c5 feat: Add support for backdrop-filter property in style panel (#3317)
## Description

This PR adds support for using `backdrop-filter` property in the
style-panel. Here are more details on the property to test it around.
https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter

## Steps for reproduction

1. Add an element to the canvas.
2. Click on the "+" icon in the style panel next to the `Backdrop
Filters` section.
3. Edit the default filter that is added.
4. Swap the layers and publish the 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

- [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-05-08 08:22:10 +02:00
Jaya Krishna Namburu c1961506d4 feat: parse complex values with available parsers for sections (#3319) 2024-05-08 07:27:49 +02:00
Ivan Starkov aa10864739 fix: Do not show bind button if it disabled (#3325)
## Description

Do not show bind button inside `<fieldset disabled`
That will mean that button itself is disabled and don't need to be shown

## 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.example`
and the `builder/env-check.js` if mandatory
2024-05-08 01:41:59 +03:00
Oleg Isonen e354c58e2d feat: Exclude the page from search by default (#3323)
Closes https://github.com/webstudio-is/webstudio/issues/3322

## Description

Users want to test in prod before including in sitemap

## Steps for reproduction

1. click button
2. expect xyz

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

- [ ] 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.example`
and the `builder/env-check.js` if mandatory
2024-05-07 21:03:27 +02:00
Bogdan Chadkin 305436f820 experimental: add descendent component (#3313)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here added support for new `<ws:descendent />` component. It allows to
style any children or descendents of components. Primary usage is for
embed content which renders html and need to style tags.

Descendent component accepts "selector" prop which can be suffix like `
img`, ` .image` or `::first-child` pseudo-element.

Potentially it could be used as tag styling for any element.

Can be tested in any element by dropping "Descendent" component from
"internal" category.
2024-05-06 23:36:34 +04:00
Ivan Starkov cd76fe4487 feat: Add doctype to new/edit page (#3314)
## Description

ref: #3308 

Use for review:

<img width="380" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/448e7413-aee1-41b5-b748-d20a80d48a44">


<img width="507" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/6ed2315f-fd7a-4d7e-b0fe-76d6ac3f87bc">

In case of xml is selected

- No way to make xml as home page
<img width="460" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/22864698-d9ca-41c7-8787-28e89389fc89">
<img width="475" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/b104b5f7-2787-41e2-be09-490357c2b1e9">

- Editing of social/etc is disabled

<img width="476" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/a53ec4d8-3a73-406f-b179-4270dfa3fb92">


## 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.example`
and the `builder/env-check.js` if mandatory
2024-05-06 20:56:35 +03:00
Jaya Krishna Namburu 966f3ea727 feat: Refactor existing parseBoxShadow to parse both box and text shadows (#3307)
## Description

`box-shadow` and `text-shadow` both share the same syntax signature.
https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow#syntax
https://developer.mozilla.org/en-US/docs/Web/CSS/text-shadow#syntax

The only difference is `text-shadow` don't have `inset` and `spread`
values. And added a extractor which can be used in future for
text-shadow UI.

## Code Review

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

## Before requesting a review

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

## Before merging

- [x] added tests
2024-05-06 16:12:06 +02:00
Ivan Starkov fd9bf61940 build: Simplify development by fixing dev mode image behavior, fix migrate cli (#3310)
## Description

- Remove vite overlay Error about image not exists in dev mode
(replacing 500 on
404)
- Add prisma package directory as cwd to all prisma commands





## 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.example`
and the `builder/env-check.js` if mandatory
2024-05-06 14:30:57 +03:00
Jaya Krishna Namburu 89979ebb33 fix: default values of transitions is tuple which needs to be reset (#3303)
## Description

Fixes the issue with transitions that is leaving a `tuple` default value
on reset.

## Steps for reproduction

Please refer to #3302  for the steps to reproduce.

## Code Review

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

## Before requesting a review

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

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
2024-05-05 23:39:08 +02:00
Bogdan Chadkin 7128bc9204 build: publish 0.151.0 (#3297) 2024-05-04 16:56:39 +04:00
Bogdan Chadkin 5ce5065835 fix: hide contact email behind pro (#3296)
We want to allow customizing email only for pro users to avoid abusing
of our workflow.

<img width="631" alt="Screenshot 2024-05-04 at 12 57 15"
src="https://github.com/webstudio-is/webstudio/assets/5635476/089500e9-fa9f-4599-ba09-2568e04b9ac6">
2024-05-04 15:14:08 +04:00
Bogdan Chadkin 7d78a85cbd refactor: upgrade to remix 2.9.1 (#3287)
Ref https://github.com/webstudio-is/webstudio/issues/3284

Bumped remix to 2.9.1 and fixed remix version in cli templates to avoid
accidental install of higher remix version and conflicting with
specified versions.
2024-05-04 00:06:01 +04:00
Bogdan Chadkin a54f2a4574 feat: allow customizing default contact email (#3293)
Fixes https://github.com/webstudio-is/webstudio/issues/3289

Here added contact email fields to use it as recipient instead of owner
email. This way users can host sites for many clients and use default
webhook form behavior without implementing own n8n workflows.
2024-05-03 23:59:12 +04:00
Bogdan Chadkin 9f897f5d41 refactor: reimplement canvas style renderer (#3253)
Here refactored canvas styles with nesting rules which allow to update
each declaration incrementally and closer to our data format.

Things to test
- initial rendering
- updating values
- ephemeral values
- selecting state, rendered as separate stylesheet

Added shim.ts to contain simplified polyfills for future methods like
Set.prototype.difference which I use here to find added and deleted
styles.

Removed warning from parseCssValue which pollutes log with outdated
messages.

Additionally fixed old bugs
- support ephemeral styles with selector state, for example hover was
not updated on on canvas while updating ephemeral styles
- remove ephemeral custom property from body (bug appeared when added
support ephemeral styles in tokens)
2024-05-02 17:51:09 +04:00
Oleg Isonen cc6dc6481b fix: Fix sitemap urls when using folders (#3281)
## 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.example`
and the `builder/env-check.js` if mandatory
2024-05-02 14:10:44 +02:00
Bogdan Chadkin 09491d7c0b refactor: simplify stylesheet caching (#3275)
Here got rid of top level stylesheet caching in favor of managing
caching by each rule. So nesting rule, font face and style rule based on
their inputs and methods manage own cached css string.

In stylesheet all the work left is building media queries and
concatenating all rules. This prevents hard to debug cached css after
updates.
2024-05-01 23:28:09 +04:00
Oleg Isonen fb93c17656 fix: Canvas link click is not working for nested paths (#3273)
## Description

When a path leads to a nested page inside folders, we were not building
a full path with folders

## Steps for reproduction

1. create a link to a subpage from a folder
2. open preview mode
3. click on a link - expect it to switch
4. works when link is to a page from the root

## Code Review

- [ ] hi @TrySound , 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.example`
and the `builder/env-check.js` if mandatory
2024-05-01 13:46:43 +02:00
Oleg Isonen ec26bd75ae fix: Fix share dialog saving behavior (#3269)
## Description

1. You couldn't type space at the end of the shared link name 
2. When clicking outside it would save the value

## 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.example`
and the `builder/env-check.js` if mandatory
2024-05-01 12:31:57 +02:00
Ivan Starkov 50be0047a1 feat: Add system.origin (#3254)
## Description

review per commit.

- Add system.url.origin to the props, rename publishedUrl ->
publishedOrigin
- Add system.url.origin to the published sites

Example on published site
https://saas-sitemapxml-x1g2n.wstd.work/

Example on builder
<img width="342" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/bea3c9b4-c7dc-4936-a56a-fa33327ab6d0">

We use because as of now system is not available on canvas
<img width="448" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/2eaa02b0-7566-492b-b98e-7af8a4f636e0">


## 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.example`
and the `builder/env-check.js` if mandatory
2024-04-30 08:59:28 +03:00
Oleg Isonen 8a7e956732 chore: used wrong component, showed dialog inside dialog (#3255)
Fixes this

<img width="710" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/69d6098c-f7a3-4286-abf8-bc074ad03681">


## 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.example`
and the `builder/env-check.js` if mandatory
2024-04-29 16:51:12 +02:00
Jaya Krishna Namburu e0941ac349 fix: Move css filter properties to be used as tuples instead of layers in the data-layer (#3247)
fixes #3243 

## Description
 
We should use tuples for handling filters. Don't know when i switched to
layers, but the initial implementation of the filters started as tuples
itself.

- [ ] We might probably need a migration for the existing projects to
change it to tuple if needed. Let me know, I can help with that as well.

## Steps for reproduction
1. Add a css filter in the sections panel.
2. Add another css filter and edit it using the code view.
3.  Swap filters using the drag and drop action.
4. Deploy the project and the multiple filters applied in the same
element should work as expected.

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

- [x] tested locally and on preview environment (preview dev login:
5de6)
- [x] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
2024-04-29 14:35:55 +02:00
Oleg Isonen 2d91ef4203 chore: don't fix boolean attributes to empty string values in html embed (#3251)
## Description

When validating html embed, dom innerHTML always turns boolean
attributes into empty string, e.g. <div hidden></div> will always become
<div hidden=""></div> and this is not necessary, we can ignore those
mismatches.


## 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.example`
and the `builder/env-check.js` if mandatory
2024-04-29 13:51:47 +02:00
Ivan Starkov cc72849a62 feat: Canvas drawing of xml element (#3245)
## Description

This is only for Canvas rendering.

<img width="829" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/b63efe11-effd-4ed7-b9ff-a19d4a19a125">

<img width="244" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/3f59819b-486a-4d75-8890-c5c14950393c">

Editable
<img width="269" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/e25af3b0-0903-4390-aec8-1fc7383ec24b">

For generating it will change a little.

## Steps for reproduction

[Play Ref
https://xml-element.development.webstudio.is/builder/cab934af-8615-411a-99c1-5822a98eac74](https://xml-element.development.webstudio.is/builder/cab934af-8615-411a-99c1-5822a98eac74)

## 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.example`
and the `builder/env-check.js` if mandatory
2024-04-29 14:08:27 +03:00
Oleg Isonen 84395189bb chore: Display styles label for advanced properties behind a menu on the icon button (#3250)
Previously I tried a clever trick using dots in the ellipsis as an
indicator for the style source, but its too small, now we can set it on
the button itself since it's open state is not any more primary blue

## Steps for reproduction

1. Typography > advanced > set properties > see icon button reflects the
color and alt+click works for reset
2. same for object position ellipsis button

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

- [ ] 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.example`
and the `builder/env-check.js` if mandatory
2024-04-29 11:53:45 +02:00
Jaya Krishna Namburu 5152cc6a01 fix: Allow users to redirect to home page in redirects (#3252)
## Description

fixes #3224 
Allow users to set `/` in new-path. So, from any old-path users can
redirect to the home page.

## Steps for reproduction
1. Go to Project Settings -> redirects.
2. Enter a `old-path` and set the `/` in the new path.
3. Deploy the project
4. And when we use the `old-path` in the URL, the project should take
the route to the home page.

## Code Review

- [ ] hi @kof, I need you to do
  - 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-04-29 11:17:20 +02:00
Oleg Isonen c478e65029 fix: Prevent editing Code Text component as text (#3246)
Code Text component is designed to render code and in the future also to
add syntax highlighting. With this PR it won't be possible to treat it
like a Box any more and code will be entered using code property.

Benefit is: better UX for editing code and no unintended side effects
later with highlighting.

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @TrySound , 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.example`
and the `builder/env-check.js` if mandatory
2024-04-27 21:33:57 +02:00