Commit Graph
3073 Commits
Author SHA1 Message Date
Bogdan Chadkin bf0f4ae776 refactor: replace env.d.ts with tsconfig types (#3121)
Latest remix template stopped generating additional file for types.
2024-04-09 19:50:33 +07:00
Oleg Isonen 50b890b477 refactor: Stop humanizing properties and attributes in autocomplete (#3122)
## Description

When user types a dash separated attribute in properties, it doesn't
feel natural when autocomplete shows humanized version of it

## Steps for reproduction

1. open settings
2. add new property, start typing
3. see properties listed either camel case (properties) or kebab case
(attributes)

## 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-04-09 14:34:07 +02:00
Bogdan Chadkin 4007fc329d refactor: switch to remix vite (#3120)
Ref https://remix.run/docs/en/main/future/vite#setup-vite
2024-04-09 17:45:00 +07:00
Bogdan Chadkin c596da6127 refactor: cleanup shared modules (#3119)
Got rid of remix/index.ts which mixed server and client code. Dropped
unused crypto utilities and jose dependency.
2024-04-09 14:09:35 +07:00
Bogdan Chadkin 9136430cb5 refactor: restructure ai package (#3118)
Here refactored ai package to better split server and client parts and
not leak babel to client.

This save ~100kB in our bundle size.
2024-04-09 13:05:48 +07:00
Bogdan Chadkin b93a7ab181 refactor: bump prisma (#3115)
Here bumped prisma to the latest version
which supports new driver adapters as preview feature.

Also simplified prisma-client build and got rid from build-package
script. prisma-client package files are now commonjs only to avoid
issues with modern bundlers.
2024-04-08 21:27:39 +07:00
Bogdan Chadkin 6e7e2ea936 refactor: upgrade lexical (#3114)
Lexical now supports esm and can be imported in modern bundlers without
hacks.
2024-04-08 20:33:28 +07:00
Bogdan Chadkin 8922655ba8 refactor: replace the color picker (#3113)
We can't bundle react-color with vite so switching to more compact and
simple solution, react colorful.

node_modules cut is 24MB

client bundle size cut is 200kB

Got rid of hex and rgba components inputs. Css input is able to parse
all hex, hsl and rgb. Added buttons with newer formats to copy, would
help as interop with other tools probably.

![image](https://github.com/webstudio-is/webstudio/assets/5635476/0d6f11e5-d010-42f3-a0ab-f3104ee7e8cf)
2024-04-08 19:13:15 +07:00
Bogdan Chadkin da7a3e632c refactor: drop react-use (#3111)
Here replaced react-use utilities with own solutions because could not
bundle it with vite. It also had a lot of transitive deps which bloated
our bundle and node_modules. Win-win.
2024-04-08 00:53:57 +07:00
Bogdan Chadkin 13b6d79c3f refactor: drop theme switcher (#3110)
Theme switcher is very complicated and we may not introduce dark theme
for a while. Easier to drop it for now and reintroduce with brand new
solution.
2024-04-07 03:12:22 +07:00
Bogdan Chadkin ae79d9f133 refactor: drop env interop (#3109)
Here got rid from client-server env interop which will stop working
outside of node-like environment.
2024-04-07 00:55:42 +07:00
Bogdan Chadkin b704861a33 refactor: move image base url into loader (#3108)
Here moved IMAGE_BASE_URL and ASSET_BASE_URL env variables into loader.
Builder now can access image loader with atom.
2024-04-06 23:02:23 +07:00
Bogdan Chadkin 7c0db06c77 refactor: move publisher host into loader (#3102)
Here refactored ours envs.

- deleted BUILDER_HOST as unused
- moved PUBLISHER_HOST into loader and shared in UI with atom
2024-04-06 22:09:27 +07:00
Bogdan Chadkin 156ddf2dc4 refactor: simplify login buttons (#3105)
Here removed non-working tooltips for dev only environments and got rid
from one more client env.
2024-04-06 21:04:40 +07:00
Bogdan Chadkin 3b65b1cdbe experimental: show system variable in resource (#3092)
Ref https://github.com/webstudio-is/webstudio/pull/3068
2024-04-06 17:09:28 +07:00
Oleg Isonen f45065bbe6 feat: Show 50 tokens in style source search (#3103)
We were only show matching 5 tokens for no reason at all, why not show
user more options as they narrow down the search?

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


## Steps for reproduction

1. when you see a lit of tokens now you will see up to 50 and it will be
scrollable

## 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-04-06 11:07:34 +02:00
Bogdan Chadkin eb5e9200d9 refactor: drop unused sentry (#3100)
We do not use sentry 1 year (since 5 april 2023).
Better get rid of for now to not block updates.
2024-04-05 23:21:45 +07:00
Bogdan Chadkin 6ea37250cf refactor: drop debug (#3099)
I think nobody used this utility for a while
and we do not really need to support it in our code.
2024-04-05 22:39:09 +07:00
Bogdan Chadkin cf92442ce3 refactor: generate metas.json (#3096)
Here reduced server bundle size by moving metas and props metas into
static json which can be accessed from the client and hosted as asset.
2024-04-05 16:55:37 +07:00
Bogdan Chadkin e75c174f75 build: release 0.144.0 (#3090) 2024-04-04 22:34:52 +07:00
Ivan Starkov 3205c81c51 fix: Broken rich text panel (#3095)
Broke rich text, what to do is written in reopened issue.
https://github.com/webstudio-is/webstudio/issues/3021
2024-04-04 22:10:47 +07:00
Oleg Isonen b2ef61ea0a feat: add Resource type descriptions to the select box (#3091)
This should clarify that Resource is a safe for using private keys
inside them.

<img width="567" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/9c530ff5-3ca2-4aff-857b-225ac7cf95dd">



## Steps for reproduction

1. create a variable
2. hover over type options

## 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-04-04 16:36:21 +02:00
Bogdan Chadkin 39f5f5b20d experimental: hide new form component behind flag (#3089)
Here added new "filters" flag which hides new form component form
components panel and renamed server form back to just form until we
agree on name.
2024-04-04 20:32:31 +07:00
Oleg Isonen 77f14266bd fix: Allow multiple folders to have an empty slug (#3074)
Fixes.
https://discord.com/channels/955905230107738152/1223709963025907854

Empty slug is not a slug, it's an absence of one, so there can be any
amount of folders with empty slug


## Steps for reproduction

1. add 2 folders with empty slug
2. expect no error

## 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
2024-04-03 13:59:37 +02:00
Bogdan Chadkinandistarkov f5873f7738 refactor: upgrade to remix v2 (#3076)
Bumped remix to v2 everywhere in CLI, fixtures and builder. Caught a lot
of type stuff. Runtime seem to work without changes. Removed
@vercel/remix and had to upgrade `remix-auth` packages.

Unable to test netlify and vercel from monorepo and need to have sdk
remix with updated remix. So will test after packages release.

## 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: istarkov <istarkov@gmail.com>
2024-04-02 17:26:45 +07:00
Bogdan Chadkin 33d3dbc546 refactor: prepare remix types (#3075)
Here replaced LoaderArgs and ActionArgs with LoaderFunctionArgs and
ActionFunctionArgs to simplify bump with remix v2 which changed named of
these types.
2024-03-31 22:45:30 +07:00
Bogdan Chadkin e34aa862bb refactor: move remix root into template (#3071)
React sdk not necessary to depend on remix. It will even complicate
remix upgrade.
2024-03-30 19:13:51 +07:00
Ivan Starkov 8bad95fc16 build: release 0.143.0 (#3070)
## 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
2024-03-30 12:04:04 +03:00
Jaya Krishna NamburuandOleg Isonen 14904077c7 fix: Remove keywords for transition delay and duration, enable sorting layers (#3062)
Update: this PR is not fixing it fully, there is still an issue when
cleaning up field and pressing arrow down it goes into keywords mode.

@JayaKrishnaNamburu will fix it with the next PR

## Description

- Remove keyword values for `transition-delay` and
`transition-duration`. Keywords are valid if they are directly applied
as individual properties. But when they are used under `transition`
shorthand. The `keyword` values actually make the property invalid. For
more reference
(https://www.w3.org/TR/css-transitions-1/#propdef-transition-duration)
- Add `draggable` for the `CSSValueListItem` to show the drag indicator
for individual layers.
- Set intermediate values only when the layer is changed.

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

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2024-03-29 20:22:59 +01:00
Bogdan Chadkin dc1ccd8e2e experimental: support browser and preset styles in style object model (#3067)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added new "layer" option to specificity
which isolate browser and preset styles into own layeys similar to
cascade layers feature from css.
2024-03-29 20:36:20 +07:00
Bogdan Chadkin 9296cd6c1a experimental: support breakpoints and states in style object model (#3055)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here improved sorting declared values and computing cascade value. Added
support for breakpoints and states. Introduced specificity rules to sort
by State-Breakpoint-StyleSource without complicated logic.
2024-03-28 13:03:56 +07:00
Oleg Isonen 870466fc29 fix: Fix transitions for ephemeral changes (#3059)
## Description

1. Stop updating the value when change is using scrub (ephemeral)
2. Stop using isEphemeral for arrow keys handling, it should set the
vale right away

## Steps for reproduction

1. scrub the delay or duration in transition 
2. expect only delay/duration input changing as well as code area, but
not the list in style panel

## Code Review

- [ ] hi @JayaKrishnaNamburu , 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-03-27 15:27:01 +01:00
Ivan Starkov 634bd89412 fix: Use preset height auto for images instead of fit-content (#3052)
## Description

Set image height to "auto" to reduce layout shift, improving
compatibility across browsers like Safari.
Unlike "fit-content," "auto" preserves the aspect ratio when the width
exceeds max-width. (in Safari)
See
https://web.dev/articles/optimize-cls#best_practice_for_setting_image_dimensions


## 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-03-26 22:39:56 +03:00
Oleg Isonen ab4e7a284c feat: add value descriptions to all style panel select boxes (#3031)
<img width="259" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/3ce4aab7-2a4a-4559-97e6-212fd9ec7986">
<img width="272" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/e459c851-8cd0-42c4-8b96-05184a268c49">
<img width="407" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/783eee1f-0a6b-41bf-a07f-f9c30a7a8141">
<img width="444" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/e39cc354-7201-46cc-b194-704015aba781">

https://share.descript.com/view/eTnOyd8vulY

## 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-03-25 23:06:27 +01:00
Ivan Starkov 348b5709b5 fix: Text Content does not propagate changes from Settings Panel if Previous Edit was on Canvas (#3040)
## Description

Closes #3021

The issue was that TextEditor when you switch on setting panel were
active and in no way synchronized with state having it's uncontrollable
nature.

Here we are disabling editing mode on editor blur.


## 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-03-25 19:02:50 +03:00
Ivan Starkov 5e943bb967 fix: Disallow home page inside folder (#3044)
## Description

Closes #3039

- [x] <img width="465" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/ae281eca-39d7-4b15-967d-93428493a0b1">
- [x] Home is always first
- [x] Home has name Home on swap



## 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-03-25 17:48:38 +03:00
Bogdan Chadkin beb3438224 experimental: support custom properties (#3047)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added support for css custom properties in style object model.
Added guaranteed-invalid value to schema to represent initial value of
custom properties.
2024-03-25 19:44:32 +07:00
Oleg Isonen cd0174807d chore: use console.info instead of console.log (#3049)
## Description

We allow console.info (btw we should also allow warn/error/info), we
only disallow console.log in the linter because that's what we use for
debugging.

## 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-03-24 12:52:46 +01:00
Bogdan Chadkin dc68851a5b experimental: improve color: currentcolor behavior (#3045)
Here slightly changed how color: currentcolor is treated. Before on
color property inherited value was used. Though this didn't handle the
case when inherited value is also currentcolor. Here found note in
another spec which says color: currentcolor should be interpreted same
as inherit keyword.
2024-03-23 17:00:34 +07:00
Bogdan Chadkin 16f165a681 experimental: support currentcolor in style object model (#3043)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added currentcolor keyword support. It is case insensitive and
resolved as a new "used value", while "computed value" still contains
currentcolor.
2024-03-22 15:52:07 +07:00
Bogdan Chadkin 0fab9af9a5 experimental: setup style object model (#3042)
Ref https://github.com/webstudio-is/webstudio/issues/1536

Here added style object model basic functionality with inheritance and a
few keywords like "initial", "inherit" and "unset".

The algorithm is following css spec and will get more features in next
PRs.
2024-03-22 13:23:53 +07:00
Oleg Isonen 666bcec19d feat: Make unset property in style panel visibly interactive (#3038)
## Description

Many don't realize that properties in style panel are hoverable,
clickable and even have alt+click for reset function



https://github.com/webstudio-is/webstudio/assets/52824/5080c9ec-5f78-4fef-b498-b4fc577536ad




## 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-03-21 15:04:09 +01:00
Ivan Starkov 3c189aff97 fix: HTML Embed Code editor inside Dialog Content looses focus (#3020)
## Description

closes #2998

Also fixes name edits etc.
The same issue with radix as we had in the past, focus lock on any
mutation inside dialog aquires focus.
And we have no good way to prevent programmatic focus inside iframe.



## 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-03-20 22:42:44 +03:00
Ivan Starkov ddb7e068ab fix: Style updates on all instances upon change (#3037)
Closes https://github.com/webstudio-is/webstudio/issues/2988

## Description

When a token value is modified, the change will be immediately visible
across all N instances using the same token

## Steps for reproduction

Create token, use it on 2 instances, change token styles, local styles
etc to see it work


## 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-03-20 22:05:03 +03:00
Bogdan Chadkin dad898e6a4 refactor: move expressions into base sdk (#3032)
We need to move stuff not related to react out of react-sdk into
universal sdk package.
2024-03-19 02:02:07 +07:00
Bogdan Chadkin a5db173288 experimental: support search params in expressions (#3030)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here added support for search params in builder and compiler.

system.search contains an object computed from url.

In generated website loaders compute search params which allows to
access them in resources.

In builder links with search params populate system.search.

<img width="180" alt="Screenshot 2024-03-18 at 21 09 05"
src="https://github.com/webstudio-is/webstudio/assets/5635476/4efa7a38-511c-4360-a085-84da2527db74">
<br>
<img width="471" alt="Screenshot 2024-03-18 at 21 09 25"
src="https://github.com/webstudio-is/webstudio/assets/5635476/af793a60-698a-485b-8606-dfacdaf633b7">
<br>
<img width="429" alt="Screenshot 2024-03-18 at 21 09 36"
src="https://github.com/webstudio-is/webstudio/assets/5635476/a3c8c52e-f0a1-43ff-a464-f57b61b1f159">
2024-03-18 22:04:49 +07:00
Oleg Isonen a45958f90e feat: Allow excluding a page from marketplace (#3019)
When user has a template, but some pages are not meant for being
inserted using a click from the marketplace sidebar, we need a way to
exclude them. Now user can do it from page settings using the same
checkbox that also prevents crowling

<img width="444" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/86521e24-bbe3-4cb7-bfe2-b04bdf5d2418">

## Steps for reproduction

1. check the "exclude this page from search results" in page settings
2. see the page doesn't show up in the marketplace pages list

## 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
2024-03-18 10:25:27 +01:00
Oleg Isonen 12129b4065 feat: add more descriptions (#3024)
1. added description to show property (People are often confused why
breakpoints have no impact on this)
2. added descriptions to right sidebar tabs
3. added descriptions to marketplace tabs
4. show marketplace category descriptions in select box
5. added ability to select component to render the hint/description

<img width="686" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/db0483e9-9b84-42bf-a3fd-00c65863c02d">
<img width="280" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/eedb86a2-459b-4c0e-85e6-3dd5a55a405b">
<img width="281" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/b966b922-554a-4ac0-8566-f99741b76d97">


## 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-03-18 10:24:39 +01:00
Bogdan Chadkin df579f7c72 refactor: switch to acorn expressions everywhere (#3028)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here switched the rest of usages to acorn based expressions. Added
getExpressionIdentifiers utility to extract used variables names to
avoid using transpiler replaceVariable callback for this.
2024-03-18 14:41:57 +07:00
Bogdan Chadkin 61f751adab refactor: switch to acorn for expression linting (#3026)
Ref https://github.com/webstudio-is/webstudio/issues/2903

Here added new lintExpression utility to provide diagnostics when
parsing error happens or not supported language feature is used.

Additionally it no longer forbids template literals and ternary
operators. Btw still need to get rid from legacy implementation to make
them work.

<img width="465" alt="Screenshot 2024-03-17 at 20 41 49"
src="https://github.com/webstudio-is/webstudio/assets/5635476/e208c360-7f2a-471a-aa54-983ff0a14247">
2024-03-18 11:01:40 +07:00