Commit Graph
2902 Commits
Author SHA1 Message Date
Oleg Isonen 02fedeb388 Merge pull request #629 from webstudio-is/preset-style
Rename defaultStyle  to presetStyle
2022-12-15 11:57:24 +00:00
Oleg Isonen 142fbda626 defaultStyle presetStyle 2022-12-14 23:51:01 +00:00
Bogdan Chadkin 984e8902ac Fix property reset glitches (#620)
Ref https://github.com/webstudio-is/webstudio-designer/issues/600
https://github.com/webstudio-is/webstudio-designer/issues/608

- wrapped getComputedStyle with requestAnimationFrame to recompute some
styles correctly
- added default to color picker to avoid hiding while styles are
recomputed
- added placeholder to select and font-weight to avoid hiding while
styles are recomputed
- removed undefined check from font-family, already falls back to empty
field

These issues comes from the fact we compute default styles from dom
instead of data.
2022-12-14 21:03:59 +03:00
Bogdan Chadkin c70d9ff21a Auto select span after toggling (#622)
Ref https://github.com/webstudio-is/webstudio-designer/issues/588
2022-12-13 23:58:04 +03:00
Oleg Isonen 030c40abe2 Merge pull request #618 from webstudio-is/refresh-assets-after-deletion
Refresh assets after deletion
2022-12-12 21:20:10 +00:00
Oleg Isonen 55f996878a reuse aftersubmit handler 2022-12-12 21:19:53 +00:00
Oleg Isonen 9dfcdad0db refresh assets after deletion 2022-12-12 21:13:37 +00:00
Ivan Starkov af90b31945 Bump versions (#616)
## Before requesting a review

- [ ] if the PR is WIP - use draft mode
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
- [ ] what kind of review is needed?
  - [ ] conceptual
  - [ ] detailed
  - [ ] with testing

## Test cases

- [ ] step by step interaction description and what is expected to
happen

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-12 23:56:10 +03:00
Ivan Starkov be0454fcbc Cache css (#612)
From MDN:
A modern best practice for static resources is to include version/hashes
in their URLs, while never modifying the resources — but instead, when
necessary, updating the resources with newer versions that have new
version-numbers/hashes, so that their URLs are different. That's called
the cache-busting pattern.
2022-12-12 23:54:07 +03:00
Bogdan Chadkin 7ccf6644b3 Show only important values in "display" select (#609)
Ref https://github.com/webstudio-is/webstudio-designer/issues/261
https://github.com/webstudio-is/webstudio-designer/issues/603

- filtered to show only important values
- always show display as select instead of combobox for non-flex values

<img width="260" alt="image"
src="https://user-images.githubusercontent.com/5635476/207092221-6fb40908-4696-471a-aedf-7e94808d5668.png">
2022-12-12 23:17:32 +03:00
Ivan Starkov 23a19b682e Enter has no effect if menu is open and no value selected (#607)
Fixes Enter non-working part of #603, but not fixes Check mark showing
logic.
The wrong value is used to compare the selected field,
https://github.com/webstudio-is/webstudio-designer/blob/26d0d0c2a6b3fe21c2298e451ffea5adc350290e/packages/design-system/src/components/combobox.tsx#L203
as its compares with current item but not with already selected
2022-12-12 18:25:37 +03:00
Mateusz Burzyński 35af8358e9 Move @webstudio-is/design-tokens to @webstudio-is/react-sdk prod deps (#602)
This should fix the problem reported on this line:
https://github.com/webstudio-is/webstudio-saas/actions/runs/3657427162/jobs/6181006430#step:6:52
, cc @andrasbacsai

Even though [you only reach for a
type](https://github.com/webstudio-is/webstudio-designer/blob/1a66acb79c8c560b3a54b55512c2779991a68eff/packages/react-sdk/src/tree/root.ts#L11),
you still should declare this package among your dependencies -
otherwise, it won't be installed by your consumers and thus the TS
compilation will fail for them.
2022-12-12 15:44:32 +01:00
Bogdan Chadkin aba5506e13 Add proprety reset button in popover (#583)
Ref https://github.com/webstudio-is/webstudio-designer/issues/29

<img width="281" alt="Screenshot 2022-12-10 at 12 03 54"
src="https://user-images.githubusercontent.com/5635476/206842519-5812b7d5-2c60-4941-93a7-8a980f6abae0.png">
2022-12-12 15:11:24 +03:00
Oleg Isonen 1a66acb79c fix the type 2022-12-12 11:39:54 +00:00
Oleg Isonen ef43c49bd4 Merge pull request #601 from webstudio-is/bump-versions
Bump versions
2022-12-12 11:32:10 +00:00
Ivan Starkov 12a3da3140 Bump versions 2022-12-12 14:17:23 +03:00
Oleg Isonen 594e61a91a Merge pull request #599 from webstudio-is/initial-props
Add initial props
2022-12-12 10:59:22 +00:00
Ivan Starkov 54f16748d2 Fix switch 2022-12-12 13:51:29 +03:00
Ivan Starkov 84c0e4b145 Remove delete button for required prop 2022-12-12 13:34:20 +03:00
Ivan Starkov d19c5e7aa0 Change title 2022-12-12 12:05:26 +03:00
Ivan Starkov a50199a19d Add tests 2022-12-12 12:03:29 +03:00
Ivan Starkov f4d55b8cb0 Fix overwrite issue 2022-12-12 11:40:04 +03:00
Ivan Starkov a1138b5948 Do not allow enter existing prop from input 2022-12-12 11:13:27 +03:00
Ivan Starkov 035b0c8b42 Do not allow to change/delete "required", select existing 2022-12-12 10:59:39 +03:00
Ivan Starkov 1ac167d959 Add initial props 2022-12-12 00:14:43 +03:00
Ivan Starkov 5d9f8c68b1 Fix alpha didn't changed (#597)
Absence of exact types, stupid bugs.


## Before requesting a review

- [ ] if the PR is WIP - use draft mode
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
- [ ] what kind of review is needed?
  - [ ] conceptual
  - [ ] detailed
  - [ ] with testing

## Test cases

- [ ] step by step interaction description and what is expected to
happen

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-11 20:32:46 +03:00
Oleg Isonen 7232fe2f9b Merge pull request #596 from webstudio-is/592-font-family-button-changes-size
Don't let an input/button grow beyond the layout constraint
2022-12-11 17:09:58 +00:00
Oleg Isonen f23c4fa73a Merge pull request #595 from webstudio-is/593-custom-fonts-not-rendering-on-canvas
Asset status can be undefined if image was not just recently uploaded
2022-12-11 16:28:39 +00:00
Oleg Isonen da692ba926 Merge branch 'main' into 593-custom-fonts-not-rendering-on-canvas 2022-12-11 14:46:05 +00:00
Oleg Isonen 83033f25b3 Merge branch 'main' into 592-font-family-button-changes-size 2022-12-11 14:45:39 +00:00
Oleg Isonen 1a7a7381b4 minWidth also fixes the problem with disrespecting layout contraint 2022-12-11 14:45:07 +00:00
Bogdan Chadkin 0620b5bd08 Setup custom hotkeys for sidebar tree (#594)
Ref https://github.com/webstudio-is/webstudio-designer/issues/579

useHotkeys blocks escape for whole app which breaks radix select as
well. Here I replaced it with onKeyDown on tree root which localized all
interactions.

Ideally remove useHokeys with all its implicit logic everywhere else.
2022-12-11 17:39:53 +03:00
Oleg Isonen 24ea4f8dae with more text button was becoming larger even though the layout has a constraint 2022-12-11 14:10:54 +00:00
Oleg Isonen 1f3692b43c asset status can be undefined if image was not just recently uploaded 2022-12-11 13:59:27 +00:00
Oleg Isonen b353cf1e91 Merge pull request #586 from webstudio-is/asterix-for-FEATURES-env
Support asterix for FEATURES env
2022-12-10 12:58:09 +01:00
Oleg Isonen b09f6ab555 add FEATURES flag to .env example 2022-12-10 11:35:49 +00:00
Oleg Isonen ecd3bf0adc Merge branch 'main' into asterix-for-FEATURES-env 2022-12-10 12:33:43 +01:00
Oleg Isonen a93bb5dd34 support asterix for FEATURES env 2022-12-10 11:32:40 +00:00
Bogdan Chadkin 7637d486a7 Redesign text toolbar (#567)
Ref https://github.com/webstudio-is/webstudio-designer/issues/555
https://github.com/webstudio-is/webstudio-designer/issues/107

Implemented icon button according new design,
added hover and disabled states for non-default variant.

Migrated text toolbar from toggle group to icon button.
Toggle between superscript and subscript.

<img width="285" alt="image"
src="https://user-images.githubusercontent.com/5635476/206522786-28cc6b7d-6336-4c13-8eb7-b83428598dcb.png">

<img width="315" alt="image"
src="https://user-images.githubusercontent.com/5635476/206523165-1b4a080d-0c8d-41a1-b5a9-47c197b78998.png">

<img width="197" alt="image"
src="https://user-images.githubusercontent.com/5635476/206521819-14c1fbb3-6c37-4264-8f7b-cef256b4ab23.png">
2022-12-09 21:50:21 +03:00
Ivan Starkov 6cc2847cf6 Bump versions (#582)
For easier version change next time, now all has same version.
2022-12-09 21:52:10 +04:00
Ivan Starkov 2be8511780 Add new RGB Style, then fix typescript errors (#578)
The reason of use opaque types, as otherwise props like `value` reused
everywhere.



Implemented same as CssValueInputLogic - during input editing nothing
changed.
Error is shown on Enter click. Value resetted on blur.
2022-12-09 20:31:20 +03:00
Oleg Isonen dfba947c33 Merge pull request #565 from webstudio-is/536-when-only-one-image-is-too-large-let-others-upload
Upload each asset separately
2022-12-09 15:12:35 +01:00
Ivan Starkov 71ccafac35 Merge pull request #577 from webstudio-is/fix-blur
Fix menu not closed on blur
2022-12-09 17:09:33 +03:00
Oleg Isonen 3a00378d01 Merge branch 'main' into 536-when-only-one-image-is-too-large-let-others-upload 2022-12-09 14:58:04 +01:00
Oleg Isonen cd6afefa2f do runtime check instead of assertion 2022-12-09 13:57:51 +00:00
Mateusz Burzyński 3794f9a497 Add a composed Storybook (#529)
This PR builds on top of the work done in
https://github.com/webstudio-is/webstudio-designer/pull/519 and
introduces a root-level storybook that just aggregates all of the
per-package storybooks into one.

This allows you to have a single, convenient, URL to visit and browse
all of those existing storybooks at once. To access this storybook you
need to click on the `Details` link attached to the "Storybook Publish:
!webstudio-is/webstudio-designer" status check.

The current URL from this branch is available
[here](https://638affb61acca1e593c6e558-dksaophpxa.chromatic.com/) so
you can take a look at how this looks in practice.
2022-12-09 14:46:23 +01:00
istarkov 5946b0ef0c Fix comments 2022-12-09 13:31:32 +00:00
Oleg Isonen 60a42421d7 fix linter 2022-12-09 13:20:11 +00:00
Oleg Isonen 8dd32073aa Merge pull request #576 from webstudio-is/fix-media-query-specificity
Fix media query specificity
2022-12-09 12:31:59 +01:00
Oleg Isonen 4ed0a41a17 Merge branch 'main' into 536-when-only-one-image-is-too-large-let-others-upload 2022-12-09 11:28:27 +00:00