Commit Graph
5252 Commits
Author SHA1 Message Date
Bogdan Chadkin 03aa922425 experimental: support selecting style source and state (#3972)
Ref https://github.com/webstudio-is/webstudio/issues/3399
https://github.com/webstudio-is/webstudio/issues/1536

Here added support for selecting specific style source and state when
computing styles. Matching states are now treated as less specific.
2024-08-20 13:55:36 +02:00
Ivan Starkov f60b9bddb1 chore: Remove single() PostgREST calls from Build to improve compression (#3969)
## Description

[Discussion Link](https://github.com/orgs/supabase/discussions/28757)

To reduce traffic size, temporarily remove the `.single()` call from the
“Build” table until the issue under discussion is resolved.

## Test:

### Logs with `.single()` call:

Notice that the `content-encoding` header is null.

<img width="992" alt="image"
src="https://github.com/user-attachments/assets/86438c2f-53f0-47ee-9fe9-b44716425bb2">

[View
Logs](https://vercel.com/getwebstudio/webstudio-builder/9ua91vyJRZbQQyyJoLXEEEBiWtrE/logs?slug=app-future&slug=en-US&slug=getwebstudio&slug=webstudio-builder&slug=9ua91vyJRZbQQyyJoLXEEEBiWtrE&slug=logs&page=1&timeline=past30Minutes&startDate=1724132921408&endDate=1724134721408&searchQuery=%3D%3D%3D%3D%3D%3DENCODING%20IS%3D)

### Logs without `.single()` call:

Here, the `content-encoding` header is `null` only for Build `update`
requests; everything else has `br` encoding.

<img width="967" alt="image"
src="https://github.com/user-attachments/assets/c899086a-a175-4761-874b-62626ecd0671">

[View
Logs](https://vercel.com/getwebstudio/webstudio-builder/EdRGvZRBKBJbT4Wzp2AnYFCkSYgg/logs?slug=app-future&slug=en-US&slug=getwebstudio&slug=webstudio-builder&slug=EdRGvZRBKBJbT4Wzp2AnYFCkSYgg&slug=logs&page=1&timeline=past30Minutes&startDate=1724133136494&endDate=1724134936494&searchQuery=%3D%3D%3D%3D%3D%3DENCODING%20IS%3D%3D%3D&selectedLogId=1724134923767492376713800000&selectedLogTimestamp=1724134923767&forceEndDate=1724134923859)

_See commits for how to add logs:_

```ts
async fetch(input: string | URL | globalThis.Request, init?: RequestInit) {
  const res = await fetch(input, init);

  if (typeof input === "string" || input instanceof URL) {
    const url = new URL(input);

    if (url.pathname.endsWith("/Build")) {
      console.info(
        "======ENCODING IS=====",
        res.headers.get("content-encoding")
      );
    }
  }

  return res;
},
```
2024-08-20 13:26:25 +03:00
Bogdan Chadkin 88323969c0 refactor: switch to compact build data for marketplace (#3967)
Now marketplace will load compact build from server and convert into
webstudio data with maps.

Replaced prisma with postgrest for loading marketplace data.

Fixed asset images on dev.
2024-08-19 23:33:50 +02:00
Jaya Krishna Namburu cb73ab65bb experimental: add ui controls for managing perspective-origin from transforms (#3950)
## Description

This PR helps in managing perspective origin which is similar to
transform origin under transform section.

## Steps for reproduction

- Click perspective-origin from the dropdown on transform section.
- Can change the values of x and y axises using the positional grid.
- Can change values of x and y using the individual inputs by
scrub/manually entering/keyboard up&down
- Add values for perspective -origin from the advanced tab and update
those values using the UI controls.
- Reset the property using the label indicator.
Use keywords from the suggestions dropdown for x and y axis like left,
top, center etc.

## 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)
- [x] 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



![perspective-origin](https://github.com/user-attachments/assets/ec9af84d-2e3a-44f9-add7-41d58661cbd5)
2024-08-19 09:37:17 +02:00
Bogdan Chadkin b5585f850d refactor: drop sorting by specificity (#3959)
Ref https://github.com/webstudio-is/webstudio/issues/3399
https://github.com/webstudio-is/webstudio/issues/1536

Even less work needed now to compute style.

Turns out since we check each possible style declaration the order of
keys is determenistic and already can provide the right order.

Here removed computing specificity and ordering by it. Instead
rearranged style declarations lookup.
2024-08-18 15:27:03 +02:00
Oleg Isonen b465ccbc5b fix: Add hflex/vflex styles (#3954)
Closes https://github.com/webstudio-is/webstudio/issues/3953

## Description

We forgot to use hflex/vflex style presets when copying from webflow.

## 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-08-17 19:47:01 +02:00
Bogdan Chadkin 431e58dd34 refactor: rewrite normalize styles with css (#3951)
Our parser is good enough to represent any styles with css. Here
converted normalize styles into css and moved into sdk package.

Also fixed (remix) form component name
2024-08-17 15:00:31 +02:00
Ivan Starkov 50575df29b chore: Use secure cookies in local development and fix layout nesting (#3949)
## Description

- Use secure cookie at local development
- Fix layout nesting
https://remix.run/docs/en/main/file-conventions/routes#nested-urls-without-layout-nesting

## 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-08-17 00:53:29 +03:00
Bogdan Chadkin 19fd22d6e0 refactor: setup reusable style object model (#3948)
Ref https://github.com/webstudio-is/webstudio/issues/1536
https://github.com/webstudio-is/webstudio/issues/3399

Here added very basic setup for style object model. Computed all
normalized data with "computed" store.

It will let us to integrate style object model
into a few controls and test new engine.

Instance selector now is an input for getComputedStyleDecl to allow
looking into parent styles, like we do for flex child.
2024-08-16 22:09:55 +02:00
Jaya Krishna Namburu d8edefa7ab experimental: parse perspective-origin property value as tuples for x and y values (#3947)
## Description

This PR allows to parse the `perspective-origin` property value as
`tuple`. And added test cases for different possible values.

## Steps for reproduction

- Allows to parse `perspective-origin` values as tuples.

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

- [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)
- [x] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [x] added tests
2024-08-16 13:39:06 +02:00
Jaya Krishna Namburu 152405b558 experimental: Add UI controls for managing transform-origin property from style-panel (#3930)
## Description

This PR adds support for managing `transform-origin` property from the
UI. Transform property is managed using 3 axis. But the design from
[here](https://www.figma.com/design/xCBegXEWxROLqA1Y31z2Xo/%F0%9F%93%96-Webstudio-Design-Docs?node-id=10712-4063&t=qtwiMR7TMy1mPrBK-0).
Which is similar to some other tools too. But the UI becomes invalid if
users add all the 3 axis from the advanced panel. So trying something
new here to show all the 3axis instead of just displaying the `x` and
`y`.


![transform-origin](https://github.com/user-attachments/assets/f15d5b09-e9eb-49bc-9f46-2e7f5dd23726)


## Steps for reproduction
- Click `transform-origin` from the dropdown on transform section.
- Can change the values of `x` and `y` axises using the positional grid.
- Can change values of `x` and `y` using the individual inputs by
`scrub/manually entering/keyboard up&down`
- Add values for `transform-origin` from the advanced tab and update
those values using the UI controls.
- Reset the property using the label indicator.
- Use keywords from the suggestions dropdown for `x` and `y` axis like
`left`, `top`, `center` etc.

## 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)
- [x] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [x] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-08-16 11:37:20 +02:00
Jaya Krishna Namburu 54db3d90f5 experimental: add ui controls for perspective under transform controls (#3945)
## Description

This PR adds support for `perspective` property to be managed under the
transforms panel. This behaves very similar to `backface-visibility`
property that is under transforms.

## Steps for reproduction

- Add the `perspective` property under the transforms using the
dropdown.
- You can add `none` or any of the `length` values for the property.
- Able to reset the property and update using the `keyboard`, `scrub`
and `up and down` interactions.

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



![perspective](https://github.com/user-attachments/assets/98cf4753-7d5e-48ee-b654-470f0fdac5ff)
2024-08-16 11:29:08 +02:00
Bogdan Chadkin 3dd8c2f482 refactor: upgrade html-tags (#3946)
The new version exports types with normal casing,
the package is completely esm and reexports json with new syntax.

https://github.com/sindresorhus/html-tags/blob/main/index.js#L1

Also reused voidHtmlTags in collapsed instance logic.
2024-08-16 11:24:57 +02:00
Ivan Starkov bfd77c8c81 chore: Enable ssl for local development (#3937)
## Description

In case of hsts errors type `thisisunsafe` in chrome.
Or add never used domains to `/etc/hosts`



## 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-08-16 08:15:43 +03:00
Bogdan Chadkin ad1401a87f refactor: store indexed data in style object model (#3943)
Here reduced the work in every cascade value computation by storing all
data in normalized way.

These normalized maps can be created incrementally later.
2024-08-15 21:08:38 +02:00
Oleg Isonen ae22bf929d feat: style panel and settings panel keyboard shortcuts (#3936)
## Description

- style panel - S
- settings panel - D
- ESC inside focused input - unfocuses input, enabling shortcuts
- ESC in left sidebar panels closes the panels
- improved contrast for some text elements

My best guess for D is that its next to S like on keyboard

## 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-08-15 19:42:05 +02:00
Bogdan Chadkin c7e88531d7 refactor: optimize html styles access (#3939)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Styles are accessed for specific fields and never iterated. Here output
html styles as single map with composite key tag:property.
2024-08-15 18:26:26 +02:00
Bogdan Chadkin 3a35b6cbc3 refactor: rewrite html styles with css (#3938)
Ref https://github.com/webstudio-is/webstudio/issues/1536

We have a proper parser which can convert raw css into webstudio styles.
Rewrite should simplify maintaining and allow to change final format
without big rewrites.
2024-08-15 15:15:43 +02:00
Oleg Isonen 480d628512 feat: add component panel search improvements (#3933)
## Description

- keyboard accessibility (arrow keys)
- fix escape when search is not empty for components, fonts and images
- add "a" shortcut same as wf


## 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-08-15 02:21:40 +02:00
Bogdan Chadkin ffccbf38b0 refactor: load compact data into builder (#3922)
Load only arrays instead of maps from server
and convert data to map on client.

This reduces download size and server cpu usage.

340 kB -> 269 kB
218 kB -> 170 kB
22%
2024-08-14 00:12:15 +02:00
Oleg Isonen 7b80f1507d fix: navigator scrolling starts too early (#3932)
## Description

When dragging, scrolling starts to early an becomes annoying

## 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-08-13 19:14:07 +02:00
Chad Adams 7fbbc3c5dc feat: added ability to search / filter out components (#3925)
Media


![msedge_V4USxjE96J](https://github.com/user-attachments/assets/0e4881d1-ea6f-47b0-85fd-b6b65c265017)
2024-08-13 17:59:30 +02:00
Ivan Starkov 9d6773f382 fix: Incorrect style calculations (#3929)
## Description

Closes #3807

Test cases are here 
-
[Failing](https://main.development.webstudio.is/builder/5aecde38-362a-4315-8fd6-df7b94a1baad)
-
[Fixed](https://fix-styles.development.webstudio.is/builder/5aecde38-362a-4315-8fd6-df7b94a1baad)

They are fail on main and works in current PR

### Fixed

- [x] - Body display inline
- [x] - Switching between elements rendered styles for some period
incorrect
- [x] - Selecting display none in menu didn't work
- [x] - Html/Browser styles of invisible elements i.e. `display: none`
wasn't picked
- [x] - Unit sizes of invisible elements  wasn't picked

### New

Components with `display: contents` and only text nodes inside now have
outline (using range to get rect)
<img width="643" alt="image"
src="https://github.com/user-attachments/assets/4ee0eff2-66b5-405a-a88a-41191878bbbb">


## Steps for reproduction

-
[Failing](https://main.development.webstudio.is/builder/5aecde38-362a-4315-8fd6-df7b94a1baad)
-
[Fixed](https://fix-styles.development.webstudio.is/builder/5aecde38-362a-4315-8fd6-df7b94a1baad)

## 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-08-13 18:24:57 +03:00
Jaya Krishna Namburu e394f28b35 experimental: add transform-origin extractor for individual property handling in the style-panel (#3928) 2024-08-13 07:33:44 +05:30
Oleg Isonen f7c02b200c feat: tolerate comma instead of dot typo in style value input (#3926)
Part of https://github.com/webstudio-is/webstudio/issues/3914

## Description

Users often type comma instead of dot when entering css value numbers,
we want to auto convert them to dot.

## Steps for reproduction

1. type 1,2 in width input
2. hit enter, see it was converted to 1.2
3. type 1,2rem
4. hit enter, see it was converted to 1.2 and rem unit was applied

## 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-08-13 03:50:42 +02:00
Oleg Isonen 939a2b82dc feat: add shift/option modifiers to spacing and position input popovers (#3924)
Part of https://github.com/webstudio-is/webstudio/issues/3914

## Description

To allow entering a value from keyboard for all or opposite sides in
spacing and position controls, we now support same modifiers as we use
for drag guesture

## Steps for reproduction

1. open spacing
2. click on padding top number to open input
3. enter value, hold option or shift modifiers, then press enter
4. option places the value into opposite values, top/bottom, left/right,
shift changes all sides

## 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-08-12 22:23:06 +02:00
Oleg Isonen 1c7cfe1de8 fix: fix blinking navigator item focus ring (#3919)
Part of https://github.com/webstudio-is/webstudio/issues/3914


## Description

when clicking on collapsible trigger, previously focused item blinks if
we don't click event propagation


https://github.com/user-attachments/assets/f31507a3-8ccd-4ef2-97d4-590563724351


## 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-08-12 22:21:12 +02:00
Ivan Starkov 72350f3070 chore: Fix marketplace loading issue (#3921)
## 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-08-11 12:09:13 +03:00
Ivan Starkov 13da170ef4 experimental: Allow json in template literals (#3886)
## Description
closes #3872


- [x] - Builder support
- [x] - Publish support

## Steps for reproduction

Example

https://add-json.staging.webstudio.is/builder/8160e16d-5ab4-4249-86de-0c98a64526a3

https://test-json-ki9yj.wstd.work/

## 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-08-11 11:50:18 +03:00
Oleg Isonen 403d7b2328 fix: Stop wrapping icon with the label (#3918)
Part of https://github.com/webstudio-is/webstudio/issues/3914

## Description

Clicking on info icon page settings was resulting in input focus,
because it was inside the label

## 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-08-11 04:32:19 +02:00
Bogdan Chadkin f7a3a46b85 build: upgrade storybook (#3915)
Bumped storybook and removed unused addons.
2024-08-10 15:00:43 +02:00
Oleg Isonen b0d0b15573 chore: Rewrite loading animation (#3916)
## Description

1. optimized for showing continuous progress
2. removed darkening of the logo (user feedback)
3. made side panels same color as canvas to show less busy screen

## Steps for reproduction

1. click button
4. 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-08-10 14:41:22 +02:00
Ivan Starkov 46fc5d8f8c chore: Add timezone (#3913)
## 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-08-10 01:21:18 +03:00
Oleg Isonen 9b1ff5a09b chore: make initial value of the logo brightness always at least 30 (#3911)
## 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-08-09 23:30:49 +02:00
Oleg Isonen 76e4b467c5 feat: allow small screen size in preview (#3897)
## Description

A user wants to be able to test in preview mode using dev tools screen
simulation.

## Steps for reproduction

1. resize the window to mobile size
2. see there is no. "too small alert"
3. see under 640px topbar elements got reduced
4. see that canvas is almost full width

## 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-08-09 17:55:08 +02:00
Bogdan Chadkin 0c6a5ebbba refactor: migrate dashboard to postgrest (#3902)
Bumped type-fest everywhere to cast DashboardProject view
2024-08-09 17:47:49 +02:00
Bogdan Chadkin 3cfd9eec88 fix: support html form in ssg (#3908)
Here added RemixForm alias to native form in base sdk components. It
should allow users to write at least native forms. Naming was not chosen
well though.
2024-08-09 16:34:18 +02:00
Ivan Starkov e2a0878d85 fix: Make Navigation Items editable after opening Binding dialog (#3905)
## 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-08-09 17:27:56 +03:00
Bogdan Chadkin 6672db6f1b fix: color in markdown embed icon on canvas (#3907) 2024-08-09 13:19:41 +02:00
Ivan Starkov 33f90556b6 fix: Tree node edit (#3904)
## 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-08-08 20:15:04 +03:00
Bogdan Chadkin 4cda8738a1 refactor: migrate project to postgrest (#3900)
Switched to postgrest in "project" package.
Do 3 requests now when load project to get
latest build and latest static build since
they are not inferred as related in postgrest.
2024-08-08 14:08:51 +02:00
Jaya Krishna Namburu 025d9ad44c fix: background-position indicator in position grid for keywords (#3899)
## Description

fixes #3898 

fixes the background-position indicator in the position grid ui.

## Steps for reproduction

- Set the background-position-y while is top in the UI to bottom.
- The value is saved as it is a valid keyword for the property.
- The position indicator should be in sync with the canvas.

![Screen Recording 2024-08-08 at 2 49
47 PM](https://github.com/user-attachments/assets/922e2ac6-d307-4875-aaca-e18c3114ddf8)


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

- [x] made a self-review

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
2024-08-08 11:44:27 +02:00
Jaya Krishna Namburu 62c9f9bbce experimental: add backface-visibility property for transforms (#3802)
## Description

Allow to add `backface-visibility` property in the transforms section.
`hidden` is not possible on the `backface-visibility` property. Because
it takes only `visible` or `hidden` as value. The other way to simulate
hidden is to reset the value to `visible` because that's the default
value for property. But i don't think it's really needed to manage this.

## Steps for reproduction

1. Click on the `+` icon on the transforms section.
2. Select `Backface Visibility`
3. This will add the property and show the value in the transform layer
list.
4. Click on the layer list item and you can change the property value.


## 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-08-08 08:05:27 +02:00
Ivan Starkov b97c55e494 fix: broken copy paste when inputs or text selection were used before (#3894)
## Description

In some cases copy/paste didn't work

## Steps for reproduction

1. Focus on an input in the style panel (width, style source) or name
input in settings. Select the text, then copy and paste any instance in
the Navigator tree or on the Canvas.
2. Edit text in a paragraph on the Canvas. Select text (single or
multiple lines), then press Cmd+X. The paragraph should not be deleted.
3. Select CSS preview text, then select an instance in the Navigator.
Press Cmd+C, then Cmd+V.

## 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-08-07 22:56:00 +03:00
Bogdan Chadkin c1d812353e feat: highlight markdown in code editor (#3893)
Closes https://github.com/webstudio-is/webstudio/issues/3485

Last piece in markdown support is code highlight.

<img width="1024" alt="Screenshot 2024-08-07 at 14 19 07"
src="https://github.com/user-attachments/assets/9f1f89eb-d340-4999-94eb-a98c7afc5a49">
2024-08-07 14:43:02 +02:00
Bogdan Chadkin 4429b19c0e build: upgrade prettier (#3892)
New prettier version wraps nullish coalescing with parens when used
inside of ternaries.
2024-08-07 14:27:37 +02:00
Oleg Isonen ee7987e134 fix: free up the wstd subdomain after project was deleted (#3869)
## Description

Closes https://github.com/webstudio-is/webstudio/issues/3861

## 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-08-07 14:17:48 +02:00
Bogdan Chadkin a904d2cdc7 feat: add markdown embed component (#3884)
Ref https://github.com/webstudio-is/webstudio/issues/3485

Added component with descendants support.

<img width="861" alt="Screenshot 2024-08-06 at 15 53 33"
src="https://github.com/user-attachments/assets/4c488573-f52c-4661-b626-cedc113ee10c">
2024-08-07 00:51:41 +02:00
Ivan Starkov 749d56920f chore: Load fixtures by build id, use current deplyment for sync (#3890)
## Description

- [x] - Sync fixtures by buildId `pnpm cli sync --buildId blabla`
- [x] - Sync with current branch deployment 

## 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-08-07 01:29:05 +03:00
Oleg Isonen 2fb558bfd3 fix: Prevent duplicate token when renaming (#3873)
Fixes https://github.com/webstudio-is/webstudio/issues/3776

## Description

During renaming of the token

- when token name is less than 1 character - show error state
- when token name already exists - show error state

Fixed a bunch of bugs with esc, error handling and switching to editing
another token while still editing the first one



https://github.com/user-attachments/assets/5833e611-235b-4c2c-a3ed-3ee521ac5fd1



## 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-08-07 00:02:40 +02:00