Commit Graph
5224 Commits
Author SHA1 Message Date
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
Bogdan Chadkin a31e686248 build: fix running migrations on empty database (#2658)
Fixes https://github.com/webstudio-is/webstudio/issues/2632
2023-11-29 20:21:29 +03:00
Jaya Krishna Namburu 4304414623 fix: Handling custom value select from select box in transitions (#2659)
## Description

fixes #2624 

@taylornowotny i couldn't reproduce the issue with shortcuts in local or
either deployed version. But still added acheck to stop events while
typing. So, let me know if it's working on your side.


https://github.com/webstudio-is/webstudio/assets/11075561/67d09016-d9be-4bb2-9ff3-552fbc49c461



https://github.com/webstudio-is/webstudio/assets/11075561/9ab3669a-50d3-4c41-92fd-c544d91b55a8



## Code Review

- [ ] hi @kof, I need you to do
  - 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-11-29 16:30:27 +01:00
Bogdan Chadkin d361c9ecee feat: add collection component to builder (#2657)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here added a "core" collection component to support iterating over json
arrays.

There is a lot of room for unification of all this logic though would
require building reactive tree abstraction.

Canvas automatically renders stub component for collection to make it
droppable. We can do the same for slot component.

Slot and Fragment eventually will go to "core" components too.

Added json/parameter prop types to embed template to support collection.

Fixed loosing focus while typing in json prop.

## Steps for reproduction

1. Drop collection component
2. play with it
2023-11-29 17:07:28 +03:00
Bogdan Chadkin 33509db139 refactor: reimplement duplicating instances (#2663)
Part of https://github.com/webstudio-is/webstudio/issues/2516

Here added new copy implementation. There are 2 differences

- it does not change existing instances and not change their children,
we will need this to copy pages
- it handles cross-project copy of portals (slots) properly, now each
portal content is inserted separately if the root does not exist and
skips otherwise
- much better covered with tests

## Steps for reproduction

1. try duplicating form and change form state prop
2. try duplicating form error message and change form state prop
2023-11-29 13:45:09 +03:00
Ivan Starkov 7142efc4ba feat: Pass cookies and requestUrl to n8n (#2662)
## Description

Ref #2661

This allows us to extract posthog (and probably other trackers) cookies
distinct_id for the user on the server side
And then using aliasing to use in n8n schemas
https://posthog.com/docs/product-analytics/identify#alias-assigning-multiple-distinct-ids-to-the-same-user

See corresponding n8n schemas in saas repo



## 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-29 12:33:50 +02:00
Jaya Krishna Namburu 301e7d95ca fix: Display error messages when a template is not passed for building a project (#2660)
## Description

fixes #2538 and #2615

Don't use `vercel` as default template while exporting from cli

## Code Review

- [ ] hi @istarkov , I need you to do
  - 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)
- [x] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
2023-11-28 18:07:21 +01:00
Bogdan Chadkin 847a042ceb fix: show active style states as remote (#2654)
Succeeds https://github.com/webstudio-is/webstudio/pull/2136 in more
simple way. Active states are preresolved for everything except local
styles. And local styles shown as overwritten when defined state is
active.

Fixes
https://discord.com/channels/955905230107738152/1177028091227418654

## Steps for reproduction

1. create form component
2. choose error state
3. set background red
4. go to error state in style source menu
5. should be "remote" label
6. set background green
7. go to stateless style source
8. reset background color
9. should be "overwritten" label
2023-11-26 14:59:21 +03:00
Jaya Krishna Namburu 6c2a26a464 feat: use netlify image loader for netlify templates (#2655) 2023-11-26 16:10:43 +05:30
Ivan Starkov 04b7c2ff23 build: Update NPM 0.121.0 (#2652)
## 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.121.0
2023-11-23 10:34:03 +02:00
Ivan Starkov a939121318 fix: Incorrectly quoted URLs in CSS (#2642)
## Description

Even we have this

https://github.com/webstudio-is/webstudio-builder/blob/9af97656af2e06a789f416bd93e1e1d0e756f063/packages/asset-uploader/src/utils/sanitize-s3-key.ts#L26

Additionally seems like best practice is to add backslashes for `"` and
`\` symbols, even this symbols are impossible having sanitize we are
using. (In case of sanitizer change everything can break)




## 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-22 18:53:36 +02:00
Ivan Starkov 0395839d50 feat: Support mutiple events in transaction log table (#2641)
## Description

SaaS has new n8n schema "Stripe Customer Subscription Deleted" 
Other schemas updated accordingly

Now unsubscribe is handled by our system

## 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-21 21:33:09 +02:00
Ivan Starkov d6c36c7a6f fix: Apply project owner's plan features to the via link shared projects (#2639)
## Description

Apply project owner's plan features to the projects shared via link

## Steps for reproduction

Need to be merged to test (see migrations)
After merge:
Create project shared link.
Open in incognito.


## 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-21 13:34:10 +02:00
Bogdan Chadkin 79d3214da5 fix: use main color for local style source (#2629)
Fixes https://github.com/webstudio-is/webstudio/issues/2610
2023-11-21 10:35:56 +03:00
Jaya Krishna NamburuandOleg Isonen ad55b6d93f fix: Handle empty input values from the share project popover (#1978)
fixes #1966 

The steps to reproduce are in the linked issue. The popover shouldn't
close when the name in the input field is empty.

@taylornowotny i would like you to check this one for the error state
please, the Input field didn't have a red outline for error as defined
in the figma file. I added it now, So, in order to check the effects of
this in other place. It would be great if you can check it once.

![Screenshot 2023-07-25 at 17 35
51](https://github.com/webstudio-is/webstudio-builder/assets/11075561/db8087b5-13f0-401d-8874-a7c9e248b350)

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-11-20 17:49:50 +01:00
Bogdan Chadkin 177cfeb3a1 refactor: use selectors in all tree callbacks (#2635)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Selectors in tree are necessary to easily access data of ancestors while
manipulaating navigator tree.

Required to support collections.
2023-11-20 16:33:29 +03:00
Ivan Starkov b8662bdc2d build: release 0.120.0 (#2634)
## 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.120.0
2023-11-19 23:33:22 +02:00
Ivan Starkov a87789f261 feat: Add fields to transaction log, add userPlanSettings (#2633)
## Description

Add additional fields to transaction log, so we can create billing
portal for users to unsubscribe/change etc of subscriptions

Plus:
- [x] Allow unlimited domains to all "pro" users
- [x] Add subscriptions link to users with subscriptions (created by n8n
schema on click)
<img width="213" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/08d40835-3273-4ca9-a0e3-8a4f7614da93">

- [x] Allow admin link sharing

## 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-19 22:43:31 +02:00
Bogdan Chadkin 3cfa10ae22 refactor: compute props contextually (#2628)
Ref https://github.com/webstudio-is/webstudio/issues/2532

Here refactored props values computing to reuse in both canvas and
settings panel and support future collections which need to provide
different values for same variables.

Grouped whole logic and covered with tests.

## Testing

- check image src is working
- check link switch page in preview
2023-11-18 20:54:51 +03:00
Ivan Starkov 50fa7b5f24 build: npm release 0.119.0 (#2621)
## 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.119.0
2023-11-17 14:38:34 +02:00
Jaya Krishna Namburu f1780479c4 chore: remove feature flag check for transitions (#2622)
## Description

All the PR's related to transitions are merged now. 
#2581 
#2572
#2538
#2511

## Before requesting a review

- [x] made a self-review
- [x] added inline comments where things may be not obvious (the "why",
not "what")
2023-11-17 14:05:12 +02:00
Ivan Starkov a326ae5b1d fix: Transaction log, add preview/production/local to hooks (#2623)
## Description

- Prisma way of creating migrations comparing local db with schema model
is super error prone
- Adding 'preview' | 'production' or 'local' to n8n webhooks otherway no
way to host hooks together

## 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-17 12:29:18 +02:00
Jaya Krishna Namburu c723b81885 feat: Add UI handling for transition timing and delay attributes (#2581)
- Adds `transition-duration` and `transition-delay` input boxes.
- Adds tooltips for all the UI actions for transitions.
2023-11-17 07:49:25 +01:00