429 Commits
Author SHA1 Message Date
Bogdan Chadkin 74972574a6 Release 0.70.0 (#1707) 2023-06-02 18:12:27 +03:00
Ivan Starkov 9aa863bcca Release 0.69.0 (#1700)
## Description

Npm:
"version": "0.69.0"

## 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-01 20:46:58 +03:00
Oleg Isonen 54a9303a47 Figcaption as a tag for Text (#1692)
## Description

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

## Steps for reproduction

1. add Text
2. change tag prop to figcaption

## 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-05-31 13:22:40 +02:00
Bogdan Chadkin 0d35e39822 Add sdk-components-react-remix package (#1691)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1129

Here added sdk-components-react-remix with all remix components moved
away from react-sdk.

Exposed 3 entry points

- @webstudio-is/sdk-components-react-remix
- @webstudio-is/sdk-components-react-remix/metas
- @webstudio-is/sdk-components-react-remix/props
2023-05-31 11:45:38 +07:00
Oleg Isonen 226603e1e0 Sort components by order property in WsComponentMeta (#1681)
## Description

We want to be able to specify the order in which components are shown in
the panel.

Right now the order property is not set where needed, because I am
waiting for feedback from @taylornowotny

## Steps for reproduction

1. Open add components panel
2. See components are in the right order

## Code Review

- [ ] hi @TrySound , I need you to do
  - conceptual review (architecture, feature-correctness)
- [ ] hi @taylornowotny  , I need you to do
- give some thought to both components that need to be first which we
set specific order to (the rest will go as is)
- recheck the categories, I feel like our split into categories is not
intentional

## 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-05-30 23:34:19 +02:00
Bogdan ChadkinandOleg Isonen c08e57cdbd Hide props and styles tabs for html embed (#1686)
Html embed has display: contents and should not be styled or have props.

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-05-31 02:40:15 +07:00
Bogdan Chadkin fe4c19f22f Merge image components (#1690)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1129

Custom image component does not depend on remix but does important
assets usage. Should be used as part of base components.

Also optimized image component by 27kB by moving props into separate
entry point. Succeeds
https://github.com/webstudio-is/webstudio-builder/pull/1582
2023-05-31 00:37:20 +07:00
Bogdan Chadkin 7c6d06bfd8 Use meta stored in atom in builder and canvas (#1687)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1545

All complex use cases already switched to get meta from arguments and
from atom.

Here migrated the last cases and dropped legacy meta register in
react-sdk package. Now we ready to split components into separate
packages.
2023-05-30 17:45:12 +07:00
Bogdan Chadkin 66d82afca7 Drop unused asset table fields (#1635)
Cleanup after refactoring. Now we can get rid of Asset.location because
asset location is defined by environment. And remove fields moved to
File table.
2023-05-30 17:25:50 +07:00
Bogdan Chadkin 7c66afef74 Add requiredAncestors and invalidAncestors to meta (#1684)
Here added two component restrictions to meta.

requiredAncestors prevent inserting components outside of required ones
here restricted ListItem to always be inside of List.

invalidAncestors prevent inserting components inside of invalid ones
here prevented nested buttons
2023-05-30 12:33:44 +07:00
Bogdan Chadkin 60f2b1e442 Accept components map in renderers (#1679)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1129

Here refactored registered components away from global state in
react-sdk package in favour of components map.

The map can be easily computed in runtime or generated for worker.
Default and custom (remix) components registering is unified now and
both libraries can be split into separate packages.

Temporary added "@webstudio/react-sdk/components" entry point to get a
record of components.
2023-05-29 14:21:13 +07:00
Bogdan Chadkin 40e97a1086 Replace meta.children with meta.template (#1676)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1569

Here we change template in meta to include current component instead of
implicitly creating it.

This way we can provide insert composition of components instead of
single one for example input+label. Or even wrap current component like
label>input.

Another usecase is ability to set local styles and props for current
component.

Note: review with hidden whitespaces
2023-05-25 23:41:08 +07:00
Ivan Starkov 37c8608eae Custom Domains (#1564)
## Description

How it looks. (Not everything aligned or have features like in design)


https://github.com/webstudio-is/webstudio-builder/assets/5077042/349c7fae-afd8-478d-9eba-701b002f0fd4

Most API methods return `{ success: true } | {success: false, error:
string}` because in the future they need to be moved into server
workflows, and do not exist or return anything.

## Steps for reproduction

Run locally, at localhost I've created a fake domain creation API, to be
able to test UI.

## 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-05-25 19:11:54 +04:00
Ivan Starkov 1ab0f8661e Update NPM (#1674)
## Description

npm 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
2023-05-24 22:57:13 +04:00
Ivan Starkov c3496753d0 Release 0.67.0 (#1669)
Release 0.67.0
2023-05-23 23:56:22 +07:00
Bogdan Chadkin a14052bf99 Bring back initial props to remix image (#1671)
Remix image before inherited initial props from default image. Though
the new simplified logic only replaces occurrences without merging.
2023-05-23 23:45:06 +07:00
Bogdan ChadkinandOleg Isonen 11da3424d2 Rename code and html components (#1668)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1667

- renamed code to code text
- renamed html to html embed
- added new icon for code text

## 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-05-23 16:27:56 +02:00
Ivan Starkov 429c4c115d Release 0.66.0 (#1665)
## 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-05-22 19:47:01 +04:00
Bogdan Chadkin 37f376573e Add html component (#1624)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1563

Looks like dangerouslySetInnerHtml is quite safe and do not allow to
break outside layout.
Plus as important point it works with ssr.

To execute scripts while injecting used range hack described here
https://ghinda.net/article/script-tags. innerHTML does not execute
scripts.
2023-05-22 20:08:48 +07:00
Bogdan Chadkin c7ac312702 Store component meta in atom (#1661)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1545
https://github.com/webstudio-is/webstudio-builder/issues/1129

Here register all component metas to atom which is sychronized with
builder.

Replaced getComponentNames with registered metas keys. We no longer need
to maintain this list.

Old registration still there because there is a lot of usages of
getComponentMeta.
2023-05-22 17:01:00 +07:00
Bogdan Chadkin 6f6a4e7d34 Register props meta into store (#1655)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1545
https://github.com/webstudio-is/webstudio-builder/issues/1129

Here moved props meta into store. Both default and custom meta should be
registered as by default its empty.

Removed merging of overriden props with overrides because our cli still
resolves all types in component.

Supported two-directional store initialization by checking if there was
any .set calls. This let us send initial data from canvas.
2023-05-21 19:48:44 +07:00
Bogdan Chadkin 39d9d5c9ba Make meta serializable (#1649)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1129
https://github.com/webstudio-is/webstudio-builder/issues/1545

Here put all components meta icons into strings and fixed usage with
innerHTML. This allows us to load components only from canvas and send
to builder.
2023-05-19 20:41:31 +07:00
Ivan Starkov cad34a3040 Fix types (#1629)
## Description

Makes AllComponent type better


Found null bug.

Enforced for all components 
```
    [componentAttribute]: instance.component,
    [idAttribute]: instance.id,
```
to be non-optional. 

cc @TrySound should fix your issue with Html component


## 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-05-15 12:21:12 +04:00
Oleg IsonenandJayaKrishnaNamburu b4b86a6c89 Outline style property (#1630)
## Description

https://github.com/webstudio-is/webstudio-builder/pull/1596

---------

Co-authored-by: JayaKrishnaNamburu <namburu1995@gmail.com>
2023-05-14 18:40:12 +02:00
Bogdan Chadkin 3fcf37e02b Add image proxy route (#1453)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

Here added image proxy - simple remix route to interop image requests
locally and in preview. We have now only single image loader which
accepts image base url.

Here support only local deployment. Preview and saas preview to
RESIZE_ORiGIN env.
2023-05-14 23:25:34 +07:00
Bogdan Chadkin 653300bbdf Drop session storage polyfill (#1501)
Looks like we do not have problems anymore in canvas without this
polyfill.
2023-05-12 01:07:14 +07:00
Ivan Starkov de99e6e8af Release 0.65 (#1613)
## Description

npm 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
2023-05-10 16:03:30 +04:00
Roman Pominov bf6d2c8e78 Forms fixes (#1610)
Closes #84 

## Description

1. Fixed a bug in form template (`email=email` instead of `name=email`)
2. Changed labels of components
3. Moved Button back to Forms category

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
- [ ] hi @istarkov, I need you to do
  - conceptual review (architecture, feature-correctness)
  
## 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-05-10 14:54:39 +03:00
Ivan Starkov 5dfab33a1b Update npm packages (#1609)
## 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-05-10 11:59:48 +04:00
Roman Pominov fa6aba1f8b Changes to enable forms submission in saas (#1568)
Part of #84 
Should be deployed together with
https://github.com/webstudio-is/webstudio-saas/pull/148

## Description

1. Exposed `User.email` in the data we send to saas
2. Used Remix's form in the Form component
3. Refactoring in `form-handlers`

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
- [ ] hi @istarkov, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)


## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-05-10 10:38:01 +03:00
Bogdan Chadkin 2afa5e1cd4 Drop link preset states (#1604)
:active and :visited states on links have special behaviour. They are
vendor defined until color on stateless link is defined. Similar to how
vars work there is var with default. And when var is somewhere defined
default is overriden.

Though using vars for this specific case is too complex here easier
solution. We can just remove active and visited states on default
styles. User may never see this inconsistency as usually would modify
color on stateless link first and then go to active or visited states.
2023-05-09 15:01:21 +07:00
Ivan Starkov cda5c6ba1a Release-0.63.0 (#1601)
## Description

Npm 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
2023-05-08 21:06:14 +04:00
Bogdan Chadkin 6fb341b1ce Fix link default and preset styles (#1591)
Here made added browser defaults for link and set color as preset.
2023-05-07 18:58:27 +07:00
Bogdan Chadkin 3bec46192b Support state category in meta (#1584)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1518

Now default states should be spread per component. And states have
category with fallback to "states".
2023-05-06 23:53:46 +07:00
Ivan Starkov 317edc0d79 Update NPM 0.62.0 (#1580)
## 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-05-05 16:52:53 +04:00
Oleg Isonen d16a340c5c Icons update (#1558)
## Description

Updated all icons in this list
https://github.com/webstudio-is/webstudio-builder/issues/1362

## Code Review

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

## 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-05-03 00:00:16 +02:00
Oleg Isonen abb4c2f639 Forms (#1525)
https://github.com/webstudio-is/webstudio-builder/issues/84#issuecomment-1522834976

## Description

1. Added new components:
   - textarea
   - radio-button and radio-button-field
   - checkbox and checkbox-field
   - success-message
   - error-message
 2. Added `states` like `:disabled`, `:valid`, etc. to `input`
3. Added `custom-components/form` that renders success-message and
error-message conditionally
 4. Added `success` and `error` style states to `custom-components/form`
5. Style panel now shows "Select an instance on the canvas" if the
selected component is not rendered on canvas (e.g. error-message may not
be rendered)
 
Not in this PR:

- The mailer package
- Backend handler for forms (will be in a PR in SAAS)
- Logic in Form that actually submits to backend and shows success/error
messages

## Steps for reproduction

1. Add a "Form" to canvas
2. Add "Checkbox Field", "Radio Button Field", "Text Area" to the form
3. Try changing `initialState` property of the form
2023-05-02 14:14:06 +03:00
Bogdan Chadkin 4e31256b2a Restrict allowed parents with config in meta (#1542)
Added `allowedParentComponents: string[]` option to meta which prevents
dropping, inserting or pasting components into wrong parents. For
example ListItem now can be placed only inside of List component.

This will unlock better experience with compound radix components.
2023-05-02 15:20:22 +08:00
Ivan Starkov 70746774bf Release 0.61.0 (#1539)
## Description

Release 0.61.0
Npm packages 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
2023-04-28 09:36:56 +04:00
Bogdan Chadkin 5595742f75 Insert styles from embed template (#1538)
Now embed templates can define simplified version of our styles which is
useful for radix components and as AI output.

```
styles: [
  {
    property: 'backgroundColor',
    value: { type: 'keyword', value: 'red' }
  }
]
```
2023-04-28 12:07:10 +07:00
Bogdan Chadkin bb9db13c9f Run dts as additional checks in actions (#1523)
This fixes the bug introduced in my previous PRs and reproducable only
by running dts generation. Here added it to checks so we could avoid
broken publishes while releasing.
2023-04-27 17:37:59 +07:00
Bogdan Chadkin c60ee0af07 Show initial and html style in style panel (#1533)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1067

We need to move away from getComputedStyle for not local styles in style
panel.

Here added default html style from browser sources. Now we can render it
and properties initial styles instead of computed styles.

Also fixed in properties data generation currentcolor -> currentColor
and removed same from border presets.
2023-04-27 17:06:38 +07:00
Bogdan Chadkin 6db60b7e7d Drop baseUrl from tsconfig in packages (#1530)
This should fix auto import from parent folders
which is very annoying right because tries to import from 'src'.
2023-04-26 18:59:43 +07:00
Bogdan Chadkin 2017153253 Migrate preset styles to array of declarations (#1531)
Before preset styles used `{ tag: { property: value } }` format. Now we
are switching to `{ tag: [{ state,property,value }] }` to support
specifying states in preset styles.

Same format will be used for embed template styles.

Here switched only format. States in preset styles not supported in
builder yet.
2023-04-26 18:59:31 +07:00
Bogdan Chadkin 0f615afd01 Add props support in embed template instances (#1519)
Ref https://github.com/webstudio-is/webstudio-builder/pull/1516

This will allow further customization of react components through meta
2023-04-23 00:47:44 +07:00
Bogdan Chadkin 30be97deef Allow to specify tree template in component meta (#1517)
Ref https://github.com/webstudio-is/webstudio-builder/pull/1516

Here added new utility "tree template" to describe children in component
meta and generate instances from it while inserting.

Added simple template to form component as example.
2023-04-22 23:20:39 +07:00
Ivan StarkovandBogdan Chadkin 99e0648dd4 npm release 0.60.0 (#1513)
## Description

Npm update 0.60.0

## 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: Bogdan Chadkin <opensource@trysound.io>
2023-04-21 22:26:30 +04:00
Oleg Isonen 472c536003 NavLink with current page state (#1505)
## Description

This is using NavLink instead of Link by default to allow styling
Current Page state so we can use it for navigations.

## Steps for reproduction

Can't be tested because works only on a published site and we need to
fix publishing on staging and locally

## 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-04-21 14:29:53 +02:00
Bogdan Chadkin 6c787558fc Fix body preset styles (#1500)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1243

Changed body styles to black on transparent defaults.
Added white background to iframe to make canvas visible on workspace.
2023-04-21 11:58:49 +07:00
Roman Pominov 037d35162c Fix a bug when link to Home doesn't work on a published site (#1503)
## Description

Context:
https://discord.com/channels/955905230107738152/1098457250235957258

Fix of the bug: on a published site, when you point a link to Page=Home,
the rendered `href` contains path of the current page.

This is most likely due to `homePage.path === ""` and when we pass
`to=""` to RemixLink it behaves like this.

So I made sure we pass `to="/"` for the home page.
2023-04-20 16:36:38 +03:00