Commit Graph
155 Commits
Author SHA1 Message Date
Ivan Starkov 8be665e68d experimental: SSG download support (#3783)
## Description

See corresponding [SaaS
PR](https://github.com/webstudio-is/webstudio-saas/pull/311) too

## Steps for reproduction

Click Publish/Export

<img width="363" alt="image"
src="https://github.com/user-attachments/assets/fbc1f4e5-3a2c-4bb9-9242-025196f991bc">


Deploy zip to netlify
<img width="1710" alt="image"
src="https://github.com/user-attachments/assets/daca4ead-6272-4729-8e82-0986301e5c8b">


## 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-07-30 08:57:33 +03:00
Bogdan Chadkin 6c4b5f5e0e refactor: move project cloning into sql function (#3790)
Our project cloning does a lot of roundtrips to database and got
fragmented across 3 packages. The logic is too complicated to represent
with postgrest.

Here written single sql function which is invoked safely with postgrest
rpc.
2024-07-26 12:33:06 +02:00
Bogdan Chadkin 7073cd9a16 build: release changelog (#3679) 2024-07-05 22:46:06 +03:00
Bogdan Chadkin a58f2eff04 build: run all tests and typechecks in CI (#3661)
Here improved our checks. No longet rely on "checks" script but run
"test" and "typescript" scripts from each package in monorepo.

Would also make each package less boilerplaty.
2024-07-02 18:21:05 +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 d014c5209b fix: publish without local development hacks (#3528) 2024-06-10 13:43:49 +03:00
Bogdan Chadkin fde5e8a6f1 build: run webstudio cli without rebuilding (#3513)
Finally figured out how to leverage node conditions to run webstudio cli
in fixtures without rebuilding it on every change.

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

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

```
NODE_OPTIONS='--conditions=webstudio --import=tsx' webstudio
```
2024-06-07 13:51:34 +03:00
Bogdan Chadkin 9bd556e7d8 build: automatically create release (#3492)
Here added workflow to automatically create release when tag is pushed
to the repo.

All unconfigured types will go into "Other changes" section

Example of changelogs
https://github.com/TrySound/test-auto-release/releases
2024-06-04 23:00:23 +03:00
Ivan Starkov 2e235bf215 fix: Permission error when opening marketplace projects (marketplace projects need to add any view permission link) (#3460)
## Description

- [x] - Todo cursor and other styles issues

ref #3446

We now display the marketplace project link only if it has a shared link
with view permission. If there is no shared link, we show disabled
buttons with a tooltip.

<img width="564" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/f1d98c9b-22a5-4706-b9f5-e2749c07f6e7">

<img width="732" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/02848dc7-ef99-4a4a-91a6-9e6d2d41ed7f">


## Steps for reproduction

Open marketplace, see one has link the other is not

<img width="300" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/90b2f352-305b-415a-86c5-056280e17000">

Check that link is working in incognito


## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-06-01 09:34:24 +03:00
Bogdan Chadkin ea30e840a1 refactor: merge all storybooks into one (#3441)
Monorepo setup for storybook is very complicated, it has two major
problems

- it is very annoying to look for any link in commit status
- hard to upgrade comparing with single project setup

Here merged all storybooks into one in the root.
2024-05-29 17:05:17 +03:00
Bogdan Chadkin bd9cde8d52 build: upgrade storybook 8 (#3085) 2024-05-22 10:45:43 +03:00
Ivan Starkov f2ce532dcb build: Migrate (#3266)
# Migrate

This workflow is triggered only on pushes to the `main`, `*.staging` or
`migrate` branches.
For `*.staging` and `migrate` it specifically checks if the commit
message starts with `::migrate::`,
indicating a migration-related change.

### Example usage:

Execute a commit with a migration flag using:
```
git commit --allow-empty -m "::migrate::test description"
```

### Note:
This setup is a temporary measure. The intention is to transition to a
fully automated publish and release process via GitHub Actions in the
future.

## PS

Show amount of pending migrations so you know do you need to apply it on
staging

<img width="419" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/0dfaeae5-bb65-4a65-bb6a-29be20d92a7a">
2024-05-01 16:20:11 +03:00
Ivan Starkov cf99753b1d build: Update action versions (#3241)
## Description

preview-worker-deployment
Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: actions/checkout@v3, pnpm/action-setup@v2.2.4,
actions/setup-node@v3. For more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-04-25 11:00:11 +03:00
Bogdan Chadkin 8cb6a2a666 build: upgrade to node v20 (#3217)
Node 20 brings a few cool features
- stable test runner
- recursive readdir
- global crypto.randomUUID()
2024-04-21 13:40:44 +07:00
Ivan Starkov b0a28b8c40 build: Switch on aws s3 copy, fix typo (#3210)
## Description

Fix
clouldfare -> cloudlfare

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-04-20 15:38:53 +03:00
Ivan Starkov b965f33eb5 build: Create r2 artefact instead of Docker (#3205)
## Description

### Time of building the same project 
new:
<img width="318" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/f3695b88-c52c-4bad-93e4-7af665e0d01c">

was:
<img width="327" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/69f96159-1905-4392-b8f6-e6bcb7677313">


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-04-19 20:51:21 +03:00
Bogdan Chadkin 708cb61842 build: upgrade to pnpm v9 (#3198)
Ref https://github.com/pnpm/pnpm/releases/tag/v9.0.0

This release trims like 100MB from our node_modules

```diff
du -ckd1 node_modules
- 771_432
+ 872_444
```
2024-04-18 13:05:27 +07:00
Ivan Starkov 5396f429c9 build: Mini.staging (#3179)
## Description

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

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-04-16 17:34:10 +03:00
Ivan Starkov 7fdfb50fb0 build: CLI container to use in webstudio builder publish process (#3163)
## Description

Deployed tags:

<img width="1376" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/7e7dd235-7e98-4ab7-9a28-e9d027fd0dbf">


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-04-14 18:55:22 +03:00
Bogdan Chadkin 7abeb7b809 build: drop turbo (#3164)
There is no use for us from turbo. Pnpm does the same as runner. Caching
we still were not able to setup. Builds are superfast anyway. Checks are
actually faster since github tuned their actions.
2024-04-14 15:29:19 +07:00
Ivan Starkov 02cdb886a7 build: Test staging (Playground) (#3136)
## Description

- [x] - Add inspect-url, domain
- [x] - Add prs deploy and rename to development
- [x] - Fix router to use newer links (immediately before merge)
- [x] - Add link status
- [x] - Test runtime envs then delete tmp

Next PR:
- [ ] - Bundle cli
- [ ] - Use publish from bundled CLI

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-04-12 11:03:45 +03:00
Bogdan Chadkin 4007fc329d refactor: switch to remix vite (#3120)
Ref https://remix.run/docs/en/main/future/vite#setup-vite
2024-04-09 17:45:00 +07:00
Dima Ivashchuk d5b5fc067a fix: add finalise job to lost pixel (#3066)
## Description

This PR fixes monorepo mode in lost-pixel
2024-03-27 18:06:20 +01:00
Bogdan Chadkin 420fb82601 build: upgrade to lost-pixel 3.15.1 (#2984)
Here bumped lost-pixel to see if it solves bugs.
2024-03-12 20:44:46 +07:00
Bogdan Chadkin 02ea008042 build: drop macos cli test (#2851)
Macos tests are very flacky and often fail after 20min timeout. In most
cases linux tests are enough.
2024-01-31 21:30:12 +07:00
Ivan Starkov 6dfdd0d607 fix: "Add status to commit" fails on forked repos (#2689)
## Description

closes #2688

## 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-12-14 16:02:12 +02:00
Ivan Starkov 1376a0cd8f fix: Fix that status error prevented PR merge (#2687)
## Description

github protection rules are based on job names

## 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-12-14 15:06:58 +02:00
Ivan Starkov 5688c8011e fix: Wrong branch name used on main push (#2591)
## Description

`refs/heads/` must be omited

## 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-11-09 23:05:09 +02:00
Ivan Starkov 9c90a357cd feat: Report deployment url at *.prs.webstudio.is (#2590)
## Description

To have ability to test some cloudflare worker issues we are now have
*.prs.webstudio.is domains.
Builder app now can be accessed through such urls.

Here we add prs.webstudio app url at the end of status list

<img width="973" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/5e716b07-bee5-41bd-9db6-deae01df89cd">

Known issues:
will not work if branch names exceed 24 chars,

Gonna not fix for now.


## 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-11-09 20:02:03 +02:00
Oleg Isonen 8e9620721d feat: Rename webstudio-cli to webstudio as we got the shorter namespace (#2443)
## Description

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

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-10-10 12:25:00 +04:00
Ivan Starkov 42da19937b fix: Сli tests, run cli link command sequentially (#2407)
## Description

Run link sequentially, this fixes cli link test

## 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-10-03 11:26:29 +04:00
Jaya Krishna Namburu ac793ca457 chore: Add checks for template names for build command in cli (#2358)
## Description

Small changes that adds checks for templates and hints for templates in
the `--help` command.

## Steps for reproduction

```sh
webstudio-cli --help
```

## Code Review

- [ ] hi @TrySound , I need you to do
  - detailed review (read every line)
2023-09-26 06:52:41 +02:00
Jaya Krishna Namburu fa73721355 feat: Allow export to netlify using functions and edge-functions as templates from cli (#2346)
## Description

This PR adds support for templates. 
- Extracted out the defaults like `.vercelignore` and `image-loader`.
As, if the users re using some other service providers they come as
default and won't help.
- Add prompt for selecting a template at the start of the init process.
- Added template for `netlify-functions` and `netlify-edge-functions`. 

## Code Review

- [ ] hi @istarkov , I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview
  
- [ ] 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
2023-09-23 12:30:21 +02:00
Ivan Starkov 3fa4afa269 ci: Semantic pull request titles (#2339)
## Description


![image](https://github.com/webstudio-is/webstudio/assets/5077042/153ccdcf-d459-49f0-b880-4f85ea23b030)

## Steps for reproduction

Change title of this PR to be non semantic see comment.

## 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-19 18:25:06 +03:00
Ivan Starkov e558a3b481 [Test] Add CI CLI Tests for Windows, Linux, and macOS (#2332)
## Description

The idea is to execute link, sync, build in the existing fixture on
linux, mac, windows and then check with
`git diff` about any changes. If changes exists then something has
broken.

## 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 17:46:01 +03:00
Ivan Starkov 015bc46732 Add beta publish (#2311)
## Description

Publish npm to `xxx` tag every time you add Label `publish:xxx` to your
PR
To republish remove label and add again.


<img width="387" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/45defb60-b710-4966-a171-7f5389cdea50">

If we would need to republish on every commit since published we would
need to use `contains(github.event.pull_request.labels.*.name,
'publish:')` check


## 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-13 16:36:51 +03:00
Ivan Starkov 0ef48794a7 Fix chromatic root token (#2246)
## Description

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

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-04 15:52:50 +03:00
Ivan Starkov 400161e735 Remove chromatic secrets (make public) (#2244)
## Description

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

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

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

## Before requesting a review

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

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-09-04 15:29:39 +03:00
Bogdan Chadkin ac735df3ce Render component templates in stories (#2009)
Here added utility to render component templates in stories as it will
work in published site without running builder.

It will help to be more confident in templates we write for components.
Especially with complex logic with variables and expressions.

Can be tested here
https://638affb61acca1e593c6e558-gxuvohlrer.chromatic.com/?path=/story/sdk-components-react-radix_components-collapsible--collapsible
2023-07-31 15:46:56 +04:00
Bogdan Chadkin 4f6ca6fc32 Speed up visual regressions build (#1988)
Since storybook is able to build from packages sources we no longer need
to run build script before storybook.

It can reduce build time for 30-60s
2023-07-27 00:04:40 +03:00
Bogdan Chadkin e98fe09eda Optimize typechecking (#1971)
Before we run two configurations of typescript on CI. Though this leads
to very long checks. Here I enabled "typecheck" script to generate dummy
.d.ts files to enable additional checks.

```diff
pnpm run -r typecheck (serial)
- 239.13s
+ 262.94s
pnpm turbo run size-test build checks dts --force (parallel locally)
- 2m30.609s
+ 1m47.622s
- pnpm turbo run size-test build checks dts --force (Ci)
- 6m 5s
+ pnpm turbo run size-test build checks --force (Ci)
+ 3m 22s
```
2023-07-24 11:38:19 +03:00
Bogdan Chadkin 2a0900b4c4 Remove size-test from publish 2023-07-03 23:26:55 +03:00
Bogdan Chadkin e66e118ad5 Migrate to storybook 7 (#1862)
See https://storybook.js.org/docs/react/migration-guide and
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#from-version-65x-to-700

- all configs are now ts/esm
- had to add hack (process.env.NODE_ENV) to workaround storybook bug
- webpack is gone
- renamed storybook:run to storybook:dev
- amount of packages reduced from 2456 to 2060
2023-06-27 10:02:58 +03:00
Bogdan Chadkin c5f84b7822 Run eslint from the root with cache (#1854)
While turborepo does not work for us we can try to solve long checks
time with builtin caching. Eslint provides similar one to prettier we
already use.

```
pnpm -r lint
51.53s

pnpm eslint . --ext .ts,.tsx --max-warnings 0
18.10s

pnpm eslint . --ext .ts,.tsx --max-warnings 0 --cache (with cache)
1.82s
```

In this PR I removed all lint scripts in packages and added global one
in the to github workflow. It saves like 30s on my laptop because pnpm.
Already stored cache makes linting almost instant.

Also bumped all eslint dependencies.
2023-06-26 10:08:15 +03:00
Bogdan Chadkin b7081f3741 Add sdk-components-react package (#1693)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1129

Splitted base components into separate package. Exposed 3 entry points

- @webstudio-is/sdk-components-react
- @webstudio-is/sdk-components-react/metas
- @webstudio-is/sdk-components-react/props
2023-06-03 09:58:04 +03:00
Oleg Isonenandnettohadi ef49e85362 Set loading state when opening project from dashboard (#1627)
Closes https://github.com/webstudio-is/webstudio-builder/issues/1334

## Description

When project item is clicked, we are fetching the project data via
router, if its slow - we show loading indication

## Steps for reproduction

1. open dashboard
2. set network throttling in dev tools to super slow
3. open a project

## 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: nettohadi <32300655+nettohadi@users.noreply.github.com>
2023-05-14 14:23:51 +02:00
Ivan Starkov b1326b5306 Test push (#1622)
## Description

- actions/cache@v3 for pnpm moved to setup-node
- Added on `pull_request`
- restricted push on main.
- Added build cancelation.
- Same behaviour on checkout is preserved as was on push see
```
      - uses: actions/checkout@v3
        with:
          ref: ${{ github.event.pull_request.head.sha || github.sha }} # HEAD commit instead of merge commit
```


## 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-05-12 23:34:48 +04:00
Bogdan Chadkin bb9db13c9f Run dts as additional checks in actions (#1523)
This fixes the bug introduced in my previous PRs and reproducable only
by running dts generation. Here added it to checks so we could avoid
broken publishes while releasing.
2023-04-27 17:37:59 +07:00
Mateusz Burzyński 54d11932be Run prepublish jobs with turbo (#1391) 2023-04-07 09:44:29 +02:00
Mateusz Burzyński 678c9a273f Generate declaration files before publishing packages (#1351) 2023-04-07 07:14:18 +02:00