Commit Graph
3073 Commits
Author SHA1 Message Date
Ivan Starkov d73ec1b459 Do not show flex properties in style panel when layout is not flex (#722)
## Description

1. What is this PR about (link the issue and add a short description)

Do not show flex properties in the style panel when a layout is not flex
closes #687

<img width="272" alt="image"
src="https://user-images.githubusercontent.com/5077042/210067036-4571be1d-4745-48a3-be7f-45f91791a6a9.png">

Here I patched `appliesTo` of properties `alignItems`, `justifyItems`
see https://github.com/mdn/data/issues/585

## Steps for reproduction

Opens designer panel, check no flex props in display: block layout

## 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-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
2023-01-02 14:15:33 +03:00
Bogdan Chadkin eacbd7d702 Show in popover where remote style comes from (#715)
Ref https://github.com/webstudio-is/webstudio-designer/issues/29

Here added info in popover where cascaded and inherited styles come
from.

<img width="304" alt="Screenshot 2022-12-28 at 14 47 01"
src="https://user-images.githubusercontent.com/5635476/209816321-edeebc17-c905-497e-8501-f5eb02103c60.png">
<img width="243" alt="Screenshot 2022-12-28 at 14 47 07"
src="https://user-images.githubusercontent.com/5635476/209816325-abdc766d-f8cb-415d-b784-ed70940aa150.png">
<img width="281" alt="Screenshot 2022-12-28 at 14 47 19"
src="https://user-images.githubusercontent.com/5635476/209816327-cc5bc70b-3c76-4273-867b-b13c32c1522a.png">
<img width="268" alt="Screenshot 2022-12-28 at 14 47 47"
src="https://user-images.githubusercontent.com/5635476/209816329-dd2d674f-39bd-4565-ab43-249c853909b3.png">
2022-12-31 11:33:10 +03:00
Ivan Starkov a9eb17fb5d Fix select options case (#721)
## Description

closes #465

Select option names are now "Pascal Cased"
`+` now `Select` sets `StyleValue` instead of deprecated `string` in
`setParams`

## Steps for reproduction

see  #465

## Code Review

- [x] 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
- [ ] 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-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-30 20:02:38 +03:00
Roman Pominov 0d4a3ef0ed Support option/shift in spacing's scrub (#717)
## Description

Adds option / shift support to scrub in spacing. Closes #668

## Steps for reproduction

- Try to scrub in spacing while holding SHIFT or OPTION (ALT in Windows)
- Try to press and release SHIFT / OPTION multiple times during scrub
- Try to press SHIFT / OPTION while hovering over a property (other
properties will highlight even without scrub)
2022-12-30 13:30:49 +03:00
Musi 4817778649 Fix selected breakpoint to delete (#718)
Issue:
Breakpoints panel suggests delete currently selected instead of specific
breakpoint #691

## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click edit breakpoint in top bar
2. delete other breakpoint than the currently selected
3. expect to show the message to delete the breakpoint and not the
currently selected in the confirm message

## 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
- [x] tested on preview link
2022-12-30 09:37:53 +01:00
Ivan Starkov 787978e4b5 Restrict assets uploading by MAX_ASSETS_PER_PROJECT env variable (#714)
Set at VERCEL env 
<img width="930" alt="image"
src="https://user-images.githubusercontent.com/5077042/209917100-86d1f7e9-a5ca-4aaa-a877-456850fa5153.png">


## Description

Restrict assets by MAX_ASSETS_PER_PROJECT env variable.

## Steps for reproduction

- [x] - set MAX_ASSETS_PER_PROJECT = 4 as env variable for Vercel

Try upload more than 4 files.
Get Error: "`Max ${count} assets per project reached`"

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - test it on preview
- [ ] hi @TrySound plz check code

## Before requesting a review

- [x] 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-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [x] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-30 11:37:42 +03:00
Ivan Starkov f9996fe195 Fix css input (scrub, etc) Beautify options and input for css-value-input (#716)
## Description

ref #465 for css-value-input

Add beauty names to keywords, a little bit better search for keywords.

+ Fixes non-working scrub.
+ Fixes jumping cursor.


## Steps for reproduction

1.
Write `min-content` inside `width` field - All options you see must have
`Pascal Case`
Select value through menu - inputValue must be also in `Pascal Case`

2.
Edit width input, write `Min Content`, and click Enter - must be saved
with `Min Content` value.
(internally must be keyword with value=`min-content`) 

3.
Edit width input, write `min-content`, and click Enter - must be saved
with `Min Content` value.
(internally must be keyword with value=`min-content`) 

4. 
Write `min content`, click tab - must be saved with `Min Content` value.
(internally must be keyword with value=`min-content`)

5. Edit input in any place of cursor it must not jump to the end.


## Code Review

- [ ] hi @kof, I need you to do
  - 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)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [x] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-29 10:15:35 +03:00
Bogdan Chadkin 42c1ef8285 Show remote style source in UI (#713)
Added remote (ex inherited) highlight for controls.
Migrated menu control to new icon button.

<img width="228" alt="Screenshot 2022-12-28 at 11 17 00"
src="https://user-images.githubusercontent.com/5635476/209782189-9aa4b8e6-f7a6-4f90-9579-56a0c1d86bf7.png">
<img width="232" alt="Screenshot 2022-12-28 at 11 17 36"
src="https://user-images.githubusercontent.com/5635476/209782191-6a84c61f-c0c5-4892-ae3b-0f8480f2d49d.png">
<img width="232" alt="Screenshot 2022-12-28 at 11 18 36"
src="https://user-images.githubusercontent.com/5635476/209782192-e9ce0fcc-6d70-40c8-a2a7-91d7dea2f0a1.png">
<img width="219" alt="Screenshot 2022-12-28 at 11 24 46"
src="https://user-images.githubusercontent.com/5635476/209782195-dc794dcb-2ac6-4703-8ecf-2fca511f4306.png">
2022-12-28 15:58:27 +03:00
Bogdan Chadkin 6f1df5378d Fallback to cascaded and inherited when value not set (#712)
Ref https://github.com/webstudio-is/webstudio-designer/issues/29
https://github.com/webstudio-is/webstudio-designer/issues/649

Now instead of showing computed styles which come from parent instances
or other breakpoints we can show actual value we set there.
2022-12-28 09:23:58 +03:00
Oleg Isonen 2f0ac59895 Style Source Input (#692)
#422 

## Description

This PR adds the StyleSourceInput component. It's not complete yet and
when we are finished we might move a lot of this logic to combobox, not
sure yet, because it depends on how much custom stuff we are going to
need in this input. MUI implements it using combobox and `multiple`
property but we may need some stuff that won't fit.

- [x] Add new items
- [x] Delete items with backspace
- [x] Truncate too long items
- [x] Autocomplete

Follow up PR will include

- [ ] Use color coding for background color
- [ ] Create a token from style panel
- [ ] Select an existing token from style panel
- [ ] Delete Token from style panel with backspace
- [ ] Sort tokens
- [ ] Enable/disable a source
- [ ] Rename using menu
- [ ] Delete using menu
- [ ] Disable deleting local source
- [ ] Sort the sources using d&d

## Steps for reproduction

1. Go to
https://www.chromatic.com/component?appId=6382151c8b47d4399fb9fc69&csfId=designer-features-style-panel-style-source-input--initial&buildNumber=532&k=63ab0f47f9dfa67d6ee09558-1200-interactive-true&h=17&b=-4

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

- [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)
- [x] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [x] added tests
- [x] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-27 22:04:20 +01:00
Bogdan Chadkin 9020f389f5 Use style info to display "local" values in style panel (#709)
This is a simplification. Since we already pass style info everywhere it
can be used to color labels, buttons and icons in blue instead of
recomputing local state with hook.
2022-12-27 20:35:05 +03:00
Bogdan Chadkin fc25ad1179 Add style info with source data (#704)
This is a step toward
https://github.com/webstudio-is/webstudio-designer/issues/29

When merge browser style and local styles we can specify the source of
the style. Later we can add additional info about inherited and cascaded
styles.
2022-12-27 15:50:16 +03:00
Ivan Starkov ef5aec742d Add Background image to Designer app (without image-set) (#707)
## Description

ref  #534

PR atop of #701

Next PR: image-set support

Ability to select background image from asset

<img width="496" alt="image"
src="https://user-images.githubusercontent.com/5077042/209625480-f0b4b5a0-8ca7-438d-bbd8-3b4874f9428d.png">


## Steps for reproduction

Create a div, and select an asset for the background image.


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

- [x] made a self-review
- [ ] 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)
- [ ] 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-27 13:57:42 +03:00
Bogdan Chadkin 9fcaac94b3 Drop section style (#703)
It's just an additional and confusing "style" term. Also spread is often
not safe to use so better explicitly pass all needed props.
2022-12-26 21:50:59 +03:00
Bogdan Chadkin 983fb650de Access style config by property (#702)
Since style config is hardcoded in module scope we can access it by
property instead of passing style config everywhere.
2022-12-26 20:24:45 +03:00
Bogdan Chadkin 7daff34c21 Pass property to control (#700)
We might not need to pass style config everywhere and instead we can
pass only property.

In another PR will remove passing style configs everywhere.
2022-12-26 19:49:15 +03:00
Bogdan Chadkin b6a1688d44 Drop getFinalValue (#699)
This utility was added to hover control edge cases which are handled by
controls or was a hack to convert old data in db.
2022-12-26 16:48:07 +03:00
Bogdan Chadkin a82eee9c4b Switch from LoaderFunction to LoaderArgs (#697)
Ref https://github.com/remix-run/remix/releases/tag/remix%401.6.5

Now loader and action data can be inferred
2022-12-26 16:29:11 +03:00
Bogdan Chadkin ee53b09c32 Drop inherited style from style panel (#698)
The logic does not work correctly and not really used because we never
set values to "inherit".

Later new logic will be added to show the source of values.
2022-12-26 16:08:37 +03:00
Bogdan Chadkin 7734458552 Bump to remix 1.6.8 (#695)
- https://github.com/remix-run/remix/releases/tag/remix%401.6.8
- https://github.com/remix-run/remix/releases/tag/remix%401.6.7
- https://github.com/remix-run/remix/releases/tag/remix%401.6.6
- https://github.com/remix-run/remix/releases/tag/remix%401.6.5

Gonna upgrade step by step so we could narrow troubling versions.
Here narrowed to single version of remix in designer and packages.

```diff
du -ckd1 node_modules
-813512
+795580
```
2022-12-25 16:28:51 +03:00
Ivan Starkov 04a1566606 Fix onComplete event lost if was tab during opened menu and nothing selected (#690)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

Click into css-input, delete everything -  menu occured
Click tab - must show red rectangle instead of just tabbing into new
control

## 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-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-24 18:40:52 +03:00
Bogdan Chadkin 57bc857fe3 Fix hover outline (#689)
Found an issue when hover a few elements fast and then move cursor out
of iframe hover gets stuck on some element. This is because we use
combination of mouseover and mouseout events.

So when we move out of one instance to another it looks like this

over
out
over
out

Which may lead to race conditions. So here out is canceled by every
hover and delayed a little to always emit last.
2022-12-24 11:41:55 +03:00
Bogdan Chadkin c696078796 Hide outline when window is resizing (#688)
Ref https://github.com/webstudio-is/webstudio-designer/issues/446
https://github.com/webstudio-is/webstudio-designer/issues/638

Here I solved 2 issues.

Outline is hidden while canvas is resizing.
And after resizing outline rect is recomputed.
2022-12-24 11:39:16 +03:00
Bogdan Chadkin e7af8d0a6e Fix flex grid control states (#682)
Ref https://github.com/webstudio-is/webstudio-designer/issues/590

Solution is simple. To represent flexbox we just use flexbox.
It does not strictly follow design but follow actual flexbox behaviour.
2022-12-23 21:47:08 +03:00
Ivan Starkov 461cd91901 Add delay to spacing tooltip (#686)
## Description

Add delay to spacing control tooltip.

## Steps for reproduction

1. Hover spacing controls, see tooltip delayed

## Code Review

- [ ] hi @kof, I need you to do
  - test it on preview
- [ ] hi @rpominov just your code changed a little, FYI

## 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-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-23 19:59:43 +03:00
Ivan Starkov afe90ba789 Fix ESC to work at unit menu (#680)
closes #656

Following test case at #673 didn't work:

Click unit px
Hover over items
Press ESC - instead of closing menu it resets input and only 2nd ESC
closes the menu.

*The issue is Tooltip + UnitSelect.*

UnitSelect set 'focus" on Item on hover.
So hovering over the menu causes a lot of blur/focus events dispatched
to the ancestors.
Tooltip at the top closes/opens very fast (not visible but internally it
is).
That cause
https://github.com/radix-ui/primitives/blob/e861c16f20fe8e2e440983355edf2ec78cc2a51c/packages/react/dismissable-layer/src/DismissableLayer.tsx#L105
to think that Tooltip popover is now at the top layer. And prevent
`onEscapeKeyDown` to be executed.

Current hack somehow improves the situation. But seems like better would
be to disable the tooltip in case of focus/blur of the whole control.
Not sure it's needed at all as we have the label.

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

- [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)
- [ ] 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-23 19:10:30 +03:00
Oleg Isonen 27dc15e63e Remove unused components, deprecate components consistently (#683)
## Description

1. Remove unused components, some of which will be reintroduced once we
start using them with designed styles, right now its confusing because
they were copied from modulz example repo and never adjusted with our
design system
2. Deprecated consistently

## Code Review

- [ ] hi @istarkov  , I need you to do
  - conceptual review (architecture, feature-correctness)

## 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)
- [x] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [x] added tests
- [x] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-23 15:27:51 +01:00
Bogdan Chadkin 7e19e4f7dc Hide outline when preview styles (#663)
## Description

Ref https://github.com/webstudio-is/webstudio-designer/issues/625

Frequently changed style values with for example scrub makes outline
look laggy because of latency between iframe and designer (where outline
is rendered).

Here I subscribed to previewStyle and send undefined to hide rect. We do
the same when scroll canvas and cannot update outline fast.
2022-12-23 13:49:25 +03:00
Oleg Isonen 8e727a9e47 Don't populate an instance on paste, because its already populated (#681)
Fixes https://github.com/webstudio-is/webstudio-designer/issues/631

## Description

Can't change width of a copied box 

## Steps for reproduction

1. Add a Box
2. Select the Box and copy it (cmd+c)
3. Select Body
4. Paste (cmd+v)
5. Select the copy you've just pasted
6. Try to change its width
7. Observe that even though the number in input changes the actual width
of the Box on canvas stays the same


https://user-images.githubusercontent.com/825702/207803118-5b6fedd8-ded4-4a03-97b9-d4d6cff6710a.mov


## Code Review

- [ ] hi @TrySound , I need you to do
  - detailed review (read every line)

## 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)
- [x] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [x] added tests
- [x] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2022-12-23 10:10:01 +01:00
Oleg Isonen 65f916ddd1 apply the first available weight when current weight isn't supported by the custom font 2022-12-22 14:59:23 +00:00
Bogdan Chadkin 845d53981c Improve packages publish (#676)
- all workspace dependencies are use with `workspace:^` protocol which
on publish is replaced with `^VERSION`. This will let us to upgrade
transitive packages in saas without shaman dancing around package.json
and lockfile.
- publish-to-npm script is replaced with `pnpm -r publish` which
recursively publishes all packages if version does not exist in npm
- dropped yarn lockfile
2022-12-22 17:06:27 +03:00
Ivan Starkov d69b2622d7 CSSValueInput ESC support, do not save if nothing has changed (#673)
ref #656
closes #644


## 1 Case is not fixed in this PR

Click unit px
Hover over items
Press ESC - instead of closing menu it resets input and only 2nd ESC
closes the menu.

Will do in next PR




## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

### Save behavior

**Case 1.**
Click into "resetted" input field 
Click outside - no Blue background at the input label should appear.

**Case 2.**
Start typing something in "resetted" input field.
Click ESC,
Click outside - no Blue background at the input label should appear.

**Case 3.**
Open menu in "resetted" input field. 
Hover over menu items.
Click outside - no Blue background at the input label should appear.

**Case 4.**
Start typing "au" in "resetted" input field. 
Hover over menu items.
Click ESC - menu closes.
Click ESC - value resetted.
Click outside - no Blue background at the input label should appear.

** Case 5.**
Click into the "resetted" field with `unit` value.
Delete all with delete button.
Click ESC - menu closes.
Click "ESC" - should reset to prev value
Click ouside - no Blue background at the input label should appear.

** Case 6 **
Click into the "resetted" field
Click ENTER - Blue background should appear

** Case 7 **
Click into the "resetted" field
Edit value so after Edit it will the same
Click outside - Blue background should appear



### ESC

**Case 1**
find a numeric CSS value input
change the value with some number
press ESC
number resets to the initial value

**Case 2**
find a keyword CSS value input
start typing
autocomplete list is shown
press ESC
list is closed
press ESC
value resets to initial value

**Case 3**
find a numeric CSS value input
type some number
click on unit button - list shows
press ESC - list closes
press ESC - value resets to initial value

**Case 4**
Write `autoblabla` in input
press ESC - value resets to initial value

**Case 5**
Click on menu open button
Click ESC - menu should be closed


## 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-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-22 15:12:12 +03:00
Oleg Isonen 3b30097491 Merge pull request #671 from webstudio-is/662-styles-panel-layout-is-broken
Make left sidebar grow full height
2022-12-22 09:57:02 +00:00
Bogdan Chadkin b3c87af7c1 Migrate to pnpm for package management (#641)
- setup corepack for pnpm and forbid yarn usage with "engines" field
- converted yarn lockfile into pnpm lockfile with `pnpm import` command
- replaced yarn with pnpm in scripts and github actions, had to use
custom cache to support corepack

This PR is only migration. Will use new pnpm features in other PRs.

```diff
du -ckd1 node_modules (yarn)
- 1125032

du -ckd1 node_modules/.pnpm
+ 857456
```

Install time (including cache downloads) in github actions reduced from
42s to 23s


## 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?
  - [x] conceptual
  - [X] 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-22 12:16:13 +03:00
Oleg Isonen d961c4fa9d add grow and shrink props to Flex and set minWidth and minHeight by default to 0 2022-12-21 15:07:08 +00:00
Oleg Isonen 50626102d1 make left sidebar grow full height 2022-12-21 14:15:48 +00:00
Roman Pominov dd33181546 Spacing UI (#550)
Implementation of new spacing UI. Closes #421
2022-12-21 14:58:13 +03:00
Roman Pominov 5576e19161 Add reason argument to onChangeComplete (#669)
## Description

Extracted this from #550 as @istarkov needs this too:
https://github.com/webstudio-is/webstudio-designer/pull/550#discussion_r1053432597

## Code Review

- [ ] hi @istarkov, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)

## 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-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-21 14:47:03 +03:00
Oleg Isonen a4c0e5c070 Merge pull request #660 from webstudio-is/658-stop-overwriting-browser-cmd++-keyboard-shortcut
Use +- keys for zoom without cmd
2022-12-20 11:10:15 +00:00
Oleg Isonen 0e214f208e fix inspector layout when style panel sections are collapsed
it was using flex-direction raw by default which led to that space, no idea though why it worked when opened
2022-12-20 10:12:12 +00:00
Oleg Isonen a9e4c0e41f use +- keys for zoom without cmd
This enables to keep browser zoom behavior for accessilbility
2022-12-19 20:41:12 +00:00
Oleg Isonen a7127d85f2 Merge pull request #659 from webstudio-is/494-primitive-tokens
Position floating panel without hacks
2022-12-19 20:05:31 +00:00
Bogdan Chadkin 41c533271a Convert text children to nodes in tree (#654)
Ref https://github.com/webstudio-is/webstudio-designer/issues/651

We want to normalize our tree structure and need to distinct text
children with ids. Now instead of string its respresented as
```
{
  type: 'text',
  value: string
}
```

This also gives us a little type safety because typeof child ===
'string' ignores when child cannot be string.
2022-12-19 22:44:13 +03:00
Oleg Isonen 466f05f6bf consistent naming 2022-12-19 19:30:40 +00:00
Oleg Isonen 6364506509 access dom from effect 2022-12-19 19:20:16 +00:00
Oleg Isonen a21b8c5619 position floating panel without hacks 2022-12-19 18:39:19 +00:00
Ivan Starkov d09ca57373 Check mark in Combo Boxes can be lost or be incorrect in case of input changes (#652)
closes #610

## Before requesting a review

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

## Test cases

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

## Before merging

- [x] 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-19 18:17:36 +03:00
Ivan Starkov 86506a7fd3 Use resizer when we are rendering the thumbnails in image manager (#642)
closes #546
fixes image flicker on upload
fixes that uploading animation stopped and not properly centered

## Before requesting a review

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

## Test cases

- [x] Check that images in Image manager are resized
- [x] Check that not flick of image on upload happens


## Before merging

- [x] 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-19 13:19:29 +03:00
Bogdan Chadkin bb0e315338 Update hovered rect when scroll ends (#650)
Ref https://github.com/webstudio-is/webstudio-designer/issues/630

Simplified hovered logic to single effect, removed unnecessary
nano-state container and fixed hovered outline rect when scroll ends.
2022-12-18 16:44:24 +03:00
Mateusz Burzyński 86292353bc Unify Storybook config (#585)
This PR moves most of the Storybook configs into a single, private,
package that can be imported/required by your packages. It aims to keep
the config the same for all of them as much as possible - so, for
example, all of the packages are now using Webpack 5 in their
Storybooks.
2022-12-17 21:50:59 +01:00