3851 Commits
Author SHA1 Message Date
Ivan Starkov b14664ffd7 Update version 0.82.0 (#1962)
## 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.82.0
2023-07-20 09:38:40 +03:00
Oleg Isonen 4dbed87515 Update README.md (#1961)
## Description

Updated image to be changeable from a single place
2023-07-20 03:08:14 +02:00
Oleg Isonen 482a8bc1c1 Fix font weight in the navigator (#1958)
## Description

Closes https://github.com/webstudio-is/webstudio-builder/issues/1951

## Steps for reproduction

1. just font weight in navigator

## 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-20 01:54:01 +02:00
Oleg Isonen 3fc1789691 Update README.md (#1959)
## 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-20 01:33:30 +02:00
Bogdan Chadkin 6037a039b7 Compute insert constraints for tree (#1954)
Fixes https://github.com/webstudio-is/webstudio-builder/issues/1950

Here added new utility to compute constraints for tree when insert embed
template, paste something or reparent. I previous implementation all
constraints were merged which gave us false positives like when paste
List>ListItem we got "requiredAncestors: [List]". Here tree layout is
considered to exclude such false positives.

For testing try to copy paste List>ListItem
2023-07-19 22:23:34 +03:00
Oleg Isonen 3885b86f89 Attempt to fix useFetch for all our trpc calls (#1948)
## Description

I moved the fix to trpc layer to affect other calls as well. Turned out
the hook is called many times - as many as there are items in dashboard,
so I think relying on state dependency even though it works for
completely unknown reasons is better from perf standpoint (I think ...
who knows ...)

## 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-19 18:23:14 +02:00
Bogdan Chadkin 7a0d87dd7c Drop fs-extra (#1940)
Modern fs is quite reliable and has a lot of nice tools. No need in
additional wrapper without own types.

Also regenerated all props and found a few unused.
2023-07-19 17:44:14 +03:00
Bogdan Chadkin 14baeb5c85 Fix props bugs (#1955)
Fixes
https://discord.com/channels/955905230107738152/955907841070346300/1130819857403887616
and
https://discord.com/channels/955905230107738152/955907841070346300/1131197538112905348

- specified default in image wrapper to let our props generator find it
- fix added with ui props
- prevent setting defaults when no default value is available
2023-07-19 17:17:46 +03:00
Ivan Starkov 0459452d62 generate-arg-types: Allow multiple exports in component files (#1953)
## Description

Allow multiple exports in components. Most radix components will look
like
`export const Tooltip = TooltipPrimitive.Root;`

The others would be a simpe wrappers over radix with just type changes
like like `Omit<TriggerProps, "className">

It's too much to create for each sucj export a standalone file.

After this PR following will work.

```ts
import * as TooltipPrimitive from "@radix-ui/react-tooltip";

export const Tooltip = TooltipPrimitive.Root;
export const TooltipTrigger = TooltipPrimitive.Trigger;
```

Generated exports in case of multiple entries are

```
export propsTooltip: ...
export propsTooltipTrigger ....
```

In case of single export previous behaviour is preserved for now, but
should be changed IMO in the future PRs


Known bugs

Until this merged we should not use displayName (have no idea why we use
it at all) in files with multiple exports
https://github.com/styleguidist/react-docgen-typescript/pull/449

As of now will add comments
```
import * as TooltipPrimitive from "@radix-ui/react-tooltip";

export const Tooltip = TooltipPrimitive.Root;
// We can't use .displayName until this is merged https://github.com/styleguidist/react-docgen-typescript/pull/449
// Tooltip.displayName = "Tooltip";

export const TooltipTrigger = TooltipPrimitive.Trigger;
// We can't use .displayName until this is merged https://github.com/styleguidist/react-docgen-typescript/pull/449
// TooltipTrigger.displayName = "TooltipTrigger";
```


## 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-19 00:24:56 +03:00
Ivan Starkov 6bac6f21bd Fix props filtering (#1952)
## Description

isValid check has 0 effect on existing components, but prevents Radix
components type generation

Instead of empty types it now generate right type for at least single
radix component

```ts
export const props: Record<string, PropMeta> = {
  defaultOpen: { required: false, control: "boolean", type: "boolean" },
  delayDuration: {
    description:
      "The duration from when the pointer enters the trigger until the tooltip gets opened. This will\noverride the prop with the same name passed to Provider.\n@defaultValue 700",
    required: false,
    control: "number",
    type: "number",
  },
  disableHoverableContent: {
    description:
      "When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger.\n@defaultValue false",
    required: false,
    control: "boolean",
    type: "boolean",
  },
  open: { required: false, control: "boolean", type: "boolean" },
};
```

## 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-18 22:55:44 +03:00
Jaya Krishna Namburu ea14cb2bd0 (fix): Re-focus the tree-node after completion of editing the name (#1945)
## Description

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

## Steps for reproduction

1. Use keyboard to navigate between the tree elements.
2. Click `Ctrl + E` to enter into edit mode.
3. Edit the name of the tree-node and then press `Enter`.
4. Use the up/down arrows to navigate to other nodes in the tree.

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

- [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-17 18:13:51 +02:00
Ivan Starkov 85ac541bde Update 0.81.0 (#1944)
## 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.81.0
2023-07-17 11:56:56 +03:00
Bogdan Chadkin 713e873b1b Replace useMeasure with resize observer (#1942)
We are going to get rid of react-use.
Here replaced its useMeasure with resize observer. Sometimes using
native api without wrappers gives cleaner logic. Here we avoid using
effect as watcher and update store directly from callback.
2023-07-17 11:47:44 +03:00
Bogdan Chadkin a46156f96f Fix initial props (#1943)
Fixes
https://discord.com/channels/955905230107738152/955907841070346300/1130407072522059896

- replaced blocking error with console.error
- removed id from html embed initial props
2023-07-17 11:38:16 +03:00
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