3748 Commits
Author SHA1 Message Date
Ivan Starkov 611f12b8ea Release 0.75.0 (#1774)
## 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-builder/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
0.75.0
2023-06-16 01:36:55 +04:00
Ivan StarkovandOleg Isonen 747facc545 Add animated loading icon on publish button (#1778)
## Description

Add animated loading icon on publish button

ref #1715

<img width="335" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/23703173-1b64-4d9a-9635-f558b76249a0">


Todo:
- [x] -
https://discord.com/channels/955905230107738152/1117940560574021782

Errors are now aligned

<img width="347" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/6eb9bfe5-92b6-45b9-9783-b8cc20f25f39">



## 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-builder/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: Oleg Isonen <oleg008@gmail.com>
2023-06-16 00:30:18 +03:00
Bogdan Chadkin 87ea4a40c3 Fix focus after style source duplicating (#1805)
Ref
https://discord.com/channels/955905230107738152/955907841070346300/1118983173037105163

Newly created elements cannot obtain focus in effect. We need to focus
in the next frame.
2023-06-16 00:28:44 +03:00
Bogdan Chadkin c482db745c Add combined control descriptions (#1803)
Ref https://github.com/webstudio-is/webstudio-builder/pull/1785

Here fixed generated height description and added custom descriptions
for following controls

- background
- borderWidth
- borderStyle
- borderColor
- borderRadius
- sizing
2023-06-16 00:19:28 +03:00
Ivan Starkov 91e0c8f505 Add pending button (#1804)
## Description

Add pending button state
Button size is preserved in case of button is not full-width even in
pending state

<img width="258" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/9f5f2e3f-9f7c-4f24-be2b-27fe0f6dd9e4">

ref #1715

## Steps for reproduction

```bash
cd packages/design-system
pnpm storybook:run
```

open 

http://localhost:6006/?path=/story/library-button--button


## 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-builder/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
2023-06-16 00:07:43 +03:00
Bogdan Chadkin 64f3f37256 Fix insert into container without children (#1802)
Ref
https://discord.com/channels/955905230107738152/955907841070346300/1118910260871168021

Container without children got additional empty text wrapper. Here fixed
this by checking children existence.
2023-06-15 21:55:21 +03:00
Ivan Starkov 70b5785c71 Change caret color to be visible (#1800)
## Description

Show cursor on edit even if text is transparent
example
https://webstudio-builder-git-caret-color-webstudio-is.vercel.app/builder/f74e30c0-acfd-4bab-bf35-beaa19f41d0c
Edit any text


## 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-builder/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
2023-06-15 22:12:32 +04:00
Bogdan Chadkin f06b35e35d Move types above import/require conditions (#1801)
Ref
https://github.com/webstudio-is/webstudio-builder/pull/1708#discussion_r1229878400
2023-06-15 10:46:42 +03:00
Ivan Starkov 27ddda22a5 Fix hydration error (#1795)
## Description

Fixes this on each start

```
react_devtools_backend_compact.js:2367 Warning: Prop `className` did not match. Server: "c-dKXKjp c-gcikI language-css" Client: "c-dKXKjp c-gcikI"
    at pre
    at div
    at div
```

Looks like a bug with pre and code element combination in react
hydration



## 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-builder/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
2023-06-15 00:58:45 +04:00
Bogdan Chadkin f15339e002 Check types outside of src folder (#1789)
We generate dts type for each package on publish.
It requires us to include only "src" to output same structure as in src
folder. Though we have configs and cli scripts outside of it which
should be typechecked, they cannot be ignored.

Ideally would be to have one-line commands in package.json. Though
typescript always has problems with build step. In this case the CLI
have everything to configure this except "include" and "exclude" flags.

So here to workaround that I added tsconfig.dts.json to distinct dts
generation and typechecking.

Blocker for https://github.com/webstudio-is/webstudio-builder/pull/1634
2023-06-14 23:37:24 +03:00
Ivan Starkov ad5419a4fd Fix height jumping when editing text (#1788)
## 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-builder/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
2023-06-14 22:31:16 +03:00
Bogdan Chadkin b715217a71 Show style source menu button when menu is open (#1792)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1790
2023-06-14 22:29:14 +03:00
4d270452ed Clicking the current breakpoint should not deselect the breakpoint. (#1777)
Prevents the breakpoint to be deselected #1764

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
Co-authored-by: Bogdan Chadkin <bogdanchadkin@protonmail.com>
2023-06-14 22:17:26 +03:00
Taylor NowotnyandBot 03811b0668 removed old "state" gradient and replaced with "unselected" gradient … (#1791)
…(background.style-source.gradient.unselected)

---------

Co-authored-by: Bot (build-figma-tokens.yml) <bot@localhost>
2023-06-14 21:18:00 +03:00
Bogdan Chadkin c40f5e507d Replace @types/css-tree override with patch (#1783)
Split from https://github.com/webstudio-is/webstudio-builder/pull/1634

We may need more things from css-tree and reexporting everything is
harder to maintain so here added patch instead of types override.
2023-06-14 17:51:13 +03:00
Ivan Starkov 0750cd03f5 Fix body layout (#1784)
## Description

closes #1781
Also makes body/html layout more modern fixing additional bugs
More details
https://twitter.com/ChallengesCss/status/1471128244720181258

## 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-builder/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
2023-06-14 18:32:49 +04:00
Bogdan Chadkin fa8dc705ba Prevent selection of pasted data (#1782)
Ref https://github.com/webstudio-is/webstudio/discussions/34

Looks like selection of pasted data does not work well so here remove
it.
2023-06-14 16:35:36 +03:00
Oleg Isonen 48c45cca5b Add first component description for slot (#1772)
Components like Slot need explanation, so I added a new field -
description.
2023-06-13 12:25:12 +03:00
Bogdan Chadkin 65206a1c4a Fix font search field (#1776)
- center search icon vertically
- get rid of native search button
- fix width jumping when type into search field
2023-06-13 11:33:48 +03:00
Bogdan Chadkin 1cf303ef7c Fix position: fixed on body (#1775)
Collapsed logic considered html as webstudio instance element. Here just
skipped it.
2023-06-13 11:20:18 +03:00
Bogdan Chadkin 08bf34a607 Override inherited with html style (#1773)
Html styles override inherited styles. This fixes the issue with link
inheriting from body instead of showing predefined in browser style.

<img width="281" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/f854b55a-ec6d-40e8-8fa0-11b7d13cddf1">

<img width="321" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/52823ecd-f6ee-4788-91ef-b4cb635bc1aa">
2023-06-13 10:01:15 +03:00
Ivan Starkov 380e6e9da7 Release 0.74.0 (#1771)
## 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-builder/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
0.74.0
2023-06-13 07:46:11 +03:00
Oleg Isonen 4874e4093d Tooltips improvements (#1770)
## Description

- Fixes a bunch of wrong logic for showing style source origin info in
the tooltip
- Renders GPT descriptions

## Steps for reproduction

1. check tooltips in style panel


## 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-builder/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
2023-06-13 07:44:26 +03:00
Ivan Starkov 9cc34df042 Fix css preview (#1769)
## 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-builder/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
2023-06-13 07:39:31 +03:00
Ivan Starkov 43464bbe59 Fix tooltip (#1768)
## Description

Fix tooltip to show right color etc values

<img width="357" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/482b67a0-fc25-4856-b433-78139d0ae8ac">


Before was `black`

## 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-builder/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
2023-06-13 03:31:17 +04:00
Ivan Starkov 173cc71928 Fix link color (#1767)
## Description

Now we show in the builder the right color for visited and link itself

<img width="291" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/1c691903-87c9-4837-8eae-dfd1b980ad0f">

Tooltip is wrong and not fixed in this PR


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

## 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-builder/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
2023-06-13 03:17:47 +04:00
Ivan Starkov afcc738961 Release 0.73.0 (#1762)
## Description

update npm

## 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-builder/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
0.73.0
2023-06-13 00:45:37 +04:00
Oleg Isonen b5d6d2feb3 Reduce gap in position, move it further down out of the way (#1766)
## 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-builder/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
2023-06-13 00:38:45 +04:00
Bogdan Chadkin f78cf8fe68 Add breakpoints descriptions (#1757)
Added tooltips to breakpoints similar to webflow.

<img width="352" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/74e94cd2-46a4-4af6-80cc-603c7a1c68bb">
2023-06-12 23:12:00 +03:00
d207286df3 CSS data descriptions generation script (#1759)
## Description

Using ChatGPT, this scripts generates descriptions for CSS properties
and declarations (property-value).
It uses `keywordValues` from
[`src/__generated__/keyword-values.ts`](https://github.com/webstudio-is/webstudio-builder/blob/css-data-descriptions/packages/css-data/src/__generated__/keyword-values.ts)
to get a list of all the properties and values.

The result is a TS module located at
`./src/__generated__/property-value-descriptions.ts` which exports:
- properties
- declarations

By default it generates descriptions only for new properties/values,
however you can use the `--forceRegenerate` flag to regenerate
everything.

When it comes to generating descriptions for declarations whose value is
a color eg. `background-color: orange` we generate a description for a
generic `property: {color}` declaration (e.g. `background-color:
{color}`) and GPT will generate a description template with a
placeholder `{color}`.

The script then repeats the template for every color value, replacing
`{color}`. This is to avoid generating a ton of similar description and
wasting GPT tokens.

The script needs two env variables:
- process.env.OPENAI_KEY - Your OpenAI API key
https://platform.openai.com/account/api-keys
- process.env.OPENAI_ORG - Your OpenAI Org ID
https://platform.openai.com/account/org-settings

## Steps for reproduction

Run it 

```
OPENAI_KEY=your-key OPENAI_ORG=your-org pnpm build:descriptions
```

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - review sample descriptions

## Before merging

- [x] Get approval on sample descriptions
- [x] Generate all the descriptions
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory

---------

Co-authored-by: Giuseppe Gurgone <ggurgone@users.noreply.github.com>
Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-06-12 22:05:06 +02:00
Oleg Isonen 66aec54e09 New tooltips component (#1746)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1729,
https://github.com/webstudio-is/webstudio-builder/issues/719
https://github.com/webstudio-is/webstudio-builder/issues/1730

## 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-builder/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
2023-06-12 21:56:22 +02:00
Oleg Isonen a8572e7917 Experimental universal input (#1732)
## Description

New Text control for props is using a new UniversalInput component which
allows us to dynamically decide if we need a single-line input or a
multi-line textarea.

Problem it is solving is that we don't know from data type string if
user needs a textarea or an input, so we render a universal input.

We can still set rows to a number in the meta, so that a certain field
is always multiline initially, by default:
- empty field will be single-line input
- multi-line text will automatically turn into multi-line input

Single-line mode:
- enter saves
- shift + enter - adds newline and saves

Multiline-mode:
- enter saves and ads newline
- cmd+enter - saves, no newline


## Steps for reproduction

1. add any component
2. open properties panel and playwith any text input

## 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-builder/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
2023-06-12 20:00:44 +02:00
Ivan Starkov 3178ddcc60 Add effects section with opacity and cursor (#1760)
## Description

ref #879

Known issues not fixed here.

Scrub on opacity doesn't work as expected
as depending on opacity dimension it has different min-max and step.

Also any numeric value of opacity is valid css value, and just clamped
if it exceeds, so we can't consider values out of 0-1 range as percents
too.

So couldn't be fixed fast.





## 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-builder/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
2023-06-12 19:34:47 +04:00
Ivan Starkov 3c34035a7a Remove domains flag (#1761)
## 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-builder/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
2023-06-12 18:30:26 +03:00
Bogdan Chadkin fd8ac62296 Drop deprecated system colors (#1758)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1301

## 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-builder/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
2023-06-12 17:11:11 +02:00
Bogdan Chadkin e13f3d203d Fix paragraph template wording (#1754)
Ref
https://discord.com/channels/955905230107738152/955907841070346300/1114249116566962227

## Code Review

- [ ] hi @kof, I need you to do
  - detailed review (read every line)

## 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-builder/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
2023-06-12 16:14:33 +02:00
Bogdan Chadkin 1d812c33ca Fix preview (#1755)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1720

- restore panels state after enabling and disabling preview state
- fixed canvas jumping while switching between preview and canvas

## 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-builder/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
2023-06-12 16:10:51 +02:00
Oleg Isonen b19142881b Css preview (#1740)
## Description

This PR introduces a CSS preview

<img width="934" alt="Screenshot 2023-06-10 at 03 48 55"
src="https://github.com/webstudio-is/webstudio-builder/assets/52824/c0d30136-f084-4cd5-a3e1-b98a2e29675b">



## Steps for reproduction

1. select any instance, add some styles
2. see in navigator css preivew

## 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-builder/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
2023-06-12 15:52:52 +02:00
Bogdan Chadkin 1263a9ab08 Provide params with context (#1743)
Ref https://github.com/webstudio-is/webstudio-builder/issues/213

Before we set params globally which works yet only because they do not
change often. Here explicitly passed all params with context or by
passing them where necessary.
2023-06-12 16:51:27 +03:00
Ivan Starkov 3441e1b160 Fix unhandled background parsing error (#1753)
## Description

closes #1751

useEffect unsubscribe called parsing and unhandled error caused
everything to break


## 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-builder/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
2023-06-12 16:10:52 +04:00
Ivan StarkovandOleg Isonen c534eb6965 Entri (#1738)
## Description

Implements entri service support

## Steps for reproduction

Wait for SaaS release. Or locally add following env variables to the
`.env` file
```
ENTRI_APPLICATION_ID=webstudio
ENTRI_SECRET=$(bwget WS_ENTRI_SECRET)
```

<img width="361" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/eafcc7ec-1bc7-448f-be78-50ae89909d34">


<img width="724" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/6d97a08b-1763-4ca4-970f-96836b4d5cd2">



## 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-builder/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: Oleg Isonen <oleg008@gmail.com>
2023-06-12 16:10:27 +04:00
Bogdan Chadkin 3d345da0e7 Fix popups (#1752)
Ref
https://discord.com/channels/955905230107738152/955907841070346300/1117567308475400262
https://github.com/webstudio-is/webstudio-builder/issues/1750

- render combobox content conditionally
- supress downshift error about missing ref on menu
- fixed pointer events on iframe when popover is open
2023-06-12 14:58:51 +03:00
Bogdan Chadkin 96cbe966eb Bump lexical (#1749)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1698
https://github.com/facebook/lexical/releases

The latest lexical version seems fixed the issue with scrolling
instances into view.
2023-06-12 09:39:11 +03:00
Bogdan Chadkin e405863d1b Avoid default import from react (#1744)
Default import cannot be optimized by mangling variables so better
restrict with linter.
2023-06-11 19:18:12 +03:00
Bogdan Chadkin 6fa95e2964 Drop radio button field and checkbox field (#1745)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1552

These two components were added before we had meta.template and dropping
into rich text labels support.

Now we can use composition and remove redundant components.
2023-06-11 19:07:18 +03:00
Bogdan Chadkin 21f8d1aab2 Merge text and block components (#1742)
Ref https://github.com/webstudio-is/webstudio-builder/pull/1703
https://github.com/webstudio-is/webstudio-builder/issues/1677

- renamed TextBlock to Text in db and meta
- replaced LinkBlock with Link in db and meta
- renamed Styled Text label to Text
2023-06-11 14:58:34 +03:00
Oleg Isonen eac52daab5 Reset any style panel property with option+click (#1741)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1730

## Description

- [ ] any flex items
- [ ] spacing  

## Steps for reproduction

1. set flex value on every flex and spacing property
2. option+click to reset

## 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-builder/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
2023-06-11 12:25:22 +02:00
Bogdan Chadkin 891a96e0c9 Fix editing text inside button (#1739)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1719

Buttons has issue with unavoidable space which prevents entering spaces.
Here bind lexical to temporary span inside of button. Now space works
fine.
2023-06-11 12:11:33 +03:00
Bogdan Chadkin dcae1b5a9d Allow inserting into editable containers (#1735)
Here I removed "rich-text" type from components. Instead "container" can
be edited when has only text or rich text children.

And any time user can drop into editablle container which will wrap all
text and rich text children into "Span" component.

Had to implement position adjustment to consider text children which do
not have representation in navigator tree and canvas dnd.

Span has temporary SpanContainer name to not conflict with existinig
Span for styled text in rich text. Will rename in other PR when remove
no longer necessary components.
2023-06-10 00:55:46 +03:00
Oleg Isonen 7bef21719f Fix object fit, ignore loader (#1737)
## Description

- I used object position instead of object fit by mistake
- Unrelated: ignore loader prop

## Steps for reproduction

1. add vimeo
2. select preview image
3. see it has object fit cover

## 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-builder/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
2023-06-09 16:59:52 +02:00