546 Commits
Author SHA1 Message Date
Oleg Isonen 20572ead86 Preview on canvas when style panel select value is highlighted (#2328)
https://github.com/webstudio-is/webstudio/issues/2324



https://github.com/webstudio-is/webstudio/assets/52824/7489689f-92bb-4cd5-888b-748bcae2369c



## Description

With this PR all select controls get a preivew when user hovers with the
mouse or uses arrow keys.
We use select control in:
- position
- blend mode
- font-weight
- background size
- many others

In many cases preview won't be visible because cursor doesn't change
unless you actually have mouse over that element

## Steps for reproduction

1. hover over position value
2. when mouse out preview should be gone
3. arrow keys do the same
4. if value wasn't applied and select box closed - preview should reset

## Code Review

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

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-18 21:36:36 +02:00
Ivan Starkov 262328694d Fix Dashboard Failure Due to Tooltip (#2331)
## Description

Now works

<img width="524" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/7e5acfb3-3f3d-497f-86ee-b86a5aa47af0">

## 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
2023-09-18 14:55:49 +03:00
Bogdan Chadkin 75f72eeccf Drop legacy data sources from builder (#2319)
Here removed all left usages of previous data sources implementation and
removed no longer used expression utilities.
2023-09-16 14:17:10 +04:00
Bogdan Chadkin 8f00d5af2e Generate human readable data sources and actions (#2312)
Scope utility give us a way to generate more readable data sources and
actions. Here variables, expressions and actions are output into the
same map.

In the future same utility can be used to produce framework specific
stores like React.useState.

See fixtures for example.
2023-09-14 20:13:36 +04:00
Oleg Isonen c5493c557d Add a link to CLI docs in the export dialog (#2305)
## Description

Added a link to the CLI docs
<img width="361" alt="Screenshot 2023-09-12 at 16 49 15"
src="https://github.com/webstudio-is/webstudio/assets/52824/1d12e25f-a523-46e4-9887-54c274216ec5">
2023-09-12 17:24:13 +02:00
Bogdan Chadkin 3bc2adf616 Limit images formats to upload (#2302)
Cloudflare supports only jpeg, png, gif, webp and svg as input. We
should forbid any other format.
2023-09-12 14:35:34 +04:00
Ivan Starkov 53c97d8d18 Vercel image optimisation support (#2297)
## Description

CLI support of vercel image optimisation


## 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
2023-09-11 21:03:02 +03:00
Bogdan Chadkin 88dd24ff7d Move pubsub from sdk to builder (#2280)
Pubsub is only used for builder/canvas communication while sdk is
responsible for rendering sites.
Here moved pubsub to builder. Now we can drop nanoevents from cli
dependencies.
2023-09-08 20:56:46 +04:00
Oleg Isonen f6460ae0bf Rename CLI to webstudio-cli (#2282)
As per discussion renaming it to be usable consistently with less typing
using npx webstudio-cli as well as pnpm webstudio-cli
2023-09-08 12:24:06 +02:00
Oleg Isonen 35e58f39d6 Fix bugs link (#2278)
## Description

After renaming the link was pointing to the wrong repo
2023-09-08 12:14:21 +02:00
Ivan Starkov 47a3f3aaab Add export dialog to publish (#2269)
## Description

<img width="374" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/a76bdeeb-a1c4-4449-a9d4-673896e3309c">

<img width="368" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/ccd71fd1-8d1c-4fc1-b2a2-7534f3f1096e">


## 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
2023-09-07 21:52:13 +03:00
Bogdan Chadkin 87e69b2e85 Move style schema into css-engine (#2251)
Css-data now responsible for generated data and parsers which requires
heavy dependencies like csstree and openai.

Here moved style schema into css-engine which makes is responsible for
own input representation. So now schema and serialization are co-located
in single package.

Cli install size

```diff
du -ck node_modules
- 42680
+ 35516
```
2023-09-06 15:55:41 +04:00
Ivan Starkov 5c3af9daec Update permission level tooltips to reflect recent changes (#2243)
## Description

ref #2226

<img width="379" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/ee316434-07f7-470c-9bee-1db68f1a9afa">

Everything except Button aligned to the design, we don't have Button
with Menu Item style

## 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
2023-09-05 17:48:45 +03:00
Ivan Starkov 905b8287f3 Use pending state on button in Share panel (#2248)
## Description

closes #2225

## Steps for reproduction

Add/delete/update/load links see button has pending state

## 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
2023-09-05 17:39:23 +03:00
Yordis PrietoandOleg Isonen ac72e48f93 Adjust share panel alignment to match design (#2234)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

close #2224

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-09-04 20:12:30 +02:00
Bogdan Chadkin 05298f404a Prevent submit inside dialog in builder (#2238)
Ref https://github.com/webstudio-is/webstudio/issues/2233

Capture mode fixes unexpected submit of form when placed inside radix
dialog. Though didn't find a trace why this happen. There is
`form.method = 'dialog'` which has special behavior inside `<dialog>`
but it is not our case.
2023-09-04 15:51:49 +04:00
Ivan Starkov f3f7f88df3 Add admin (publish) permissions to tokens (#2221)
## Description

Add admin permissions to shared links

<img width="328" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/972a46b9-154b-4426-9d8c-ab62ebf9a9e3">

<img width="283" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/d187da84-4d49-4308-b6ea-f09cb7a09e8c">


Share links for now disabled for admin role. Will do in the next
iteration after releasing above.


## Steps for reproduction

Create admin token link.
Open in incognito, see Publish is working.

## 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
2023-09-04 12:10:29 +03:00
Bogdan Chadkin ee0e0f7e7a Drop prisma from cli (#2241)
Here moved types and utilities from project-build to sdk package. This
removed huge prisma from cli.

```
du -ck node_modules
137460
72464
```
2023-09-04 12:43:56 +04:00
Bogdan Chadkin 2ed1646dae Enforce local style source at the end (#2229)
Ref https://github.com/webstudio-is/webstudio/issues/1965

Tweaked logic and dnd to always put local style source in the end and
tokens before it.
2023-09-04 01:49:13 +04:00
Bogdan Chadkin 5794e8d1e7 Move app schema to sdk (#2237)
We are planning to decouple cli from prisma and all unrelated packages.
Here moved whole app schema into sdk package.
2023-09-03 22:27:30 +04:00
Ikko Eltociear Ashimine c4d7252f0a Fix comment in instance-selected.ts (#2235)
calulated -> calculated
2023-09-02 21:31:04 +04:00
Mayke 2a7a7bc3e5 Ensure no conflicts on undo and redo hotkeys (#2230)
Ref https://github.com/webstudio-is/webstudio/issues/2028

Changed `useHotkeys.enableOnFormTags` to be enabled just when in canvas
for undo/redo.
2023-09-02 16:20:59 +04:00
Bogdan Chadkin afc75f1d99 Drop unused db validation (#2231)
We had db data validation enabled before but it made api requests very
slow. We disabled this validation and seems like there is no need to
enable again.

Also dropped all zod list types of our data because validation was the
only use case.
2023-09-01 23:57:59 +04:00
Bogdan Chadkin f5882256b8 Move assets schema into sdk package (#2220)
We are planning to move all types necessary to represent generated site
into separate package. This way we will be able to make CLI as small as
possible.

Here moved only assets schema. Now we get rid of aws, sharp and one
prisma usage (project-build still use it)

```diff
- 99MB
+ 75MB
```
2023-08-31 19:39:20 +04:00
Bogdan Chadkin b6c4911e41 Remove generate-arg-types from direct dependencies (#2218)
Here moved PropMeta to react-sdk package. It was the only reason to
install generate-arg-types cli as direct dependency in all component
libraries.

This is the resulting install size of webstudio CLI. TypeScript and
react-docgen-typescript no longer installed.

```diff
- 141MB
+ 99MB
```
2023-08-31 15:59:45 +04:00
Bogdan Chadkin 2b0e9ae206 Remove assets stubbing (#2219)
We used to set undefined in assets map value to preserve the order
between uploading and uploaded states. Now we started sorting uploaded
assets by create time and stubbing no longer do anything useful.
2023-08-31 13:37:52 +04:00
Oleg Isonen e757566e84 Use PlusIcon for new page (#2216)
Closes https://github.com/webstudio-is/webstudio/issues/1991
## Description

Updated new page icon to using Plus icon

## Steps for reproduction

1. open pages panel
2. see new icon

## Code Review

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

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-08-30 23:48:53 +02:00
Oleg Isonen 37bd008428 Update main webstudio repo links (#2210)
We renamed webstudio-builder to webstudio
2023-08-29 14:10:43 +04:00
Bogdan Chadkin c5c4aa2593 Fix style source menu trigger (#2205)
Closes https://github.com/webstudio-is/webstudio-builder/issues/2204
2023-08-28 22:19:24 +04:00
Oleg Isonen a1e6df3423 Fix footer chevron color (#2203)
## Description

1. Chevron icon changed, color not set

## Steps for reproduction

1. open footer
2. see color of cheveron is white

## 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-builder/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
2023-08-28 18:11:00 +02:00
Bogdan Chadkin 86ff9d406d Improve radix components (#2201)
Here addressed of some recent feedback

- removed cursor: pointer from all buttons
- added active states to accordion and tabs triggers
- replaced X with svg icon in dialog and sheet close button
- updated item icon for all components
- removed dir and orientation props from accordion initials
2023-08-28 20:04:26 +04:00
2680ae0a13 Add tooltips for component properties in Settings tab (#2125)
## Description

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

**Important** The PR adds tooltips only for HTML attributes.

Fixes https://github.com/webstudio-is/webstudio-builder/issues/2027

## Steps for reproduction

1. Add a few components to the canvas
3. Select one
4. Go to the Settings tab in the right sidebar
5. Hover over the labels

HTML attributes should show a tooltip with a description

## Code Review

- [ ] @taylornowotny please review the descriptions in the
props-descriptions.ts file
   - test it on preview
- [ ] @istarkov check the first commit that is where the implementation
and integration are done. The idea behind this is that we have a central
file with HTML attributes descriptions and when generating components
props we pick the descriptions from there if the property doesn't have a
custom description. Essentially we use props-descriptions as a fallback.
Do we need tests for this feature?
  

## Before requesting a review

- [ ] made a self-review

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests

---------

Co-authored-by: Giuseppe Gurgone <ggurgone@users.noreply.github.com>
Co-authored-by: istarkov <istarkov@gmail.com>
2023-08-27 20:46:36 +03:00
Bogdan Chadkin cc0336e50d Drag on canvas closest detachable (#2197)
Before when start dragging we searched for closest rich editor under
cursor and did nothing when the instance is not detachable (for example
select value or switch indicator).

Here I changed the behavior to also look for closest detachable instance
and drag whole thing. This way we do not need toast like in navigator
and can canvas dnd just work.

Also fixed placeholder in "Select Value" component. Before was no way to
change it.
2023-08-27 21:28:33 +04:00
Bogdan Chadkin abc7acbc55 Reimplement instance selection with pointer events (#2199)
Here improved instance selection by using pointerdown and pointerup.
This solves issues with libraries like radix preventing firing mouse
events.

Though there is a problem. Pointer events do not support event.detail to
inform about double clicks. So here I implemented multiple clicks
detection. For this I track time between latest pointerup and next
pointerdown events.
2023-08-27 21:00:25 +04:00
Bogdan Chadkin c48f6613a8 Fix focus navigation in preview (#2179)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2151
https://github.com/webstudio-is/webstudio-builder/pull/2112

Here splitted webstudio component wrapper for preview and canvas. This
allows us to have more granular control over preview behavior. For
example canvas requres all elements to be focusable for instance
selection to work. Prevew should be close to published sites and reflect
user experience.
2023-08-25 17:47:40 +04:00
Ivan Starkov ab436a6fc4 Fix new href property duplicated on unmount (#2170)
## Description

On onmount outdated onSave were used. What cause creation of additional
href property on instance.

- [x] - Fix duplication on unmount (1st commit)
- [x] - Fix save, to validate if multiple properties with same name
exists. (2nd commit)
- [x] - Use latest prop in resolveUrlProp (3rd commit)

Use hide whitespaces.

<img width="303" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/156fc5a4-c697-4b05-8caf-7a3b7fa29264">


## 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-builder/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
2023-08-25 10:36:14 +03:00
Ivan Starkov 52b01efa3b Fix parent style calculation for unstylable parent components (#2167)
## Description

If the parent component has `meta.stylable = false`, we need to skip it
to get the correct style of the parent.


## Steps for reproduction

Create the Box and add the Sheet to it. 
When you go to the sheet/trigger/button, you will notice that it does
not have a 'Flex Child' section or a 'zIndex' property.

To add these, add 'display: flex' to the box you created initially. When
you go back to the sheet/trigger/button, you will see that it now has a
'Flex Child' section and a 'zIndex' property.

## 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-builder/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
2023-08-25 00:10:41 +03:00
Oleg IsonenandwasimTQ 9336f05f25 Add help button with popover in dashboard and builder (#2166)
Originally started in
https://github.com/webstudio-is/webstudio-builder/pull/2132

Closes https://github.com/webstudio-is/webstudio-builder/issues/2039

## Description

Help dialog in builder and dashboard

## Steps for reproduction

1. open builder
2. open help dialog in the left sidebar
3. open dashboard
4. click help button

## 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-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory

---------

Co-authored-by: wasimTQ <wasimthoufiq21@gmail.com>
2023-08-24 22:44:38 +02:00
Bogdan Chadkin 75c5cdc179 Prevent editing of radix input and textarea in canvas mode (#2160)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2151

Here added new logic to intercept bubbled to html element events

- handle click on links in preview
- prevent forms submit
- prevent keydown on input and textarea in canvas

This allows to remove some props overrides from webstudio component and
fixes editing of radix input and textarea.
2023-08-25 00:25:16 +04:00
Bogdan Chadkin 1bb154eebd Fix instance labels in settings and style panel tooltips (#2164)
- fixed instance name placeholder in settings
(https://discord.com/channels/955905230107738152/1143832643373371432)
- fixed instance name in style tooltips

Can be tested on radix components
2023-08-23 19:15:10 +04:00
Oleg Isonen 2f0ea2602a Move position section in style panel right after size section (#2163)
## Description

it was originally moved below because it was "unstyled" and took too
much space


## Steps for reproduction

1. open style panel
2. see position after size section

## 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-builder/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
2023-08-23 14:49:56 +02:00
Bogdan Chadkin 23c1ff5e74 Schedule canvas rect updates and fix drag&drop (#2152)
Here changed canvas rect subscription to read always in effect to not
get stale state.
This fixes the issue with drag'n'drop when switch to another breakpoint.
2023-08-21 16:10:52 +04:00
Bogdan Chadkin 6b5cd33033 Subscribe selected instance for component hooks (#2150)
Here subscribed selected instance selector store instead of navigator
events. Now selection from canvas trigger hooks as well. Necessary to
support navigation menu component.
2023-08-20 21:56:26 +04:00
Bogdan Chadkin 5e900ff2e8 Add component tokens support (#2147)
Ref https://github.com/webstudio-is/webstudio-builder/issues/2137

Here added static tokens support to meta. Id of resulting style source
become persistent like this "componentName:tokenName". Such token styles
are inserted only if style source with same id not exist. This way we
prevent breaking styles already changed by user.

Style source input now autocomplete global tokens and suggest to create
predefined component tokens.

Also disabled spell check in style source input.

<img width="244" alt="Screenshot 2023-08-20 at 17 18 37"
src="https://github.com/webstudio-is/webstudio-builder/assets/5635476/9572f5b1-6243-49fa-83be-a0315f104987">
2023-08-20 18:48:16 +04:00
Bogdan Chadkin 036b156c6b Fix prop labels (#2144)
- https://github.com/webstudio-is/webstudio-builder/issues/2104
- https://github.com/webstudio-is/webstudio-builder/issues/2047
- https://github.com/webstudio-is/webstudio-builder/issues/2131
- https://github.com/webstudio-is/webstudio-builder/issues/2129

Improved switch control layout and made all inputs change to vertical
layout when label is more than 8 chars.
2023-08-20 12:57:00 +04:00
Ivan Starkov f659565d96 Add project templates (#2138)
## Description

closes #2134

<img width="1400" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/c868898a-e3ae-4b81-bbac-8a7c3b55e98d">

On card click

<img width="631" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/897c9863-1a66-4bf5-93d0-bcff147823e6">





Also fixed resize

<img width="953" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/f890668c-c022-47ec-9745-fc5dc9433264">

Made it

<img width="1204" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/5d2bc6cf-9495-4657-a1d1-e0f8c15516e5">



## 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-builder/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
2023-08-20 11:40:11 +03:00
Oleg Isonen 84fd2c1116 Add inline-flex display option (#2141)
## Description

This adds inline-flex display option as requested here
https://github.com/webstudio-is/webstudio/discussions/50

The use case is having a button with icon and text, without turning it
into block element with full width.

## Steps for reproduction

1. select any element and set display: flex


## 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-builder/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
2023-08-19 14:56:14 +02:00
Bogdan Chadkin e665a996ee Fix code text component (#2120)
Fixes
https://discord.com/channels/955905230107738152/1140570603372413039
https://discord.com/channels/955905230107738152/1140566358023745587

- dropped inline prop
- dropped meta prop
- replaced css custom property with local style
- added `white-space: pre-wrap` preset style to preserve indent
- fixed pasting of code in markdown
2023-08-14 22:05:14 +04:00
Bogdan Chadkin 3d04415630 Sort assets (#2121)
Ref https://github.com/webstudio-is/webstudio-builder/pull/2115

- sort uploading assets first
- sort newest uploaded first
2023-08-14 16:26:37 +04:00
Ivan Starkov ff8682d1d1 Fix hidden elements not selected sometimes (#2109)
## Description

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

## 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-builder/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
2023-08-13 16:31:33 +03:00