2410 Commits
Author SHA1 Message Date
Ivan Starkov 6423cf0296 build: Npm release 0.113.0 (#2568)
## 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/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-11-05 19:37:37 +02:00
Ivan Starkov efb0425e9a fix: Page Setting URL Misformatted (#2567)
## Description

https://discord.com/channels/955905230107738152/1170434939318182020

## 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/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-11-05 19:37:06 +02:00
Ivan Starkov 71a480c857 fix: Resolve version mismatch error for post-transaction issues (#2563)
## Description

Fixes some issues with disconnects and wrong version mismatch error

## 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/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-11-05 15:44:57 +02:00
Ivan Starkov cd049ff912 fix: Project outdated when switching on preview and link hashes (#2564)
## Description

Fixing 
`The project is outdated. Synchronization was incomplete when the
project was opened`
at least in case of preview clicks 

Trying to prevent 

https://github.com/webstudio-is/webstudio-builder/blob/a379a98c1f480397d1ddb0b1caffdc07d64b5d24/apps/builder/app/builder/shared/sync/sync-server.ts#L263

The issue is that data reload cause loading outdated version from the
build

during ordinary user work


## 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/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-11-05 15:32:05 +02:00
Bogdan Chadkin d4043922f0 refactor: move expressions to props in embed template (#2560)
Ref https://github.com/webstudio-is/webstudio/issues/2532

We decided to treat expressions as props bindings
so it makes sense to move expression data to props as well. This will
make expression and action simetrical and simplify data sources
management.

As you can see all expressions have same "expression" name now. In
another PR will change to prop name.
2023-11-05 16:31:27 +03:00
Jaya Krishna Namburu f1adb0e426 feat: Add UI element to control transition property. (#2538)
Adds `transition-property` UI
2023-11-05 12:47:44 +01:00
Ivan Starkov 95995977c2 fix: Fix image ratelimiting (#2562)
## Description

Image were ratelimited as authorized calls

## 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/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-11-04 17:43:11 +02:00
Bogdan Chadkin e1a44f57db feat: support binding props to variables (#2553)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here extended variables panel UI with expressions bound to props which
may reference and compute from variables.

Expressions editor supports completion with `$` or can be auto generated
by selecting variable from list.

<img width="267" alt="Screenshot 2023-11-03 at 00 54 25"
src="https://github.com/webstudio-is/webstudio/assets/5635476/fed300da-d2ff-4bfc-bd2a-d11356494fd9">
2023-11-03 18:20:01 +04:00
Bogdan Chadkin d05bf1a201 feat: normalize variable names (#2557)
Here added names normalizer to scope utility
to generate valid variable name from anything provided by user without
unnecessary restrictions.

This will let us safely use prop name to reference expressions when
those move to prop type.
2023-11-03 17:28:37 +04:00
Ivan Starkov 2aa4d3cc8f build: Bump package versions to 0.112.0 (#2556)
## 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/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-11-03 09:25:45 +02:00
Ivan Starkov f51b0f19dd feat: Add custom metadata to page settings form (#2552)
## Description

Custom metadata pages support
ref #2544

## 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/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-11-02 23:33:26 +02:00
Ivan Starkov 989db152b5 feat: Add custom metadata UI Component (#2551)
## Description

<img width="523" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/1af0726f-e337-4c97-9e4e-e626a888fcb7">

I have changed Field Labels and Subtle text, 
As all meta we support are `<meta property={} content={}`

cc @taylornowotny 

## 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/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-11-02 18:21:58 +02:00
Bogdan Chadkin f94d1816af fix: stop preventing escape for radix components (#2550)
Commands always prevent default to not conflict with any default
bahavior. Escape is probably the only case which is manageed by radix
too. Though it checks event.defaultPrevented so we need an additional
flag with exception.
2023-11-02 18:19:21 +04:00
Bogdan Chadkin c2d1179f10 feat: add variables panel (#2548)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added popover panel to maintain variables. For now only
create/edit/delete. Will add bindings support in another PR.

Can be tested in storybook "Variables" component.


<img width="252" alt="Screenshot 2023-11-02 at 02 36 29"
src="https://github.com/webstudio-is/webstudio/assets/5635476/16ac71fe-17a0-4d5b-878c-aa48c829ef2c">
<img width="254" alt="Screenshot 2023-11-02 at 02 36 37"
src="https://github.com/webstudio-is/webstudio/assets/5635476/75335775-bfd1-4322-9bdd-416834d8ab68">
<br />
<img width="251" alt="Screenshot 2023-11-02 at 02 37 21"
src="https://github.com/webstudio-is/webstudio/assets/5635476/0c26d307-ee8f-480e-9850-616a8d893bdf">
<img width="248" alt="Screenshot 2023-11-02 at 02 38 42"
src="https://github.com/webstudio-is/webstudio/assets/5635476/db9a724a-ad19-4c31-963a-657b2cba561c">
2023-11-02 17:26:49 +04:00
Ivan Starkov 2fe575ad2c fix: No image at page settings (#2536)
## Description

No image is stretched

## 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/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-11-02 10:00:51 +02:00
Ivan Starkov aaaf57da9f feat: Add Twitter card support & exclude pages from search/index (#2545)
## Description

ref #2544

Corresponding SAAS PR
https://github.com/webstudio-is/webstudio-saas/pull/215

- Support of page property - `excludePageFromSearch`
- Introduced functionality to enable the meta robot noindex tag for the
entire website.
- Implemented robots.txt support, which appears to be essential for
Twitter meta cards functionality.

Needs corresponding PR in SAAS deploy.

## 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/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-11-02 09:39:06 +02:00
Bogdan Chadkin d7460d8354 feat: add basic code editor (#2547)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added code editor with variables completion support for bindings
UI. Simple textarea would not work because same names can be used for
different variables
to support seamless dnd for user. `$` is used to trigger completion, in
the future can be replaced with tab or something like this. Current
implementation is mostly a copy paste from lexical playground.

<img width="536" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5635476/c33ebb71-85d8-41b3-8151-72eccae76129">

To test try CodeEditor component in storybook

## Use case

1. Our variables can have the same names for easier copy-pastability
To address specific variable they should be chosen from available list.

2. renaming variable should rename it everywhere to not break bindings.
So variables behave as symbol in text editor and removed completely on
backspace.
2023-11-02 01:02:17 +04:00
Jaya Krishna Namburu 60a6a7fbf2 feat: Add css transitions (#2511)
## Description

Adds support for `css-transitions` when users are in `local` state. In
any other state than local, the CRUD operations on transitions are
disabled.
2023-11-01 18:36:08 +01:00
Ivan Starkov 50373db9c1 build: Cli support for meta tags (#2537)
## Description

- Added support of   "image/x-icon",  "image/ico", for upload
- changed local dev resize path
- fixed zod meta types
- added favicon, site_name og tags in route template
- added cache headers for html content

## 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/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-10-31 15:51:17 +02:00
Ivan Starkov 9a5dddce61 fix: Wrong zIndex on favicon upload (#2535)
## 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/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-10-30 13:03:45 +02:00
Ivan Starkov 6f3adf1cc4 feat: Add SiteSettings Dialog (#2527)
## Description

Dialogs and saving of Site Settings and Page Settings.

Bugs & Fixes
- [x] - Use page name on swap to set path i.e. `/home`


Next PRs.

- CLI support (generating head title links and metas)
- <img width="582" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/ab348eb8-0be0-49fc-b15e-352f089812db">
- <img width="266" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/6c272cf2-09d2-4f43-af9f-7460d84fa100">
- Not sure why we need upload button at all, anyway in next PRs <img
width="451" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/a62d2a9d-8793-4d9b-a2c2-4992358f5b10">



---


<img width="173" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/554f2310-579d-4326-8ca7-dd84a13a114a">

<img width="386" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/f0cfb8be-49ab-4b7f-baa3-d68938a2125a">


<img width="375" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/10dfd728-de87-4c91-bca0-0216ad7e5f96">


- [x] - Make homePage is not working


## 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/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-10-30 12:18:35 +02:00
FAISAL 92592c90da fix: Alignment of drop down menu under user avatar fixed (#2528)
## Description


   
This PR fixes the alignment of drop down menu under user avatar 
Issue Number- #2075 
Here is the video of the fix-

https://github.com/webstudio-is/webstudio/assets/88244542/3b233676-5928-4b94-a88a-d4c00eb9d073




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

- [x] 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/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-10-27 23:10:18 +02:00
Ivan Starkov d17a899b00 feat: Google Search Preview block (#2526)
## Description

<img width="774" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/1496e1fc-110f-43ce-b21a-e6a67f7aa3fa">

## 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/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-10-26 11:28:19 +03:00
Bogdan Chadkin 78d9ea912d refactor: split instances slice into separate utility (#2521)
Split instances slicer into separate utility from copy paste plugin.
Will be used to duplicate pages. Along with splitting added more tests
to better cover behavior.
2023-10-25 23:55:11 +04:00
Bogdan Chadkin 7bf923dc30 fix: resize canvas with breakpoints hotkeys (#2522)
Fixes https://github.com/webstudio-is/webstudio/issues/2520
2023-10-25 23:54:50 +04:00
Ivan Starkov 2a0551b861 feat: Add unified scroll to textarea, allow autogrow (#2525)
## Description

This pull request enhances the TextArea component in the following ways:
- Added support for auto-growing, which dynamically resizes the textarea
as you input text.
- Introduced the `maxRows` property to limit the maximum number of rows
for the textarea, preventing infinite resizing.
- Updated the settings panel to utilize auto-growing textareas.

<img width="272" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/af31ae26-37b1-4f8c-bac6-debec40070ab">

<img width="253" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/9fac487a-13d8-46e8-ae3f-4b80cc665b0c">

empty code
<img width="266" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/835b4619-34b7-43ea-b197-99004f020550">

filled code

<img width="259" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/24cec045-0046-42b9-ba66-48f2602836dc">

Made background Code field autoGrow until 4 lines

<img width="294" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/2cf5cee6-a498-46c9-b6c3-e1f38a60138b">




## 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/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-10-25 18:05:34 +03:00
Oleg Isonen 6d8dc531a6 feat: Enable AI for everyone (#2518)
## Description

With this we are enabling AI for everyone @itsNintu let's spread the
news on X.

## 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/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-10-24 23:10:17 +02:00
Bogdan Chadkin cac813f2b6 refactor: move click canvas event to commands (#2514)
One less pubsub event replaced with clickCanvas.
Added store for sidebar active panel to manage from commands.

## Steps for reproduction

1. close breakpoints menu by clicking on canvas
2. close sidebar panel by clicking on canvas
2023-10-21 00:50:25 +04:00
Bogdan Chadkin a598f3c287 fix: switch to controlled value in text prop (#2506)
Fixes https://github.com/webstudio-is/webstudio/issues/2505

For some reason text prop used uncotrolled defaultValue which broke
history management.
2023-10-20 18:53:52 +04:00
Bogdan Chadkin 45f311150c refactor: render ephemeral styles with synced store (#2512)
Here replaced updateStyle and previewStyle pubsub events with
synchronized $ephemeralStyles store to reduce pubsub spread across the
codebase.
2023-10-20 15:17:25 +04:00
Bogdan Chadkin ff5ccee00d refactor: replace soft delete with delete and invalid state (#2513)
Here dropped soft delete because it does not play well with history.
Instead numbers now get invalid state when input is empty and other
cases just delete prop.
2023-10-20 14:44:24 +04:00
Jaya Krishna Namburu 1c81b5d3b9 refactor: extract layer-list component and use it inside box-shadown (#2510)
## Description

Extract layer-list component and use it inside box-shadow component.

## Code Review

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

## Before requesting a review

- [x] made a self-review

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
2023-10-20 08:07:31 +02:00
Bogdan Chadkin 8f47d4a4f2 refactor: cancel drag with command (#2509)
Here replaced the last legacy shortcut with command. One less event in
pubsub.
2023-10-20 01:18:35 +04:00
Bogdan Chadkin 4ddac0e7ff refactor: replace editor events with commands (#2508)
Ref https://github.com/webstudio-is/webstudio/issues/2354

We are moving away from emitting events and subscriptions. Here migrated
lexical toolbar to canvas commands.

Command handlers rely on global active editor to update currently edited
instance.

In the future we can explore alternative way to synchronize text editor
between builder and canvas with yjs.
2023-10-19 20:28:48 +04:00
Jaya Krishna Namburu b7046d4d96 refactor: Extract layer handling functions into individual helpers (#2507) 2023-10-19 18:13:22 +05:30
ccthecode 42cc5117cc fix: typo in .env.example (#2503)
## Description

Fix typographical error in
[.env.example](https://github.com/webstudio-is/webstudio/blob/c1e330d7b920c154ae7ebbd400776aa379504b0e/apps/builder/.env.example#L35)

## Before requesting a review

- [ ] made a self-review

## Before merging

- [ ] tested locally and on preview environment
- [x] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-10-18 14:19:02 +02:00
Ivan Starkov c1e330d7b9 build: Npm release 0.111.0 (#2501)
## 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/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-10-17 20:47:48 +03:00
Oleg Isonen e902fc25d4 feat: Remember the AI bar open state (#2500)
## Description

When the user hides the AI bar and reloads, it should stay hidden. Some
people won't be using it and having to hide it every time is going to be
annoying.

## Steps for reproduction

1. hide AI bar
2. reload
3. see its still hidden
4. show AI bar
5. reload
6. see its visible

## 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/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-10-17 20:47:31 +03:00
Oleg Isonen 5f6b8cad6a feat: Ai placeholder + select prompt text after inserting prompt from history (#2499)
## Description

- When inserting prompt from history, now I can hit enter right away or
delete or copy.
- Update placeholder text
- Prevent inserting prompts when textarea disabled

## Steps for reproduction

1. click history item
2. see inserted text being selected

## 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/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-10-17 16:07:34 +02:00
Oleg Isonen fd369397c3 fix: Remove todos (#2496)
## Description

Remove forgotten todos

## 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/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-10-16 23:44:32 +02:00
Ivan Starkov 76b44497e0 build: Npm release 0.110.0 (#2498)
## 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/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-10-17 00:10:18 +03:00
Ivan Starkov 0280d40d0a build: Npm release 0.109.0 (#2492)
## 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/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-10-16 19:51:53 +03:00
Oleg Isonen a02b81faf6 feat: Add some initial prompts to ai bar (#2494)
## Description

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

## Steps for reproduction

1. click on a prompt
2. run ai

## 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/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-10-16 18:50:06 +02:00
Ivan Starkov 24a3fb4ea0 feat: Preverve AI menu state, make it initially open (#2495)
## Description

State of the AI menu now in local storage. Opened by default

## 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/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-10-16 19:27:39 +03:00
Oleg Isonen 3a316079ce feat: When user selects a page - close the pages tab (#2493)
User pointed out that keeping pages tab open after selecting a page is
confusing
2023-10-16 19:47:08 +04:00
GiuseppeandGiuseppe Gurgone 4fb0159312 fix: Allow inserting templates only inside container components (#2491)
Like with text insertions, when inserting a generated template we need
to check whether the host element is a container.

Co-authored-by: Giuseppe Gurgone <gsppe@users.noreply.github.com>
2023-10-16 18:55:43 +04:00
Ivan Starkov 91251ad914 build: Npm release 0.108.0 (#2488)
## Description

Npm release 0.108.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/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-10-16 10:36:58 +03:00
Ivan Starkov 02938a6a02 fix: Outline variants sizing (#2486)
## Description

Issue: outline sizes do not match
<img width="552" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/6b9b2a01-f14d-4d04-9eda-1d26af857a47">

Fixed:
<img width="548" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/98040e1c-dc96-4755-9872-965f5b17bae6">

## 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/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-10-16 00:08:21 +03:00
Giuseppe 0cefb0385c fix: Miscellaneous AI fixes (#2483)
Fixes:

- Disable Radix components via feat flag
- classNames should be optional when generating templates
- Prevent unwrapped JSX to fail
- Use shared computeSelectorForInstanceId when inserting templates and deleting instances
- Add extra instruction for GPT to fill required values just in case
2023-10-15 21:39:57 +02:00
Ivan Starkov b9e003435b fix: AI, Enable adding text to empty container nodes (#2485)
## Description

Check `currentInstance.children.length===0` was used as check does
element can have children.

Fixed using meta.


## 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/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-10-15 22:28:27 +03:00