5013 Commits
Author SHA1 Message Date
Ivan Starkov 374bde0c3b fix: Static assets redirect to dashboard (#3612)
## Description

1. 404 error instead of redirect on assets.
2. Vercel sets Cache-Control: public, max-age=31536000, immutable for
all /assets/* paths,
even when a 404 error occurs during deployment.
This causes 404 errors on assets to be cached permanently, preventing
updates.
To prevent this, we set "Cache-Control": "public, max-age=0,
must-revalidate" when an asset is not found.


## 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
0.169.0
2024-06-24 20:56:32 +03:00
Bogdan Chadkin e747398fdb experimental: expand container shorthands (#3600)
Ref https://github.com/webstudio-is/webstudio/issues/2647

- container
- contain-intrinsic-size
2024-06-24 14:37:52 +03:00
Bogdan Chadkin bc5a355b37 refactor: drop legacy style rule (#3606)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Switched to nesting rule and style map generator
everywhere in builder.

Now will be much easier to implement properties prefixing and merging
utilities.
2024-06-24 14:29:50 +03:00
Bogdan Chadkin f11dbf34ed experimental: correctly match unordered shorthands values (#3611)
Fixes https://github.com/webstudio-is/webstudio/issues/3608
2024-06-24 10:27:36 +03:00
Jaya Krishna Namburu ce2dad417d refactor: use longhand properties to save transition values in style-panel (#3584)
## Description

fixes #3567 

Use long-hand properties to save `transition` values in the style-panel.

## Steps for reproduction
- Add some layers in transition panel in UI.
- Delete some layers
- Swap some layers

## TODO

- [ ] Allow `show/hide` for each layer.
- [ ] Add tests for all the layer handlers for transition.

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

@TrySound i made some refactor to use individual properties as
long-hands instead of short-hand property. I am still yet to add tests
for the new handlers, since they need to be handled in a different way
now for transitions. But you can still play around with the current
setup.

## 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
2024-06-23 13:23:56 +02:00
Bogdan Chadkin 9a39c24502 refactor: switch ai to nesting rules (#3605)
Moved ai css generation to nesting rules
and removed a bunch of utilities.

Tested locally
2024-06-23 01:13:24 +03:00
Oleg Isonen 25d72a11ff experimental: Paste from webflow 9 (#3602)
## Description

- updated mdn build
- fixed font-width
- render unset instead of var()
- skip properties with empty values
- temp rendering input instead of select
- remove the flag
- unprefix -webkit-appearance

## 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-22 23:23:29 +02:00
Bogdan Chadkin 14791a476b refactor: switch preset styles to nesting rules (#3604)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Moved preset styles to new nesting rules in css engine. Will simplify
future prefixer solution.
2024-06-22 22:30:19 +03:00
Bogdan Chadkin b3efb88915 fix: expand font shorthand properly (#3603)
Replaced font-width with font-stretch in expanded font shorthand.
2024-06-22 16:18:45 +03:00
Ivan Starkov 6a2a512e8d feat: Add ‘optimize’ property to Image component (#3599)
## Description

<img width="360" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/f225882f-7954-4382-a6ac-51d42f24d1c4">


## 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-21 23:57:00 +03:00
Ivan Starkov a4d3f33bad fix: Dialog within collection issues (#3597)
## Description


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

## Steps for reproduction


https://dialog-col.staging.webstudio.is/builder/be551fca-b3bc-4750-961a-c0bdc0557506?authToken=3d9f5902-0ecc-4645-ba12-9f7af2f81e09&mode=edit

https://dialog-saas-a7f4v.wstd.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` file
2024-06-21 20:54:04 +03:00
Oleg Isonen f8635a6691 experimental: Paste from webflow 8 (#3572)
## Description

- adds breakpoints when they are missing
- adds some form components
- rewrites tests to jsx

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

## 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-21 18:10:28 +02:00
Bogdan Chadkin 8ca12a7742 experimental: support grid and grid-template shorthands (#3598)
Ref https://github.com/webstudio-is/webstudio/issues/2647
2024-06-21 18:41:38 +03:00
Bogdan Chadkin f9d94f8d45 experimental: expand scroll and offset shorthands (#3596)
Ref https://github.com/webstudio-is/webstudio/issues/2647

- offset
- scroll-timeline
- scroll-padding
- scroll-padding-inline
- scroll-padding-block
- scroll-margin
- scroll-margin-inline
- scroll-margin-block
2024-06-20 14:08:12 +03:00
Ivan Starkov 58119c75ba fix: Domain name and the link is not updated after renaming in publish dialog (#3594)
## Description

Closes #3591

## 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-20 13:30:34 +03:00
Ivan Starkov 0981581b86 fix: After cloning a shared template, buttons are still disabled (#3595)
## Description

Closes #3562

## 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-20 13:30:03 +03:00
Bogdan Chadkin 9e23dc9580 feat: switch to overflow longhands (#3588)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Here refactored overflow UI to update "overflow-x" and "overflow-y"
longhands instead of "overflow" shorthand.

Removed "overflow" from advanced panel suggestions.

Added support for expanding overflow shorthand for webflow copy paste.

And implemented very basic migrations utility
which always run after data is loaded from server
and sends patch for expanding overflow longhands.
Patch is not sent when no properties are modified. Though eventually we
will need to support versioning to avoid executing old migrations.

<img width="279" alt="Screenshot 2024-06-18 at 19 33 21"
src="https://github.com/webstudio-is/webstudio/assets/5635476/ce44385e-3316-4e34-bc9c-5f790cbdcd4f">
2024-06-20 11:51:00 +03:00
Ivan Starkov 5e27dec1f4 fix: Reload scripts in HTML Embed on dynamic pages (#3587)
## Description

Reload scripts in HTML Embed on dynamic pages
Closes #3581


## Steps for reproduction

Open
https://scripts-reload-saas-2-pgmkm.wstd.work/test/1

dynamic link clicks should cause `console.log` from IFrame

Anchor link should not.


## 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-20 10:49:59 +03:00
Ivan Starkov 5edbeda077 fix: Skip inaccessible iframes added by extensions to prevent cross-origin errors (#3586)
## Description

Already released as hotfix


https://cdn.discordapp.com/attachments/1252596836729094184/1252596837056118834/image.png?ex=6672cb36&is=667179b6&hm=fc5718dfac9bd0e5a430b22a09cf0889831a767f5c60e2ca1731e6f3fd43a779&

## Steps for reproduction
Install Zotero extension

Then open 

https://main.development.webstudio.is/builder/a1371dce-752c-4ccf-8ea4-88bab577fe50
See error
`Failed to read a named property '__webstudio__$__canvasApi' from
'Window': Blocked a frame with origin
"https://main.development.webstudio.is" from accessing a cross-origin
frame.`

Now open

https://fix-zotero.development.webstudio.is/builder/a1371dce-752c-4ccf-8ea4-88bab577fe50
See no Error

## 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-18 19:38:36 +03:00
Ivan Starkov 2dc2a21f4c feat: Support image transform for 3rd party images (#3585)
## Description

Now 3rd party images should be transformed by us

Corresponding SaaS PR
https://github.com/webstudio-is/webstudio-saas/pull/301

## Steps for reproduction

Instead of uploading asset set src to any 3rd party image url 
like `https://picsum.photos/id/237/200/300`

See it works.
Publish see it works.

Or open 


https://src-remote.staging.webstudio.is/builder/a1371dce-752c-4ccf-8ea4-88bab577fe50
See it works

https://new-images-saas-8njoh.wstd.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` file
2024-06-18 19:38:23 +03:00
Ivan Starkov b7a663c975 experimental: Add Webflow image paste support (#3583)
## Description

Add Webflow image paste support

## Steps for reproduction

Copy node with images from webflow
Paste

## 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-18 18:32:20 +03:00
Bogdan Chadkin 126fe3d66a experimental: expand font variant and synthesis shorthands (#3580)
Ref https://github.com/webstudio-is/webstudio/issues/2647
2024-06-18 17:51:26 +03:00
Bogdan Chadkin d060fd552a refactor: insert fragments with multiple roots (#3582)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Here fixed the issue with detecting root as first instance in the
fragment. The idea of this utility is to not rely on any root but
instead insert with new ids all instances outside of portals/components.
Roots semantics is left for outer utilities.
2024-06-18 02:19:02 +03:00
Bogdan Chadkin 4a452c9ec5 experimental: expand grid-area shorthands (#3579)
Ref https://github.com/webstudio-is/webstudio/issues/2647

- grid-area
- grid-row
- grid-column
2024-06-17 14:39:36 +03:00
Bogdan Chadkin dfc216723a refactor: upgrade mdn-data (#3578)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Here upgraded to the latest mdn data and improved properties detection.
Excluded experimental and undocumented css properties.

- font-synthesis got longhands in mdn data
- background-position-x/y got excluded as experimental (though support
is good) but we anyway write as shorthand
- excluded white-space-collapse, text-wrap and text-wrap-* until decide
how to maintain them in the future
- field-sizing and zoom are new additions
2024-06-17 14:35:38 +03:00
Jaya Krishna Namburu cc0ccf6c51 fix: validate using long-hand property for transition while saving (#3566)
## Description

fixes #3069 
The properties `transition-delay` and `transition-duration` are being
saved directly considering they are being valued using the
`CSSValueItemProperty`. But not all values in long hand are valid in
`short-hand` property. So, we need to validate the property value before
saving them

## Steps for reproduction

- Add a transition layer.
- Now change the values in the transition-delay and transition-duration
and try to save them.


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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
2024-06-17 11:07:12 +02:00
Bogdan Chadkin 3ded54d59b experimental: support mask and mask-border shorthands (#3577)
Ref https://github.com/webstudio-is/webstudio/issues/2647
2024-06-16 21:44:43 +03:00
Ivan Starkov 8665ba202c feat: Upload images on copy-paste (#3569)
## Description

Markdown paste with images

Take MD from 

https://github.com/webstudio-is/webstudio/pull/3569#issuecomment-2171213517

Paste, see images are uploaded

## 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-16 20:40:09 +03:00
Bogdan Chadkin c9e130cc3e experimental: support transition shorthand (#3575)
Ref https://github.com/webstudio-is/webstudio/issues/3567
2024-06-16 15:38:01 +03:00
Oleg Isonen 9d725605c2 fix: Unsubscribe loading states after its ready (#3563)
## Description

Some of the states we are using for progress UI can be changed like
selected instance, and we need to stop listening to those events.

## Steps for reproduction

1. unselect an instance by pressing esc or clicking outside of canvas
2. see that loading indicator didn't appear again

## 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-16 13:18:55 +02:00
Bogdan Chadkin d251e998c8 refactor: use jsx in component generator tests (#3571)
Here enahnced our jsx with props support and rewrote component generator
tests with it as an example.

Props are solved in straightforward way, type of value described prop
type. Though in case of expression, parameter, asset, page, action used
classes as opaque types.
2024-06-16 12:58:10 +03:00
Bogdan Chadkin cf5c6b9f29 refactor: use jsx to represent instances in tests (#3568)
Added "@webstudio-is/sdk/testing" entry point with jsx utilities to
simplify instances representation.

React is used as runtime, then renderJsx traverse resulting tree and
converts into our data.
2024-06-15 00:06:20 +03:00
Bogdan Chadkin 3cc8e536e9 experimental: support animation shorthand (#3565)
Ref https://github.com/webstudio-is/webstudio/issues/2647
2024-06-14 21:21:29 +03:00
Oleg Isonen 3827146b4f experimental: Paste from webflow 7 (#3549)
Ref https://github.com/webstudio-is/webstudio/issues/2647

## Description

- show a toast when skipping unsupported elements
- handle shorthands
- RichText test and link inside rich text fixes

## 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-14 13:52:59 +02:00
Ivan Starkov 7b545e080d chore: Add buider API (#3564)
## Description

Add ability to make direct calls to builder API, like toast.

## Steps for reproduction

usage.

```
import { builderApi } from 'blaba';
builderApi.toast('ANYTHING')
```

## 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-14 14:27:52 +03:00
Bogdan Chadkin 132e94d290 experimental: support columns and list-style shorthands (#3557)
Ref https://github.com/webstudio-is/webstudio/issues/2647

Added support for the following shorthands
- columns
- column-rule
- list-style
2024-06-14 12:03:07 +03:00
Ivan Starkov 863bb2a1bc feat: Adds the ability to place images on the canvas immediately during upload (#3546)
## Description

- Adds the ability to place images on the canvas immediately during
upload, using the file blob or a provided URL.
- Enables images to use width and height from asset metadata.
- Detects duplicate assets and displays a warning message.

<img width="323" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/fe810dd8-3e3d-4cab-8669-b0d739044f49">


These changes allow images to appear on the canvas upon pasting, even if
the asset is not fully uploaded yet.


## Steps for reproduction

Start uploading few files on a slow connection, select them before
upload, see image on canvas 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

- [ ] 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-14 11:01:07 +03:00
Bogdan Chadkin 93aeceac59 build: bump storybook (#3559)
Upgrade storybook and vite, esbuild and tsx with it.
2024-06-14 01:18:30 +03:00
Bogdan Chadkin be592846d1 fix: treat collection box as container (#3558)
Fixes https://github.com/webstudio-is/webstudio/issues/3473

Somehow lost this fix from other PR
2024-06-13 22:06:01 +03:00
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