Commit Graph
3073 Commits
Author SHA1 Message Date
Bogdan Chadkin 36b98ef3f6 Add "show" system prop for conditional rendering (#1724)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1529

Here added system "show" prop which already works to not render
component but has lack of dynamic behavior based on some state.
2023-06-19 21:01:50 +03:00
Bogdan Chadkin 89c44b5dc1 Add Build.dataSources (#1819)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1529

Here initial setup for data sources which are will be used to maintain
runtime stores. It has unique id, name for ui, type and defaultValue to
initialize store with it.

For now added only string and boolean types which are necessary for Form
component. In the future will be extended with more types.
2023-06-19 20:36:59 +03:00
Bogdan Chadkin 1be61e59bb Compute currentColor (#1815)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1536

Here replaced browser getComputedStyle for currentColor with computing
from data.

`color: inherit` is now considered same as `color: currentColor` and
displayed properly in UI.

Changed initial value for color from inherit to black (in mdn-data it's
canvastext).
2023-06-19 16:27:27 +03:00
Bogdan Chadkin a64963cea7 Add "clear styles" option for local style source (#1814)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1799

Here added "Clear styles" option in "Local" style source menu.
2023-06-19 13:02:27 +03:00
Bogdan Chadkin 70963450f4 Set only parsed values from style panel (#1811)
Here removed legacy part which always set unparsed value and needed to
parse it before saving in db. Many cases are easily converted to
keywords.

Blocker for box-shadow support
https://github.com/webstudio-is/webstudio-builder/pull/1634
2023-06-19 12:45:16 +03:00
Bogdan Chadkin 4d08a50dc1 Disable scroll when browser or resolution is not supported (#1813)
Ref
https://discord.com/channels/955905230107738152/955907841070346300/1119664468557828156

Set overflow hidden as simplest way. Need to test on different devices.
2023-06-18 18:57:53 +03:00
Bogdan Chadkin 08ae630e41 Optimize transactions (#1816)
Ref
https://github.com/webstudio-is/webstudio-builder/pull/1812#issuecomment-1595795895

1. prevent sending requests with empty transactions or empty changes
2. optimize style updates to not replace style source selections if
instance and style source is already added to selection
2023-06-18 18:46:32 +03:00
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
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
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
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
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
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 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
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 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
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
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 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 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 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
Ivan Starkov e1b0c7808e Update typescript (#1734)
## Description

Removes errors with vscode and tsconfig

## 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-09 11:03:23 +03:00
Ivan Starkov 9a446787d1 Release 0.72.0 (#1733)
## 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-09 00:59:53 +04:00
Ivan Starkov 5e439b77e5 Publish tracking (#1726)
## Description

Add `latestBuild` for each entry in publish dialog
Now we are tracking publish stat for each domain. 
This information is needed to show checkboxes in publish design (next
PRs).

2 new Views were created.

To get the latest build by project + domain
To get the latest build for wstd.xx domain

Publish status is shown per domain (as not every domain would be
published each time)

<img width="362" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/b4e0357a-63f5-47ba-a119-59ef1adf81d2">

During publish all buttons are disabled as per design

<img width="348" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/94720bd3-4bda-488c-81f7-71ea9ba2d530">

Also added tooltip on publish button (not in design)

<img width="366" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/c764a785-aea9-487b-a480-642410293ee3">



## 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-09 00:55:24 +04:00
Oleg Isonen b71dc75184 Vimeo (#1702)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1688

## Description

Vimeo Component

## Steps for reproduction

1. Add vimeo
2. play with props

## 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-08 02:07:58 +02:00
Ivan Starkov d318bdaa1e Update domain status on load (#1725)
## Description

- When opening the publish dialog, we automatically check failed
domains. We stop checking automatically after 24 hours. When the user
hits Check Status - we reset the 24h counter


![Screen Recording 2023-06-05 at 19 26
19](https://github.com/webstudio-is/webstudio-builder/assets/5077042/a8fee835-59a2-4edf-8685-ae6218b1af2c)


This should gone in the future
https://github.com/webstudio-is/webstudio-builder/issues/1723

## 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-05 19:42:29 +03:00
Oleg Isonen 5d65f28476 Token Deletion Code Review (#1722)
## Description

Remaining code review change requests from
https://github.com/webstudio-is/webstudio-builder/pull/1695


## 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-05 01:47:01 +02:00