3837 Commits
Author SHA1 Message Date
Ivan Starkov 98164cde2a Update version (#1935)
## 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.80.0
2023-07-16 13:51:30 +03:00
Bogdan Chadkin eb0bc5ff77 Support pasting embed templates (#1936)
Here refactored copy paste plugin system to try each plugin until it
succeeds. This way we can have multiple solutions to copy paste from
plain text. For example embed template is hand written text and should
succeed before markdown starts parsing it.

```json
{
  "@webstudio/template": [
    {
      "type": "instance",
      "component": "Box",
      "children": [
        { "type": "text", "value": "Hello, I'm Box!" }
      ]
    }
  ]
}
```
2023-07-16 13:38:07 +03:00
Ivan Starkov d741ea3889 Race comment (#1934)
## 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-07-16 13:36:37 +03:00
50098fb5e9 Set input and textarea to display block (#1938)
## Description

Browser default is inline, but with most certainty this is not practical

PR is on top of
https://github.com/webstudio-is/webstudio-builder/pull/1937

## Steps for reproduction

1. add input, textarea
2. see they are rendered as display block on its own row

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

---------

Co-authored-by: istarkov <istarkov@gmail.com>
Co-authored-by: Bogdan Chadkin <trysound@yandex.ru>
2023-07-15 13:26:58 +02:00
Ivan Starkov 97f0cc00d7 use useMount instead of sync once (#1937)
## Description

useSyncInitializeOnce is incompatibel with modern React especially in
dev mode.
useUnmount can't be used with it and any hooks with cleanup would give
the same issue.

Should affect only devmode
2023-07-15 14:02:43 +03:00
Bogdan Chadkin b424f9fbde Fix invalid ancestors for deeply nested instances (#1932)
Fixed the issue with pasting checkbox into button
which is wrapped into label

Prevented inserting label, checkbox, radio button and input into
buttons.
2023-07-14 19:28:29 +03:00
Ivan Starkov ae74469f10 Fix project creation race condition (#1933)
## Description

Fix create project useEffect not working.
Fix double redirect.
Fix card hover

## 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-07-14 18:23:17 +03:00
Jaya Krishna Namburu 37b7672a43 (feat): Add ability to edit name of a tree node (#1909)
## Description

1. What is this PR about (link the issue and add a short description)

Users should be able to set the name of any node inside the tree-view. 

## Steps for reproduction

1. Select any node from the tree
2. Double click the node
3. Node enters into the edit mode.
4. Enter should save the name for the node.
5. The name should reflect everywhere in the application.

Things to take care of

- [x] The node should get into edit mode when you `double` click the
tree node.
- [x] The node should enter edit mode when you click `ctrl+r`
- [x] The keyboard shortcuts like, `up`, `down` expand and other tree
operations should work as expected.
- [x] `Esc` or loose of focus should set the name back.

closes #222 

## 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)
- [ ] 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-07-14 16:49:33 +02:00
Bogdan Chadkin 7364b51210 Run jest with sources (#1930)
Here added custom condition to jest config to make it load source code
instead of build artifacts.

This means we no longer need to rebuild after changing code in other
package
and we may even no need to generate cjs anymore.
2023-07-14 17:30:31 +03:00
Ivan Starkov 01faa89826 Add Value Tooltips (#1928)
## Description

ref #1798

- [x] - Text button groups tooltips should be resetable see
https://discord.com/channels/955905230107738152/1128272360630399016/1128800552743084263
as no other way to reset it (except alt button)

Value Tooltips for toggle groups

- [x] - Also fixed tooltip hovering issues on toggle groups see grace
area
<img width="273" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/d6b584d5-18ed-4b8b-9185-421dc373a567">


If group has no label we show reset on button

<img width="287" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/dfe00cf8-d1d1-49b5-951b-eb0b25084c29">


---


<img width="282" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/77dae4fa-80cc-47ce-b021-59d40a111ed5">


I also added tooltips on `...` Buttons, it shows all current values of
dialog underline

<img width="305" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/801980a7-195a-4fcf-818e-cc300dab9adc">




## Steps for reproduction

Toggle groups tooltips changed:
<img width="299" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/bd895eec-920f-4c60-be91-1ca6c8cde4a3">

<img width="291" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/7d4c5ab9-3244-485a-8e5d-a7d7b87a3853">
<img width="337" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/0489dcdb-d0fd-4ed9-aadf-06f57813e2a0">
<img width="514" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/feada2d4-bb39-495e-9bac-86183aca5ab7">
<img width="354" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/9eac96c5-cf45-42d2-9262-dede29a3de2c">




## 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-07-14 14:50:09 +03:00
Oleg Isonen fde3c2c312 Fix ending contenteditable mode layout recalc (#1931)
## Description

Bug discovered in this PR
https://github.com/webstudio-is/webstudio-builder/pull/1909

When ending contenteditable, parent doesn't recalc the size of contents,
so I have to detouch and reinsert the edited element to force it.

## Steps for reproduction

1. start editing style source name and put a LOT of characters
2. exit editing mode
3. before: it would have empty container
4. now: renders and shows ellipsis

## 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-07-14 11:49:33 +02:00
Bogdan Chadkin 5e23d43278 Drop deprecated components from design system (#1927)
- DeprecatedHeading
- DeprecatedLabel
- DeprecatedText

Also dropped lodash.merge from design-system package
2023-07-13 18:15:45 +03:00
Bogdan Chadkin 50af5962d4 Bump nano libraries (#1925)
### Nanoid

https://github.com/ai/nanoid/blob/main/CHANGELOG.md

Here nanoid removes dual mode and becomes esm only

### Nanostores

https://github.com/nanostores/nanostores/blob/main/CHANGELOG.md

- deepMap store
- subscribers no longer called when value is not changed
- use-sync-external-store polyfill no longer installed

### Small updates

- nanoevents
(https://github.com/ai/nanoevents/blob/main/CHANGELOG.md#80)
- camelcase
(https://github.com/sindresorhus/camelcase/releases/tag/v7.0.0)
- html-tags
(https://github.com/sindresorhus/html-tags/releases/tag/v3.3.0)
- pretty-bytes
(https://github.com/sindresorhus/pretty-bytes/releases/tag/v6.1.0)
2023-07-13 16:11:34 +03:00
Ivan Starkov 0c23cf580a Fix toggle group focus interfere, show error in storybook (#1923)
## Description

Error:

- [x] - <img width="112" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/ea3d781d-2f8b-403a-847f-8b01b3675f8e">
- [x] - fixed toggle group button size was 26px must be 24px
- [x] - also made outline offset -2px 


## 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-07-12 22:50:33 +03:00
Ivan Starkov 5e072c7242 Position section (#1879)
## Description

ref #1858

Position section without "relative to element" (will do in next PR):

<img width="258" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/5184b5df-dc95-4b4b-b93b-00b4a63ac20b">

Changed label fonts on fonts from design. IMO non monospaced fonts for
numeric dynamic labels is disaster.
Here on 3-4 symbols difference in font length could be serious amouunt
pf pixels like '5'

Made label margins like in design 2px instead of 1. 

Simlified label logic to use css only solution.

Having that a lot of code is shared with spacing secion some bugs can be
in both

Next PR:
<img width="270" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/a7c0c842-eaf9-477e-9267-b9b29e087f41">


## Steps for reproduction

Goto spacing and position section, play with params.

## 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-07-12 00:29:14 +03:00
Oleg IsonenandIvan Starkov 84c06569b9 Condense settings and properties tabs into one (#1902)
Closes #1880
Mostly also #1905

## Description

Merging Settings and properties


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

---------

Co-authored-by: Ivan Starkov <istarkov@gmail.com>
2023-07-11 22:50:26 +02:00
Bogdan Chadkin 05df3910f5 Support effectful expressions in component actions (#1914)
Here added support for callbacks or event handlers on components which
basically can do only assignment to variables for now with extended
(with assignment operator) syntax of expressions.
2023-07-11 20:27:06 +03:00
Bogdan Chadkin a8ecaf3a99 Migrate storybook to new format in sdk (#1924)
Here bumped storybook and migrated stories to Meta and StoryObj types
from deprecated ComponentMeta and ComponentStory.
2023-07-11 20:15:38 +03:00
Oleg Isonen 432ab19456 Update README.md (#1922)
fixes
https://github.com/webstudio-is/webstudio-builder/issues/1917#issuecomment-1628827257

## 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-07-10 21:46:36 +02:00
Bogdan Chadkin b5a1b794e2 Fix text toolbar overflow (#1919)
This fixes an issue with text toolbar below top navigation because of
wrong middlewares order. Here used the right order and bumped/deduped
floating-ui.
2023-07-10 20:59:41 +03:00
Bogdan Chadkin db31e37751 Extend tsconfig from package in remix apps (#1920)
Closes https://github.com/webstudio-is/webstudio-builder/issues/121

Looks like since upgrade to remix 1.18 tsconfig is not longer updated
and we finally can access reusable config by package name.
2023-07-10 20:28:21 +03:00
Ivan Starkov 652b52cd50 StyleInfo unification (#1918)
## Description

Use same code to get StyleInformation by instanceId as was used for
selectedInstanceId.

Works  right only for the ancestors of selected element


## 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-07-10 19:38:23 +03:00
Bogdan Chadkin 8b1034c375 Use s3 rest api instead of library (#1515)
Here replaced s3-client library with rest api to upload and delete
files.
Though to simplify generating of Authorization header reused their
signature-v4 package.
Even for such small utility aws adds 11 dependencies. But overall 94 ->
11 is a good result, pnpm will be a little faster, vercel cold start
smaller.

```diff
du -ckd1 node_modules
- 686952
+ 672964
```

Btw figured all edge cases with the help of ChatGPT. It's not always
correct but together with human can produce working code.
2023-07-10 17:04:10 +03:00
Bogdan Chadkin 518cced7db Upgrade to remix 18 (#1876)
Enabled v2_headers and increased size limit

- https://github.com/remix-run/remix/releases/tag/remix%401.18.0
- https://github.com/remix-run/remix/releases/tag/remix%401.17.0
- https://github.com/remix-run/remix/releases/tag/remix%401.16.0
2023-07-10 15:26:13 +03:00
Bogdan Chadkin 6440b79369 Refactor sync server with async iterators (#1913)
Here the logic is following. We iterate over transactions polling and
every set of transactions retry until request is complete.

The code becomes more straightforward and solves
https://github.com/webstudio-is/webstudio-builder/pull/1812 for free
because nothing is scheduled until requests are complete and
transactions are queued in array.
2023-07-10 12:35:48 +03:00
Ivan Starkov 09e81f08ca Fix numeric scrub in case of body is scrollable (#1916)
## Description

Affects storybook env, in the buider we don't have scorllable body so
cursor doesn't cause body to overflow

## 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-07-09 23:40:15 +03:00
Bogdan Chadkin 3cdb2dbbc4 Support effectful expressions (#1908)
Here added two new utilities for generation and executing individual
expressions. Such expressions can use assignment operator to change any
variable.

This give us less opinionated solution for "set" action. We can just
execute any code our parser supports.
2023-07-08 12:15:40 +03:00
Bogdan Chadkin b5d65d4bfa Show badges on inherited styles (#1911)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1895

<img width="249" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/a5feb845-ecdc-4c81-aa97-059bf0e12ad8">
2023-07-08 11:26:20 +03:00
Oleg Isonen c1243d6df7 Disable spellcheck (#1907)
## Description

Textarea/inputs in the builder don't need spellcheck

## Steps for reproduction

1. open props panel
2. type something in any text inputs

## 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-07-07 09:31:38 +02:00
Oleg Isonen cda2c05020 Roboto font fallback for arial (#1898)
## Description

Closes #1884 

## Steps for reproduction

1. use Arial on any element
2. check in dev tools if roboto is a fallback

## 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-07-05 14:17:15 +02:00
Ivan Starkov 4411d91c86 Update versions 0.79.0 (#1901)
## 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.79.0
2023-07-05 14:13:22 +03:00
Ivan Starkov 3587c03f32 Revert override browser default tag (#1900)
## 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-07-05 12:46:06 +03:00
Ivan Starkov 5cfedb69bd Change pending button icon loading size (#1869)
## Description

closes #1715

## 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-07-05 00:57:12 +03:00
Ivan Starkov 596aa50b9f Update version 0.78.0 (#1899)
## 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.78.0
2023-07-04 22:32:14 +03:00
Ivan Starkov 0374894638 Use node-fetch for trpc-interface to fix vercel/remix override (#1897)
## 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-07-04 11:16:38 +03:00
Ivan Starkov 5909fe5ba9 Upate version (#1896)
## Description

npm libs update

## 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.77.0
2023-07-03 23:51:36 +03:00
Bogdan Chadkin 2a0900b4c4 Remove size-test from publish 2023-07-03 23:26:55 +03:00
Oleg IsonenandBogdan Chadkin 8f53eadf5b Override browser default tag based styles that use EM units (#1888)
## Description

EM seems to be challenging to use and people tend to use PX or REM
instead ... I changed those values that come with EM by default from
browsers to the values Webflow is using.


I am not sure why webflow is doing certain things: e.g. paragraphs have
marginTop 0, h1-3 have marginTop 20; marginBottom: 10, h4- have
marginTop 10 ; marginBottom 20

These seem to be inconsistent and weird choices.

---------

Co-authored-by: Bogdan Chadkin <trysound@yandex.ru>
2023-07-03 23:13:37 +03:00
Bogdan Chadkin c5a5809501 Support generating expressions code (#1894)
Here added another expression utility to generate function body
generateExpressionsComputation.

InstanceRoot now requires computeExpressions(variables) prop which can
be generated build time.
2023-07-03 23:09:39 +03:00
Ivan Starkov 88c94b1d52 Add modern tooltips to space control (#1877)
## Description

Based on discussion, now space section tooltips are shown only on label
hovers


Supports alt/shift clicks
- [x] - During hover alt/shift works
- [x] - In case of multiple properties sources now group them
<img width="292" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/029b60a5-9a4e-4d85-ba2e-3db4fbbb344d">



## 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-07-03 22:45:24 +03:00
Ivan Starkov 4f7ad34cbf Release 0.76.0 (#1890)
## 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.76.0
2023-07-02 22:39:35 +03:00
Bogdan Chadkin 47ac7080da Migrate form to data sources (#1855)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1529

Instead of SuccessMessage and ErrorMessage components we can use Box
with bound state from form.

For now this is only boolean state which should be set on Form component
side. Soon we explore using expression as data sources to change only
enum value instead of booleans.

Changes in template
- ErrorMessage and SuccessMessage are replaced with Box with "show"
bound to expression
- ErrorMessage and SuccessMessage have text in own children
- the rest of Form content is wrapped with Box bound to expression
- Form got state prop bound to variable
- Form initialState prop is deleted

Migration just bind show props of all from direct children to data
sources. Without additional wrapping.
2023-07-02 22:17:23 +03:00
61f164d40e (feat): Ability to add box-shadow to nodes. (#1634)
## Description

This is a WIP PR, and will be adding more details about the feature and
the changes that are going in...

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi, 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: Bogdan Chadkin <trysound@yandex.ru>
Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-07-02 16:31:26 +02:00
Oleg Isonen da1e8eaef3 Scale blurriness fix (#1887)
## Description

Chrome on Windows has a bug and makes everything slightly blurry if
scale(1) is used together with translateX.
We have done a lot of comparisons between various fixes and they were
producing slightly different sharpness,
using scale 0.9999 with opacity 0.9999 works best.
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Edition    Windows 11 Home
Version    22H2
Installed on    ‎10/‎18/‎2022
OS build    22621.1848
Experience    Windows Feature Experience Pack 1000.22642.1000.0


## 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-07-02 16:20:46 +02:00
Oleg Isonen 66af42157f Sort properties alphabetically (#1886)
## Description

As recently reported, its easier to scan properties when they are sorted

## Steps for reproduction

1. open properties pane.
2. combobox showing properties list now will have them sorted
alphabetically

## 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-07-01 23:32:43 +02:00
Bogdan Chadkin 1d0967e927 Scope data sources to instances (#1885)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1529

Here embed template will add scope to always be shown only within
instance. Before we have data sources UI the only use case is deleting
data sources along with instances.

Also found jsep enable ternary by default and forbid for now caz there
is no generation implemented anyway.
2023-07-01 23:54:28 +03:00
Bogdan Chadkin d6aca6b55b Ignore complex props (#1810)
Ref https://github.com/webstudio-is/webstudio/discussions/37

There are props like object and function we cannot express with UI. Even
more there is style prop which if casted to string gives runtime error.
So the best way would be to ignore such types.
2023-07-01 23:49:02 +03:00
Oleg Isonen 529e10d333 More effects props (#1881)
## Description

Part of https://github.com/webstudio-is/webstudio-builder/issues/879

-  pointer events
-  Blend Mode
-  user select


## 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-07-01 20:01:35 +02:00
Bogdan Chadkin 114817c266 Support data source expressions (#1882)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1529

Here introduced two types of data sources into "variable" and
"expression". First stores the value, the second only executable code.

Execute expressions now output results of all expressions so we could
access values globally with "computed" store

Embed template references now allow to define both variable reference
and expression.
2023-06-30 22:22:12 +03:00
c95ca97d47 new color token foreground.inverse-primary (#1859)
Co-authored-by: Bot (build-figma-tokens.yml) <bot@localhost>
Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-06-30 00:49:35 +03:00