4396 Commits
Author SHA1 Message Date
Ivan Starkov ad6a8da1c9 build: Release 0.124.0 (#2741)
## Description

Npm release

## 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
0.124.0
2024-01-08 11:20:09 +02:00
Oleg Isonen e7b6c752b7 feat: Add loading lazy/eager to vimeo (#2738)
## Description

When video is off-screen and needs to be autoplayed, you can now put it
to loading=lazy and it won't load until its in viewport.




https://github.com/webstudio-is/webstudio/assets/52824/3fa59ab8-1e19-44b4-969b-3eb99f12fccf


## Steps for reproduction

1. click button
2. expect xyz

## 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
2024-01-08 11:19:47 +02:00
Ivan Starkov 672ee9a98a feat: Support atomic CSS on build (#2739)
## Description

Logic was changed only in `prebuild.ts`. All other changes or README or
autogenerated

Integrate atomic CSS support into CLI

The Vercel fixtures project now explicitly sets atomicStyles to true.
Netlify explicitly sets atomicStyles to false.
The custom template doesn't have a default setting, so atomicCss=true is
used."

## Steps for reproduction

See fixtures.

## 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
2024-01-08 10:36:09 +02:00
Ivan Starkov 7bffdc0954 feat: Add Publish Settings section to Project settings (#2720)
## Description

<img width="496" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/f49af094-b843-4fb0-b324-90ab0b4dabb1">

## Steps for reproduction

Open Project, See Project Settings

## 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
2024-01-08 09:15:29 +02:00
Bogdan Chadkin 4f64676db7 feat: improve variable popover (#2737)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here changed variable popover UI

- removed save/cancel buttons - save is happening on close
- replaced value/resource tabs with type select
- support additional string, number and boolean values
- add validation to value and resource forms

Also added form utilities to manage and compose field validation.
2024-01-07 23:40:48 +07:00
Oleg Isonen 9ed70babce fix: Ensure user can't enter invalid canvas width value in breakpoints editor (#2736)
## Description

User was able to delete the value and get a NaN error Ref
https://github.com/webstudio-is/webstudio/issues/2734

## Steps for reproduction

1. delete the value
2. see the min width rendered

## 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
2024-01-06 19:12:36 +01:00
Bogdan Chadkin 210a2f40d6 feat: improve binding validation (#2730)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here changed how bindings are validated

- closing with broken expression will show errors and prevent close
- the next close will not block and keep the old valid expression
- close with valid expression invoked saving
- props no longer can change the type of input
- binding button becomes red and gets tooltip when value has invalid
type
- binding popover also shows non-blocking error about type
- each control provides own validation

<img width="465" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5635476/c19cca91-4558-4570-b257-1c10689a1113">
<img width="247" alt="Screenshot 2024-01-05 at 17 13 15"
src="https://github.com/webstudio-is/webstudio/assets/5635476/8702b2f2-1756-4262-924f-83f1d92eb4b4">
2024-01-07 00:59:13 +07:00
Oleg Isonen 4e43e9b2fd fix: blocking alerts accidentally got enabled for everyone (#2731)
## Description

In the last PR I forgot to uncomment the check

## 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
2024-01-05 17:41:31 +01:00
ad224732cc feat: Link typography tokens and a new Link component in DS (#2729)
## Description

- Decided to not have separate colors for link, it should just use
regular text colors.
- Added a Link component to the design system, modelled after MUI Link
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/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: Taylor Nowotny <86495896+taylornowotny@users.noreply.github.com>
Co-authored-by: Bot (build-figma-tokens.yml) <bot@localhost>
Co-authored-by: Bogdan Chadkin <trysound@yandex.ru>
2024-01-05 12:51:47 +01:00
Bogdan Chadkin e810ea9b89 feat: switch props to binding popover (#2727)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here finally replaced variables panel with binding popover in all prop
controls.
Additionally did better support of expressions in file and url controls.

The tricky part is managing expressions on control components level
instead of global props panel level which gives us more granular control
of behavior though requires more boilerplate code in each control.

There are still some bugs for example with loosing focus when start
editing expression which I will fix in following validation fix.

## Testing

- check id in Body (string)
- aria-max something in Body (number)
- check "show" in body child (boolean)
- check href in Link (url)
- check src in Image (file)
- check state in Form (radio)
- check aria-autocomplete in body (select)
- check remove binding in resource fields
2024-01-04 12:14:17 +07:00
Oleg Isonen 97837bb4ed feat: Update dashboard card (#2726)
## Description

Implements the latest version of the dashboard card:

1. hover state of the link gets underline decoration (fixes
https://github.com/webstudio-is/webstudio/issues/2601)
2. added info icon with published date and created date (we don't have
edited date yet, not important enough I think)
https://www.figma.com/file/xCBegXEWxROLqA1Y31z2Xo/%F0%9F%93%96-Webstudio-Design-Docs?node-id=9598%3A11774&mode=dev

## Steps for reproduction

1. open dashboard
2. hover link to see decoration
3. hover info button to see tooltip with creation date and publish date
if project was published

## Code Review

- [ ] hi @TrySound , 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/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
2024-01-03 09:40:15 +01:00
Jaya Krishna Namburu ed332ec37d fix: tooltips on background, box-shadow and transitions titles (#2699)
## Description

New branch taken from the #2691 as we need branch names should be
smaller now. Please refer to the PR for any comments/discussions etc.

## Code Review

- [ ] hi @istarkov , I need you to do
   detailed review (read every line)

- [ ] hi @taylornowotny, i need your help
   -  please check the tooltip contents for these three properties.
2024-01-02 07:13:18 +01:00
Bogdan Chadkin 408816346b feat: add variables to settings panel (#2722)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added variables section to settings panel similar to props section.
UI is slightly different from previous implementation.

- the list shows only variables defined specifically on current instance
- selecting item starts editing instead of "menu" button
- resource variables can be deleted when unused

<img width="519" alt="Screenshot 2023-12-31 at 18 01 35"
src="https://github.com/webstudio-is/webstudio/assets/5635476/55763a49-a031-4696-bbf8-6c16ea0effbe">
<img width="253" alt="Screenshot 2023-12-31 at 18 01 48"
src="https://github.com/webstudio-is/webstudio/assets/5635476/d6a768db-f8dd-4fe9-9820-8685dd991067">
<img width="519" alt="Screenshot 2023-12-31 at 18 01 35"
src="https://github.com/webstudio-is/webstudio/assets/5635476/e7701edc-eaeb-44e8-beb3-5e2c9c01be03">
2024-01-01 12:58:18 +07:00
Oleg Isonen 692bc16590 fix: Escape user-provided class (#2721)
## Description

Realized that user can put in a quote that will break the rendering

We also need an actual validation in the UI for class name, because its
not just an arbitrary string.


## 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-12-31 21:00:17 +01:00
Bogdan Chadkin a22f9fe900 feat: add html editor (#2717)
Ref https://github.com/webstudio-is/webstudio/issues/2359
https://github.com/webstudio-is/webstudio/issues/2388

Here added codemirror based html editor for html embed component. It
supports basic autocomplete and highlights embedded css and js.

Splitted basic codemirror setup into CodeEditor component everything
else can be customized around it.

<img width="245" alt="Screenshot 2023-12-27 at 15 30 57"
src="https://github.com/webstudio-is/webstudio/assets/5635476/7bb7907a-0f5b-406b-8615-2029e6494839">
<img width="240" alt="Screenshot 2023-12-27 at 15 30 22"
src="https://github.com/webstudio-is/webstudio/assets/5635476/bc826e52-0597-4998-a534-e7053f25fb26">
2023-12-31 13:48:19 +07:00
Bogdan Chadkin a5bc12ed2c feat: add binding popover (#2719)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added new binding popover as a replacement for variables popover.
Integrated into resource fields and made button look like suggested by
Mark and Taylor.

<img width="317" alt="Screenshot 2023-12-30 at 13 26 12"
src="https://github.com/webstudio-is/webstudio/assets/5635476/141ea317-438f-428c-96a8-9f1919513e8c">
<img width="255" alt="Screenshot 2023-12-30 at 13 25 59"
src="https://github.com/webstudio-is/webstudio/assets/5635476/f8a3b5c7-4928-46f2-8d86-5ee264150d13">
2023-12-31 12:34:03 +07:00
Oleg Isonen c6bdef5084 feat: CSS engine has now a Style Sheet rendering with atomic classes which will lead to a 10x smaller bundle size (#2713)
## Description

CSS engine has now a Style Sheet rendering with atomic classes which
will lead to a much smaller bundle size

## 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-12-30 21:08:37 +01:00
Oleg Isonen 5930064678 feat: Rename Site to Project because we are not just building a site builder (#2718)
## Description

Site is too narrow name for things that are pssible with webstudio


## 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-12-30 10:40:09 +01:00
Oleg Isonen f76f0f19b8 fix: remove delay when showing spinner for openning projects (#2712)
## Description

Reason is we always see spinner, but with delay it feels less responsive

## Steps for reproduction

1. click project thumbnail
2. see spinner showing right away

## Code Review

- [ ] hi @try, 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-12-29 13:26:37 +01:00
Bogdan Chadkin 11b799d4f7 feat: load resources in builder (#2714)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here improved resource management to load defined resources and store in
variable values to allow preview data. Builder requests data from proxy
route every time resources or their variables are changed.

<img width="1449" alt="Screenshot 2023-12-25 at 01 09 58"
src="https://github.com/webstudio-is/webstudio/assets/5635476/6614a356-0170-4606-9b60-d39b1bc09837">

Data to test is here
https://gist.githubusercontent.com/TrySound/56507c301ec85669db5f1541406a9259/raw/a49548730ab592c86b9e7781f5b29beec4765494/collection.json
2023-12-27 23:54:09 +07:00
Bogdan Chadkin f0b7a41824 fix: improve generating resources (#2715)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added resources fixture and fixed a few issues with it

- add optional chaining to collection?.map to safely skip iterating
missing data
- added any to resource responses to access remote data without type
errors
- always generate empty headers array
- skip empty body in generated resources
2023-12-27 23:42:50 +07:00
Bogdan Chadkin 1a904b00b4 feat: add resource variables support in builder (#2711)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added Value/Resource tabs to "new/edit variable" panel to support
creating both value and http request based variables.

Url, headers and body are expressions with support to all available in
scope value and page params variables.

Actual loading of resources in builder will be added later.

<img width="493" alt="Screenshot 2023-12-24 at 13 42 34"
src="https://github.com/webstudio-is/webstudio/assets/5635476/683876ec-4080-45fe-b2cc-e46e40256ce1">
<img width="481" alt="Screenshot 2023-12-24 at 13 42 20"
src="https://github.com/webstudio-is/webstudio/assets/5635476/b8937693-fb04-4ea5-a0aa-7092e3bec518">
2023-12-25 17:18:09 +07:00
Bogdan Chadkin 842c017c11 refactor: make resources universal (#2710)
Refactored resources generator to use universal http resource which
cover most cases.
- loadResource is imported from sdk
- accepts url (expression), method, headers (value is expression) and
body (expression)
- all variables and page params parameter are available for loader
expressions
2023-12-24 01:03:44 +07:00
Jaya Krishna Namburu 662f64988a feat: Add box-shadow ui panel for editing values individually for layers (#2706)
## Design

https://www.figma.com/file/xCBegXEWxROLqA1Y31z2Xo/%F0%9F%93%96-Webstudio-Design-Docs?node-id=8075%3A38024&mode=dev

## Description
Box-shadow floating panel to edit each layer values individually. 
fixes #2523 



![box-shadow](https://github.com/webstudio-is/webstudio/assets/11075561/67e16627-792e-430a-ae24-3bb59792b58f)
2023-12-21 07:26:53 +01:00
Bogdan Chadkin 0688dfdab7 feat: switch to expression edtior for expressions (#2707)
Ref https://github.com/webstudio-is/webstudio/issues/2532

- switched to expression editor for expression field in variables panel
- removed legacy code editor
- preview actual (not initial) values in variable list
- show actual values in variable list for parameters
- render autocomplete tooltip in body to prevent variables popover
scroll overflow
- wrap lines expression editor to avoid horizontal scroll
- fix html embed failing when non string value is specified

<img width="503" alt="Screenshot 2023-12-20 at 11 17 22"
src="https://github.com/webstudio-is/webstudio/assets/5635476/09a4ae36-2b02-416f-b290-3a82cda79851">
<img width="493" alt="Screenshot 2023-12-20 at 11 15 14"
src="https://github.com/webstudio-is/webstudio/assets/5635476/409c08e5-200f-45aa-908c-be5d0a2ba520">
2023-12-21 12:14:00 +07:00
Bogdan Chadkin 60dcb68776 feat: reimplement expression editor with codemirror (#2705)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here introduce the new expression editor as a replacement to code
editor. It is implemented with codemirror and will improve DX of our
bindings and cms usage.

- autocomplete now completes nested objects in variables
- javascript syntax is highlighted in expressions
- json values are formatted as multiline text
- autocomplete shows fields value/type

Additionally improved a couple of things

- json objects are wrapped with parentheses `({ param: "value" })` to be
treated as object instead of block in highlighter
- objects and arrays are rendered as "object" and "array" in variables
list for cleaner UI

Integrated in builder only for variable value and json prop value. Will
require additional logic to integrate as expression editor.

<img width="559" alt="Screenshot 2023-12-19 at 12 13 28"
src="https://github.com/webstudio-is/webstudio/assets/5635476/c3a3907a-9c08-4343-a1a7-ed12dbdb2404">
<img width="239" alt="Screenshot 2023-12-19 at 12 12 24"
src="https://github.com/webstudio-is/webstudio/assets/5635476/777a2ac5-db79-46c7-8438-538f03edcbf7">
2023-12-19 15:10:40 +07:00
Bogdan Chadkin b919bdd0ba fix: generate link hash in preview (#2700)
Closes https://github.com/webstudio-is/webstudio/issues/2696

broke this when refactored props computing, normalizing props should
always be called on whole props list to allow getting id prop from other
pages and instances and copmute hash.
2023-12-19 13:07:48 +07:00
Bogdan Chadkin dcd989108e feat: generate resource loaders (#2701)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added generation of server modules with resource loaders. These
loaders are invoked in remix loader and result is passed to page
component.

Check fixtures and tests.
2023-12-18 21:24:50 +07:00
Bogdan Chadkin 02534730de feat: support resources in schema and compiler (#2698)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added new schema type "Resources" to contain configuration of
requests to services. Their first use case is referencing from variable
to store loaded data.

For now added only client side generation. Later add support for server
code generation as part of remix loaders.
2023-12-16 15:44:49 +07:00
Ikko Eltociear Ashimine 4ca0ded92b docs: fix typo in migrations-cli/README.md (#2678)
Reseting -> Resetting
2023-12-15 00:59:14 +07:00
Bogdan Chadkin 7fe4b770d6 feat: support page path params in site compiler (#2682)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here remix route params are adapted to URLPattern format and passed to
generate page component as prop.

For this added 2 remix specific utilities
- convert subset of url pattern to remix route
- generate utility to adapt remix params to URLPattern params for
example for `/*` `params['*']` is replaced with `params[0]` and for
`/:slug*` `params['*']` is replaced with `params['slug']`
2023-12-15 00:34:51 +07:00
Bogdan Chadkin 42063e0d79 feat: validate page path (#2681)
Here added description tooltip and additional validation to constrain
UrlPattern syntax to fit most framework abilities.

<img width="765" alt="Screenshot 2023-12-13 at 15 58 11"
src="https://github.com/webstudio-is/webstudio/assets/5635476/f4124e66-a483-4228-b576-99b9d57afc31">
<img width="528" alt="Screenshot 2023-12-13 at 15 56 45"
src="https://github.com/webstudio-is/webstudio/assets/5635476/e3241ebe-bfb1-4e79-9ade-691700b9e08b">
2023-12-15 00:02:37 +07:00
Bogdan Chadkin e2d14eee72 fix: implement own hotkeys (#2684)
Fixes
https://discord.com/channels/955905230107738152/1184660413326053426/1184660413326053426

Primitives exposed by react-hotkeys-hook are quite useless and buggy for
us. Here added own simple implementation which should fit our needs.
2023-12-14 23:58:14 +07:00
Ivan Starkov 297b8f1961 build: Release 0.123.0 (#2695)
## Description

NPM Release 0.123.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
0.123.0
2023-12-14 17:50:07 +02:00
Ivan Starkov c4b6d0a2cc fix: Broken chrome detection (#2694)
## Description

seems like `// return` was commented for local testing

## 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-12-14 17:47:55 +02:00
Ivan Starkov 039b5ce3cf build: Release 0.122.0 (#2683)
## 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
0.122.0
2023-12-14 17:29:02 +02:00
Prashik Meshram 72e4db14e2 Fix broken link (#2693)
## Description

Fixed #2692

## Steps for reproduction

The Contributing Guide link should point to correct URL now

## Code Review

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

## Before requesting a review

- [x] made a self-review
2023-12-14 17:28:37 +02:00
Ivan Starkov 6dfdd0d607 fix: "Add status to commit" fails on forked repos (#2689)
## Description

closes #2688

## 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-12-14 16:02:12 +02:00
Ivan Starkov 1376a0cd8f fix: Fix that status error prevented PR merge (#2687)
## Description

github protection rules are based on job names

## 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-12-14 15:06:58 +02:00
Oleg Isonen b457cf3923 fix: Make sure browser support message clarifies cross-browser support for produced sites (#2686)
## Description

Make sure browser support message clarifies cross-browser support for
produced sites

Closing
https://github.com/webstudio-is/webstudio-community/discussions/89

## Steps for reproduction

1. open in any non-chromium browser to see the message

## 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-12-14 13:50:38 +01:00
Ivan Starkov ff17a23483 feat: Add pro badge (#2680)
## Description

- Change "Pro" badge according to design
https://www.figma.com/file/xCBegXEWxROLqA1Y31z2Xo/%F0%9F%93%96-Webstudio-Design-Docs?node-id=8821%3A11999&mode=dev
- Add `Upgrade to Pro` menu item

See lostpixel changes too


ref #2661

## 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-12-14 13:55:19 +02:00
Ivan Starkov 915500024f fix: Click on an svg icon inside a link on canvas is not prevented (#2679)
## Description

closes #2676

## 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-12-13 10:57:31 +02:00
Bogdan Chadkin 92ddfbd64c feat: support page url pattern in builder (#2674)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here extended page "path" field to accept [url
pattern](https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern_API)
compatible syntax to parametarize url with id, date, slug or anything
else. Such data can be passed to backend/cms requests and use the same
webstudio page for dynamic content.

Preview fields automatically added when template fields appear in path.

- fixed json local value
- create "Page params" parameter data source when template is used in
path
- added preview fields to compile path template and preview in ui

<img width="1292" alt="Screenshot 2023-12-08 at 11 35 30"
src="https://github.com/webstudio-is/webstudio/assets/5635476/5dac81f6-5334-4d01-bf28-a74dd709834b">
2023-12-11 20:19:18 +07:00
Bogdan Chadkin 61d664fc87 refactor: support parameter data source for collection item (#2671)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added dataSource.type = 'parameter' without initial value because
value is always provided by context. It let us fix a few issues with
variables without complicating logic.

- prevent deleting parameter variable (collection item) in variables
panel
- allow changing only name of parameter variable
- show only name in the list of variables
- fix removing expression from collection data
- hide item parameter from collection variable list
- prevent editing parameter value from props
- make collection unstylable
2023-12-08 11:42:18 +07:00
Bogdan Chadkin 60c17c6751 fix: create temporary files within assets directory (#2669)
Fixes
https://discord.com/channels/955905230107738152/1133337749856989316/1181798549982302329

This fixes linux issue when tmp and cwd are on different mounts or
drives.
2023-12-08 00:12:05 +07:00
Ivan Starkov e65ec39eef feat: Support refund events (#2673)
## Description

ref #2661

We use GENERATED columns in our database to simplify field extraction
from events. This avoids using JSON operators in our views. We store the
entire event data. In our SaaS, there's a script that runs once to
populate the eventData. We've also updated the n8n schemas in our SaaS
to automatically fill eventData. This setup makes it quicker to add new
events or update logic in n8n schemas.

## Steps for reproduction


## 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-12-07 15:46:49 +02:00
Bogdan Chadkin 8e1683ed86 refactor: switch to instances slice for copy paste (#2666)
Use same well tested utility to slice and insert its copy for copy
paste. Moved most utilities inside of instance plugin and added more
tests for it.

## Steps for reproduction

1. play with copy paste
2023-12-06 23:49:48 +07:00
Bogdan Chadkin bf3fb26058 build: trigger rebuild 2023-12-06 22:05:56 +07:00
Bogdan Chadkin 7863527790 feat: disable props bound to complex expressions (#2667)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added logic to disable props controlled by complex expressions like
`formState === 'success'` where we cannot change variable value.

Added icon with tooltip near label to clarify why it is disabled.

<img width="312" alt="Screenshot 2023-12-03 at 13 46 47"
src="https://github.com/webstudio-is/webstudio/assets/5635476/ce5680d4-8e9c-4467-ac6a-5971d3ce99ab">
<img width="308" alt="Screenshot 2023-12-03 at 13 36 56"
src="https://github.com/webstudio-is/webstudio/assets/5635476/ecc20bd5-cfab-43a9-bc20-a762cd6d37b2">


## Steps for reproduction

1. create form
2. select success message
3. check "show" prop
4. create collection
5. go to html embed and change "code" expression to `collectionItem + "
pie"`
6. check code prop
2023-12-06 12:45:39 +07:00
Bogdan Chadkin f0b3d8fd6e feat: support duplicating pages (#2664)
Fix https://github.com/webstudio-is/webstudio/issues/2516

Here added "duplicate" button to page settings and implemented logic
based on recent instances slice utilities.

## Steps for reproduction

1. open pages
2. click on page
3. click "copy" button
2023-11-30 00:37:29 +03:00