Commit Graph
3073 Commits
Author SHA1 Message Date
Ivan Starkov a2c073eac1 build: Add host for vite config (#3459)
## Description

For unknown reason port forwarding on Oleg's dev machine works only if
`host: "0.0.0.0",`

Works on localhost on mine


## 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-31 12:21:29 +03:00
Oleg Isonen 4d156d894b experimental: Paste from webflow 2 (#3455)
## Description

Added support for Link Block, Text, Paragraph, Blockquote

## 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-31 01:22:29 +02:00
Ivan Starkov 7d89ccfb09 fix: Fix focus bugs with text editing on canvas (#3454)
## Description

closes #3021

Currently if we are in a text edit mode we sometimes can't focus on any
input inside builder.
This fixes this.


## 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-30 19:41:46 +03:00
Oleg Isonen d56e857cb6 experimental: Paste from webflow (#3444)
Ref https://github.com/webstudio-is/webstudio/issues/2647

## Description

This allows to copy Heading only and only tested with minimal styles,
hence this is first stage, next I will add components and add tests with
complex styles.

## 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-30 13:06:59 +02:00
Bogdan Chadkin 0883212cdb refactor: drop --force flag from migrations (#3447) 2024-05-29 23:39:14 +03:00
Bogdan Chadkin ea30e840a1 refactor: merge all storybooks into one (#3441)
Monorepo setup for storybook is very complicated, it has two major
problems

- it is very annoying to look for any link in commit status
- hard to upgrade comparing with single project setup

Here merged all storybooks into one in the root.
2024-05-29 17:05:17 +03:00
Ivan Starkov 2e236917a7 build: Add devcontainer (#3429)
## Description

Allow development in devcontainers, simplifies initial setup

Open project in vscode (and accept open in devcontainer) or in
codespaces, wait setup to complete

run
```
pnpm dev
```

<img width="436" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/f03fdc99-5c46-4de5-be9c-2bb9420afc99">





## 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-28 14:15:55 +03:00
Bogdan Chadkin daf00fb558 fix: try to avoid race conditions while loading resources (#3437)
Our stores updates does not support transactions
which leads to a lot of updates with empty state.
Empty and valid states are both used to load resources and override each
other. Here workarounded by scheduling loading to the next frame.
2024-05-28 13:09:41 +03:00
Bogdan Chadkin 603e04ab30 fix: save "Include in marketplace" switch (#3438)
Form is very big, forgot to add to save.
2024-05-28 12:59:42 +03:00
Bogdan Chadkin c0c878ae83 fix: switch to home page when deleted currently selected page (#3434)
Fixes https://github.com/webstudio-is/webstudio/issues/3432
2024-05-28 10:14:19 +03:00
Bogdan Chadkin 59e1a87953 fix: append iterator to page when inserting from marketplace (#3433)
Fixes https://github.com/webstudio-is/webstudio/issues/3431

Here improved page name logic to check conflicts in target folder.
2024-05-28 01:44:03 +03:00
Oleg Isonen 700c9b95ab feat: Improve autoplacement when inserting component via 1-click in components panel or via paste (#3422)
Closes https://github.com/webstudio-is/webstudio/issues/3149

## Description

As a user when I have Heading, Text or similar instances selected which
have a single text node instance, I expect an added component to insert
AFTER such instances.

## Steps for reproduction

1. add heading
2. select heading instance
3. 1-click box
4. see box was added after the heading
5. repeat the same with paste
6. repeat the same with any instance that has only text inside

## Code Review

- [ ] hi @TrySound  , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)

- [ ] hi @johnsicili , I need you to do
  - 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-27 10:18:22 +02:00
Bogdan Chadkin ed9fc00883 feat: insert marketplace pages (#3425)
Fixes https://github.com/webstudio-is/webstudio/issues/3397

Here instead of inserting page content into body I improved bahvior to
insert complete page with whole meta and navigate into it.
2024-05-26 20:48:49 +03:00
Bogdan Chadkin 9980bb9f47 refactor: generalize page copying logic (#3424)
Ref https://github.com/webstudio-is/webstudio/issues/3397

Here split insertPageCopyMutable from duplicatePage utility. It
basically can extract page from any data and insert into any data. I
will reuse it in marketplace later.

Also fixed copying status, redirect and language fields. Their variables
were not updated with new ids.
2024-05-26 20:11:43 +03:00
Bogdan Chadkin a74f895487 refactor: host hyphenate-style-name (#3421)
hyphenate-style-name utility is basically oneliner but requires to
install two packages. Considering we will switch to hyphenate property
naming by default, no reason to rely on this package.

Also switched to unprefixed property in css preview and property name
tooltips.
Just shows background-clip instead of -webkit-background-clip.
2024-05-26 19:14:16 +03:00
Bogdan Chadkin a0fc252370 refactor: move Map.groupBy into shims (#3418)
Here moved our utility polyfill for Map.groupBy into shims module we are
using for all stuff we will replace with native methods.

Used it in marketplace to group by category.
2024-05-26 02:17:05 +03:00
Bogdan Chadkin 219c3f02b9 fix: support copying text from code editor (#3419)
Ref https://github.com/webstudio-is/webstudio/issues/3343

Copying text was broken because of user-select: none defined globally.
Without contenteditable=true codemirror still simulates text selection
but everything else stops working.

Testing

- try to copy anything from variable "inspect"
2024-05-25 22:35:10 +03:00
Bogdan Chadkin bf251b5f85 fix: prevent showing not matching history (#3420)
We show all history at the moment even when path is changed. Here
improved logic to exclude all paths from history not matching current
page path pattern.

<img width="266" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5635476/ef4c5b39-fe61-44f8-8e10-580247b378b2">
2024-05-25 22:26:29 +03:00
Bogdan Chadkin c621ce90ca feat: add marketplace section in page settings (#3413)
Fixes https://github.com/webstudio-is/webstudio/issues/3405

Reusing existing fields for marketplace does not work well when fields
are dynamically bound to cms data. Here we replaced existing fields used
in marketplace with static ones.

- ws:title ?? page title -> page name
- social image url ?? social image asset -> marketplace thumbnail ??
social image asset
- exclude page from searcg -> marketplace include
- ws:category -> marketplace category

<img width="449" alt="Screenshot 2024-05-24 at 17 15 29"
src="https://github.com/webstudio-is/webstudio/assets/5635476/d86ae2dc-d56f-4244-b4c2-c13fc1f059df">
2024-05-25 12:14:18 +03:00
Bogdan Chadkin d89137bda5 fix: avoid interfering with user input in color picker (#3414)
Fixes https://github.com/webstudio-is/webstudio/issues/3408

Here fixed the issue with auto converting hex while user typing and
improved performance while typing or dragging color.
2024-05-24 21:53:33 +03:00
Bogdan Chadkin 14fd1efd88 refactor: access form element directly in variable popover (#3395)
Here removed custom api between forms and variabl popover and just
access form element directly, removed extra api from each form.

Testing

- string variable should close when no errors
- string variable should not when errors are not visible
2024-05-24 15:27:40 +03:00
Oleg Isonen 59ff9c23db refactor: Move text placeholders to meta templates (#3410)
## Description

Part of https://github.com/webstudio-is/webstudio/issues/3149 this
allows us to understand if an instance has text child.
With this knowledge we can place instances into components that don't
have text children and after them if they do.

## Steps for reproduction

1. insert text or paragraph
2. see there is expected placeholder text which is editable
3. select it, tell AI to change color or something
4. see it works and see in payload it didn't send placeholder text
5. try text editing on empty body - shouldn't allow it

## 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-24 13:53:19 +02:00
Bogdan Chadkin d95158bde4 feat: match unambiguous variables by name (#3403)
Fixes https://github.com/webstudio-is/webstudio/issues/3401
Ref https://github.com/webstudio-is/webstudio/issues/3080

Simple logic here, one variable matched by name then can be replaced
with actual variable id otherwise user has to select variable
explicitly.

<img width="342" alt="Screenshot 2024-05-23 at 00 37 07"
src="https://github.com/webstudio-is/webstudio/assets/5635476/a4620f5e-2816-421c-b384-087fe7ea1ded">
2024-05-23 11:32:18 +03:00
Bogdan Chadkin fc47db5f80 build: upgrade to prettier 3.2.5 (#3394)
- https://prettier.io/blog/2023/11/13/3.1.0
- https://prettier.io/blog/2024/01/12/3.2.0
2024-05-22 14:55:55 +03:00
Bogdan Chadkin 99eae65e43 refactor: switch variable values to native validation (#3393)
Here migrated all left fields to native navigation. Got rid from legacy
useField hook.
Replaced number input with just text input as more reliable. And reused
expression linter for json value.

Check following forms
- string
- number
- boolean
- json

<img width="401" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5635476/001bde86-3b7c-472d-ad26-acad2f347712">
2024-05-22 12:59:41 +03:00
Bogdan Chadkin bd9cde8d52 build: upgrade storybook 8 (#3085) 2024-05-22 10:45:43 +03:00
Bogdan Chadkin 4579e638e4 fix: show drop stub when collection is empty (#3391)
Empty stub was used as drop target in empty collection. Missing stub
does not work for this case.

<img width="655" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5635476/2cea1b50-3493-4073-a9d7-9a686f8c5eb5">
2024-05-20 23:15:35 +03:00
Bogdan Chadkin 52b2c92fe1 fix: use default system in resources (#3390)
Looks like we default system was not in loading resources and showed
empty page.

<img width="1220" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5635476/bfa1487a-e307-45a2-a404-b011487ad789">
2024-05-20 22:12:47 +03:00
Bogdan Chadkin b0923cdaca feat: restore system params from history first entry (#3388)
We want users to get good first impression and show already working cms
page when clone from marketplace. Here improved bindings logic to always
use the first history entry as default.

<img width="616" alt="Screenshot 2024-05-20 at 13 41 17"
src="https://github.com/webstudio-is/webstudio/assets/5635476/ab941caf-7a0d-4617-ad8f-003bfa914277">
2024-05-20 13:58:08 +03:00
Bogdan Chadkin ed0c94574f fix: enforce text editor focus after clicking on toolbar (#3386)
Here trying to fix the issue with text editor loosing focus after
cliking on buttons and as a result blur never happen and changes are not
saved.
2024-05-20 09:09:03 +03:00
Bogdan Chadkin 1cb8225a67 fix: show visually missing component in canvas (#3383)
AI sometimes adds components we don't have
here is just a hint for user that some component is missing.

<img width="686" alt="Screenshot 2024-05-19 at 14 25 16"
src="https://github.com/webstudio-is/webstudio/assets/5635476/7ca3faee-7703-4d02-9786-5f5f0a6193d0">

Here's json to paste

```json
{
  "@webstudio/template": [
    {
      "type": "instance",
      "component": "ContentEmbed",
      "children": []
    }
  ]
}
```
2024-05-20 09:07:33 +03:00
Ivan Starkov be4a02704b fix: Make select and combobox description height stable (#3385)
## Description

<img width="332" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/2051b332-c883-461c-9ac9-91413594c2bb">

<img width="308" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/7cc19636-fbc3-47ad-96db-f56b6775635b">


<img width="330" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/244a0937-8f29-4276-bbe9-ad019be8d93f">




## 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-20 09:07:01 +03:00
Ivan Starkov f47455bc75 fix: URL patterns should not be included in the sitemap (#3380)
## Description

URL patterns should not be included in the sitemap. For instance, before
this PR, we included paths like /:slug in the sitemap.

## Steps for reproduction

Open


https://fix-sitemap-slug.staging.webstudio.is/builder/8404e444-093d-4e70-b5c2-03fd89b9eb6d?pageId=EksrLskoGCCreyVN4xp2r


See dynamic page is excluded

## 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-19 19:07:19 +03:00
Bogdan Chadkin 45fdd6404c experimental: save path in history when navigate with link (#3381)
Here improved history support. Now navigating with links from preview
adds paths into page history. This will let to reach same page without
switching to the list of posts.
2024-05-19 14:35:25 +03:00
Bogdan Chadkin 5e39b06d6b experimental: support history in address bar (#3377)
Address bar need to fill every time user want to test the page. Here
added history suggestions which let users reuse peviously entered
params.

Had to implement own combobox-like behavior to support syggestions
universally on all inputs.

<img width="384" alt="Screenshot 2024-05-18 at 17 35 54"
src="https://github.com/webstudio-is/webstudio/assets/5635476/4f5add04-cfe9-4ba0-a824-821011bbdd81">
2024-05-18 23:22:03 +03:00
Bogdan Chadkin 2fd7c6d307 fix: strip backslashes from curl when paste (#3376)
Fixes https://github.com/webstudio-is/webstudio/issues/3375

The arguments parser we use missed a case with explicit backslashes and
I missed it in our tests. Here removed it with regex.
2024-05-18 17:49:09 +03:00
Jaya Krishna Namburu ef01841b6f feat: Add UI section for filters and backdrop-filters (#3348) 2024-05-18 07:12:38 +02:00
Oleg Isonen d54d053689 fix: fix zoom detector (#3372)
## Description

1. Zoom detector that warns user next to breakpoints selector had bugs

## 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-18 00:37:17 +02:00
Bogdan Chadkin 95b651c36b feat: improve resource body (#3374)
Here's 2 major changes

- switched to native body validation without json auto-formatting while
editing
- automatially add Content-Type: application/json header when object is
set from binding expression

This refactoring opens room for more improvements.

<img width="478" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5635476/5559a6ab-7e08-4b47-b0a1-924818c006b4">
2024-05-17 20:55:32 +03:00
Bogdan Chadkin dc0236fafe experimental: save address bar on enter or close (#3373)
To keep in history only consistent paths and avoid overfetching
resources I changed address bar saving logic. Before each type in
address bar params triggered save. Now only "enter" while param is
focused or address bar popover is closed triggers saving.

Can be tested with new story.
2024-05-17 16:37:48 +03:00
Bogdan Chadkin 698584c664 refactor: switch variable name to native validation (#3371)
Here refactored name field with native validation
and accessed it with form data in on submit.
Basic zod validation will wllow to avoid issues with missings fields.

Note: review with hidden whitespaces

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
2024-05-17 12:54:02 +03:00
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