Commit Graph
5224 Commits
Author SHA1 Message Date
Jaya Krishna Namburu ef6cc54931 refactor: Save content when content box is closed/blur (#3552)
## Description

fixes #2967 
This will save the content when the content box is blur. This will wrap
up all the things that we need to handle under the #2967 issue.

## Steps for reproduction

- Add a layer to any of the `shadow` or `filter` properties.
- Now, edit the values using the content box and click somewhere else on
the panel.
- This should save the values once the box looses focus.

## 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)
2024-06-13 18:16:40 +02:00
Bogdan Chadkin 936dcd3ca8 build: publish 0.168.0 (#3556) 2024-06-13 14:57:21 +03:00
Bogdan Chadkin 7ecf346eb8 build: enable semver check in changelog (#3554)
Main reason is github sends tags in alphabetical order so changelog
generated from very old accidental tag like `diff` from mistyped `gt
diff` command.

I dropped all such tags. Though semver is another thing which can
guarantee correct tag lookup. Let's try this for next release.
2024-06-13 14:04:35 +03:00
Bogdan Chadkin fe3fdc6de9 build: uprgade eslint and prettier (#3553)
Upgraded eslint minor version, plugins and prettier.
2024-06-13 13:03:22 +03:00
Bogdan Chadkin 7fcef25e3f experimental: support flex shorthands (#3551)
Ref https://github.com/webstudio-is/webstudio/issues/2647

- flex -> flex-grow, flex-shrink, flex-basis
- flex-flow -> flex-direction, flex-wrap

Also slightly flatten shorthand extractors
to make it more straightforward.
2024-06-13 12:32:24 +03:00
Jaya Krishna Namburu b28b1886ab refactor: display show/hide for layers in the style-panel only on hover (#3532)
## Description

Show full label for the `CSSValueListItem` and display `show/hide` icons
only when users hover over the layer. Or when the users focuses the item
with keys.

## Steps for reproduction
1. Create a new layer under any of the properties which has layers
2. add some values so that the labels are big enough to test it. 
3. Hover over the layer with mouse or focus it using keyboard.
4. The label should display the full name in normal and truncate the
label and show the `show/hide` icons.

![Screen Recording 2024-06-10 at 5 52
25 PM](https://github.com/webstudio-is/webstudio/assets/11075561/e0e2e41f-7ef7-44a4-afcd-2184b92a5482)


## 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)
2024-06-13 10:08:36 +02:00
Bogdan Chadkin 56fbabf56d fix: clear format in text toolbar (#3544)
Here upgraded to the latest lexical version
and fixed the issue with updating buttons state
after format clearing.

<img width="321" alt="Screenshot 2024-06-12 at 16 59 26"
src="https://github.com/webstudio-is/webstudio/assets/5635476/7753070d-f627-4ac6-bee9-159dad9447eb">
2024-06-13 02:35:28 +03:00
Oleg Isonen 9b08f1dbbc fix: Properties like animation-name were receiving unneeded px suffix (#3543)
Closes https://github.com/webstudio-is/webstudio/issues/3529

## Description

Values that can have custom identifiers (user defined string) were
tested to accept a unit value and they did, because anything is valid.

Now they are not tested with units any more

## Steps for reproduction

1. add animation-name in advanced panel
2. use any name it should stay as-is
3. previously we would add a "px"

## 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` file
2024-06-12 19:41:01 +02:00
Bogdan Chadkin c5438cf6e3 experimental: expand text shorthands (#3545)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Added support for 3 shorthand properties

- font
- text-decoration
- text-emphasis

white-space and text-wrap left untouched caz expanded versions have
worse support and even mdn is not clear on shorthand syntax.

We will be able to migrate with client migrations in the future.
2024-06-12 19:36:58 +03:00
Jaya Krishna Namburu ee150a5d0a experimental: set collisionPadding for background panel to reduce panel jumps. (#3533)
fixes #3511 

## Description

This is an experiment to see if setting `collisionPadding` can reduce
the background panel jumps when switching tabs. `Popover` content always
opens close to trigger, but there is no defined way to know when it
repositions when the content is dynamically changed.
So, when the panel is opened close to the bottom of the screen, the
panel moves away from arrows under the cursor.

## Steps for reproduction

- Add a background
- Now, open the background panel and switch between the tabs.

## 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
- [x] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
2024-06-12 15:31:00 +02:00
Bogdan Chadkin 85f66a0ce6 fix: lint weird cases in expressions (#3542)
Looks like acorn skip thes rest of the input after successfully parsing
expression. This resulted in weird syntax errors our linter allow user
to enter.

The fix is simple, force acorn to consider whole input as expression by
wrapping with parentheses. Though it also requires tuning diagnostics
position.
2024-06-12 13:25:50 +03:00
Oleg Isonen 8de6c4aee4 experimental: Paste from webflow 6 (#3519)
## Description

1. add rendering states e.g. :hover
2. keep the original rules order
3. remove overwritten properties
4. code embed 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` file
2024-06-12 10:51:39 +02:00
Oleg Isonen 0cf24fbcd5 chore: Update gpt 3.5 model and improve reliability (#3541)
Closes https://github.com/webstudio-is/webstudio/issues/3517

## Description

Completion would often start with \`\`\`json instead of the actual json
that we want to parse, so I added a command to not start with \`\`\`json

## 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` file
2024-06-12 10:41:12 +02:00
Ivan Starkov 60e7c064a7 fix: Correct single-quoted attribute handling in Custom Code (#3539)
## Description

Following code in Project Setting Custom Code 

```
<script data-cf-beacon='{"token": "123"}'>
```
failed on build

## 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` file
2024-06-12 00:06:29 +03:00
Oleg Isonen 4567f0956c experimental: Always finish up builder loading animation (#3537)
## Description

When project loads very quickly, loading animation will end where it
started at 0%. To make sure it always finishes at 100%, we need to let
it do so.

Before
https://share.descript.com/view/TnNtRBlnxGq

After
https://share.descript.com/view/0WqOiBbVy8B

## Steps for reproduction

1. click button
2. expect xyz

## 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` file
2024-06-11 21:09:59 +02:00
Bogdan Chadkin 2c270914f2 fix: improve cli installing (#3538)
- restrict node to >= 20.12 with "engines" field
- write .npmrc by code instead of copying from template because publish
always cuts it from cli package
- use `npx webstudio@latest` to always install fresh cli if necessary
2024-06-11 21:05:09 +03:00
Ivan Starkov adc2c21ce9 fix: Development mode refersh fix. (#3534)
## 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` file
2024-06-11 14:39:11 +03:00
Bogdan Chadkin f9c7b7a153 refactor: merge icon modules (#3516)
Our vite setup in builder is getting slower
because of huge amount of modules.

Here I merged more than 400 icon modules into 2 modules string and
components.

This should improved vite experience and slightly reduce bundling time.
2024-06-11 00:47:27 +03:00
Bogdan Chadkin 1c8999e2cf experimental: add css shorthands utility (#3531)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Here added new utlity to expand css shorthand properties into longhands.
Parsing is not trivial. csstree could help a lot with builtin lexer but
it does not expose matched nodes on properties. Here we can leverage
lexer to match big pieces and refined them into set of properties.

Supported following properties

- border
- border-radius
- border-image
- outline
- margin/padding
- inset
- gap
- place-content
- place-items
- place-self

Will do the rest in separate PRed them to `.env` file
2024-06-11 00:35:50 +03:00
Oleg Isonen d2a3015239 feat: Builder loading delight (#3526)
Closes https://github.com/webstudio-is/webstudio/issues/3520

## Description

Before: 


https://github.com/webstudio-is/webstudio/assets/52824/4ba347e6-8994-45c6-bdee-cdd0738539fa


After:



https://github.com/webstudio-is/webstudio/assets/52824/416b4614-cf8d-4b2e-bf34-439fb65d3195






## Steps for reproduction

1. reload builder with large amount of data
2. click from dashboard to a project

## 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` file
2024-06-10 21:10:15 +02:00
Ivan Starkov 9626c6dee5 fix: Favicon sizes conform to Google Search guidelines (#3527)
## Description

width,height must be multiple of 48
https://developers.google.com/search/docs/appearance/favicon-in-search

- In case of non square favicon uploaded add paddings to make it square
[favicon-non-sqare](https://favicon-non-sqare-saas-1noth.wstd.work/) see
white paddings
<img width="207" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/717d18bc-0d4c-4d68-8c11-e232cafac795">

https://favicon-non-sqare-saas-1noth.wstd.work/cgi/image/IMG_2882_(1)_LY_eDOEMEwtikKi5Pyld-.png?width=144&quality=100&format=auto&height=144&fit=pad



_padding crop is used because all other `fit` modes we have can't
upscale images as I know to get exact final height and width set_


corresponding SAAS PR
https://github.com/webstudio-is/webstudio-saas/pull/300

## Steps for reproduction
Open 

https://favicon.staging.webstudio.is/builder/28fb95a3-5236-430c-950e-dda451a31c4d?authToken=2627c718-308e-4690-8919-1e1f00e5b3a5&mode=preview
Publish
See <link rel="icon" and check sizes


## 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` file
2024-06-10 19:15:57 +03:00
Bogdan Chadkin d014c5209b fix: publish without local development hacks (#3528) 2024-06-10 13:43:49 +03:00
Ivan Starkov 85f0309c30 feat: Enable URL drop functionality in Image Manager (#3518)
## Description


https://github.com/webstudio-is/webstudio/assets/5077042/ea38835c-ec5c-4333-a982-f5bb9580d9e0

URLs can be dropped on Image Manager

+ small fixes.
- Files without extensions broke FileName control
- svg files were not shown on local builder after upload


## Steps for reproduction

Open Image Manager, drag urls


## 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` file
2024-06-10 09:52:18 +03:00
Oleg Isonen 3e038a6af6 refactor: Marketplace thumb fallback (#3402)
## Description

<img width="247" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/e14c743a-508d-4fb3-ad16-78906ca04678">


When page doesn't provide thumb we will now render this new one instead
of image placeholder

## 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-06-07 20:47:56 +02:00
Oleg Isonen 2e1f6a35f1 experimental: Paste from webflow 5 (#3509)
## Description

When parsing webflow presets:
- skip selectors with combinators
- support states

## 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` file
2024-06-07 17:04:23 +02:00
Bogdan Chadkin d2be4bee67 build: bump storybook (#3515)
Here upgraded storybook with reresolved transitive dependencies. Removed
babel/types override, will eventually let us deduplicate a lot of
dependencies.
2024-06-07 17:11:29 +03:00
Ivan Starkov 0e1d1cf963 feat: Image Manager drag/drop suport (#3505)
## Description

This is 1st PR In a series of PR's

Next: Image URL Links upload support.

Image Manager now support files drag/drop
(Images, Fonts etc)

## Steps for reproduction

Drag files on image manager see it works.

## 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` file
2024-06-07 15:59:02 +03:00
Ivan Starkov 2e8ad29ef4 fix: Template clone error (#3508)
## 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` file
2024-06-07 15:58:37 +03:00
Bogdan Chadkin a0eee5a30f fix: drop marketplace legacy fallbacks (#3452)
Fixes https://github.com/webstudio-is/webstudio/issues/3450

Got rid of ws:cetegory meta and excludePageFromSearch fallbacks in
marketplace. Social image is the only fallback we agreed to left.
2024-06-07 13:58:16 +03:00
Bogdan Chadkin fde5e8a6f1 build: run webstudio cli without rebuilding (#3513)
Finally figured out how to leverage node conditions to run webstudio cli
in fixtures without rebuilding it on every change.

Import conditions is another thing which allows
to constrain not exposed modules but internal ones.

Now to run cli locally it should be have this env
which is basically same we do with vite.
Works for both import and export conditions.

```
NODE_OPTIONS='--conditions=webstudio --import=tsx' webstudio
```
2024-06-07 13:51:34 +03:00
Ivan Starkov dc09616be0 fix: Image Manager. Ensure picture click and delete functionality work consistently (#3514)
## Description

closes #3504

Reflow caused by Style element rerender sometimes cause focus lose.
It can be or chrome issue or Mutattion observer used in radix focus
scope.



## 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` file
2024-06-07 13:48:55 +03:00
Jaya Krishna Namburu c1c43213c3 fix: reset image url in inputs when users select a uploaded image after adding a remote url to the same. (#3512)
## Description
fixes
- when choosing an image after having a url, url is normally being
reset, so you don't have both, now I managed to have both
- Code area label should be Code

Regarding the 
- jump when switching between image and gradient.
This is a little tricky, to restrict from jumping. Thought about this
while implementing itself. But there is too much negative spacing for
gradients tab. We need to set `min-height`. Which is showing too much
empty spacing for background gradients in my opinion. Let me know, if
it's still fine and we can go ahead.
![Screen Recording 2024-06-07 at 10 32
08 AM](https://github.com/webstudio-is/webstudio/assets/11075561/8bb0f97a-e4c3-4495-822e-cb8b307b908b)

- shouldn't all properties land in the Code area? not just the url()?
This, i am not sure if its possible. Because, in every code-editing
areas. We are showing only the property value and not the key. In this
case, of we want to show multiple properties. Then we need to show
multiple key-value pairs. Like, `background-image: url, background-cli:
border-box` etc. With some additional parsing of these values.

## Steps for reproduction

1. Set a remote url for a background image, now use a uploaded image for
the same. The input-box need to be refreshed.

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

- [ ] tested locally and on preview environment (preview dev login:
5de6)
2024-06-07 11:32:32 +02:00
Oleg Isonen 34380b8861 fix: fixes stacking context between style panel and collapsible in pages (#3507)
Before
<img width="532" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/b72036b6-5265-45fd-961f-7df52123a5b8">

After
<img width="628" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/52824/d330d3b9-809b-4517-ac36-c4b056f93ed1">


## 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` file
2024-06-07 11:05:48 +02:00
Bogdan Chadkin 5cd2899e81 fix: generate conditional collection (#3506)
Fixes
https://github.com/webstudio-is/webstudio-community/discussions/151

Here fixed the issue with generating conditional collection code for
published sites. Added fragment around collection when rendered inside
of condition.
2024-06-06 14:57:56 +03:00
Jaya Krishna Namburu 7b860d16de refactor: allow show/hide options for filters and backdrop-filters (#3502)
## Description

fixes #3451 
Allow `show/hide` for individual layers in `filters` and
`backdrop-filters`.

## Steps for reproduction

1. Add some layers for filters and backdrop-filters
2. Play with `show/hide` icon on each layer.


## 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
- [x] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
2024-06-06 13:15:51 +02:00
Oleg Isonen 2b3e44d745 fix: Fix selecting text in places where it should be selectable (#3503)
## Description

Turns out userSelect auto doens't necessary mean it will fall back to.
the default for the node, we need to be explicit.

## 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` file
2024-06-06 11:41:44 +02:00
Bogdan Chadkin 9998f1633f build: replace dotenv with node env loader (#3500)
Refs
- https://nodejs.org/docs/latest/api/process.html#processloadenvfilepath
-
https://nodejs.org/en/learn/command-line/how-to-read-environment-variables-from-nodejs

Here switched from dotenv to node env loader.
Solves both command line and runtime cases.
The only issue is inability to specify --env-file with NODE_OPTIONS.

Also fixed dev migrations by optionally loading .env.development
2024-06-05 18:26:35 +03:00
Oleg Isonen 4aef12cd7a experimental: Paste from webflow 4 (#3491)
## Description

- webflow css preset

## 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` file
2024-06-05 17:14:23 +02:00
Bogdan Chadkin 5848b51834 fix: pass auth token to data loader (#3499)
Broken since refactoring to loading builder data client side.
2024-06-05 13:47:50 +03:00
Bogdan Chadkin c5a9a38838 build: publish 0.167.0 (#3498) 0.167.0 2024-06-05 11:34:59 +03:00
Ivan Starkov ef81ccfafd fix: Resolve issue with script tag compilation in self-hosted Project Settings (#3483)
## Description

Corresponding SAAS PR
https://github.com/webstudio-is/webstudio-saas/pull/298
(Must be renamed to "release.staging" on release to allow testing)

closes #3378 

## Steps for reproduction

See fixtures now have working scripts.
Publish see saas supports script and language
https://rewrites.staging.webstudio.is/builder/f30da574-8022-433e-9a15-050792747b6f
.

## 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` file
2024-06-05 09:53:43 +03:00
Bogdan Chadkin 9bd556e7d8 build: automatically create release (#3492)
Here added workflow to automatically create release when tag is pushed
to the repo.

All unconfigured types will go into "Other changes" section

Example of changelogs
https://github.com/TrySound/test-auto-release/releases
2024-06-04 23:00:23 +03:00
Bogdan Chadkin 0afff55afb fix: render canvas only when data is loaded (#3496)
This fixes glitches from time to time when
canvas stay blank without loaded data.
2024-06-04 22:52:41 +03:00
Bogdan Chadkin 193d446aeb fix: show error on canvas when collection data is invalid (#3486)
Fixes https://github.com/webstudio-is/webstudio/issues/3481
https://github.com/webstudio-is/webstudio/issues/3473

<img width="964" alt="Screenshot 2024-06-04 at 12 54 22"
src="https://github.com/webstudio-is/webstudio/assets/5635476/569fbbb1-df82-40dd-a897-0bda2d28a2de">
2024-06-04 20:32:05 +03:00
Bogdan Chadkin 9870399f7b fix: close variable after creating (#3493)
Fixes https://github.com/webstudio-is/webstudio/issues/3480

Here always close popover when variable is created to avoid duplicating
with a few "Enter" presses on "name" field.
2024-06-04 19:42:12 +03:00
Bogdan Chadkin 8a522f1705 fix: allow deleting unknown instance without meta (#3488)
Fixes https://github.com/webstudio-is/webstudio/issues/3468
2024-06-04 17:54:15 +03:00
Jaya Krishna Namburu 667ec92d75 refactor: code editor improvements and editor for background-image (#3445) 2024-06-04 18:17:40 +05:30
Bogdan Chadkin df192e1c44 build: bump tsx and relax esbuild (#3489)
Upgraded both tsx and esbuild to the latest version and removed override
for esbuild. As a result we have 5 duplicates of esbuild but they will
go away with time.
2024-06-04 15:00:08 +03:00
Bogdan Chadkin 2d74578b69 feat: highlight Custom Code as html (#3487)
We missed to specify html language here.
Users in discord noticed this.


<img width="691" alt="Screenshot 2024-06-04 at 13 20 04"
src="https://github.com/webstudio-is/webstudio/assets/5635476/69d388a4-b23e-499a-af8e-43d59a63156a">
2024-06-04 14:13:27 +03:00
Oleg Isonen 04b878bf41 experimental: Paste from webflow 3 (#3482)
## Description

Combo classes, Custom attributes, Grid, Columns, Image

## 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` file
2024-06-04 01:39:29 +02:00