138 Commits
Author SHA1 Message Date
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
Bogdan Chadkin d0f5146cef Drop chromatic from dependencies (#1370)
We probably don't need to have chromatic in dependencies.
Especially since the latest version is getting 20MB bigger

https://packagephobia.com/result?p=chromatic

Also removed builds from chromatic workflows, "source" export condition
allows to avoid it.
2023-04-05 12:19:09 +07:00
Bogdan Chadkin b4d21aadff Run global prettier check (#1353)
Here add check to have formatting always applied in case git hook was
ignored or not run for some reason.

Cached prettier for whole project is run within 2-3 seconds.
2023-04-03 16:48:10 +07:00
Bogdan ChadkinandNathan Hammond 2a7340353c Upgrade turbo (#1319)
Rebased https://github.com/webstudio-is/webstudio-builder/pull/1111.
Took all changes which already work. Will try to enable caching in
separate PR.

---------

Co-authored-by: Nathan Hammond <nathan.hammond@vercel.com>
2023-03-29 18:54:19 +07:00
Andras Bacsai c9cb63eaa3 Add lostpixel to builder (#1230)
## 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-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-03-13 15:16:42 +01:00
Ivan Starkov 17d2bb84bd Fix ts error (#1199)
## Description

I don't know why it started to detect this error. But here we are.

## 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-03-08 22:28:40 +04:00
Andras Bacsai fde56c277b Migrating lost-pixel to their new method (#1121)
## 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-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-02-24 18:05:12 +01:00
Ivan Starkov 4d4f07d8e6 Fix publish (#1103)
## Description

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

NODE_ENV = test has no sense and breaks size-limit

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, @TrySound  I need you to accept

## 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-02-22 18:56:50 +03:00
Ivan Starkov e799dcb28e To reduce size of published apps pass getComponent to InstanceRoot, add size limit (#1098)
## Description

Now published apps during build can pregenerate imports of used
components

https://github.com/webstudio-is/webstudio-builder/blob/89688ee837b45f0877ebe32d3aefb1869a97c0a1/packages/sdk-size-test/app/page-components/page-main.ts#L1-L3

And pas getComponent to InstanceRoot
https://github.com/webstudio-is/webstudio-builder/blob/89688ee837b45f0877ebe32d3aefb1869a97c0a1/packages/sdk-size-test/app/routes/$.tsx#L23

Also size-limit is added
https://github.com/webstudio-is/webstudio-builder/blob/89688ee837b45f0877ebe32d3aefb1869a97c0a1/packages/sdk-size-test/package.json#L10-L19


## Steps for reproduction

### What I did

Create sample remix app with sdk
Build: 256K

Increase size of sup component
Build now 564K

After changes build now 256kB

## 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-02-22 18:31:48 +03:00
Andras Bacsai ac413cdd5f rename designer to builder 2023-02-14 11:15:24 +01:00
Ivan Starkov cc447fbc63 Update packages (#934)
## Description

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

I want to update saas based on #928

## 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-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-02-03 11:41:41 +03:00
4d1a86b902 Sync tokens & Add a GitHub action that will automatically keep figma-design-tokens.ts up to date (#778)
## Description

Just another PR to sync tokens, but also I've added a GitHub action that
will automatically keep `figma-design-tokens.ts` up to date in the
`figma-tokens` branch

## Code Review

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

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

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
Co-authored-by: Taylor Nowotny <86495896+taylornowotny@users.noreply.github.com>
Co-authored-by: markxtang <122043657+markxtang@users.noreply.github.com>
Co-authored-by: Bot (build-figma-tokens.yml) <bot@localhost>
2023-01-14 10:48:29 +01:00
Roman Pominov 9ff254bd2a Add action that re-creates figma-tokens branch when it gets deleted (#781)
See https://discord.com/channels/955905230107738152/1063389035705401386
2023-01-13 15:24:49 +03:00
Bogdan Chadkin f72b7452b8 Fix publish build (#748)
Publish workflow ran turbo build directly which broke after remix
upgrade with broken build.
2023-01-05 22:34:25 +03:00
Bogdan Chadkin 9c71929b25 Upgrade to remix 1.7.6 (#725)
https://github.com/remix-run/remix/releases/tag/remix%401.7.0
https://github.com/remix-run/remix/releases/tag/remix%401.7.4

du -ckd1 node_modules
-795648
+798524

Not much changes though I found since
[1.7.5](https://github.com/remix-run/remix/releases/tag/remix%401.7.5)
build started to hang when run with turbo or recursive pnpm run.

Looks like in this commit some stream or connection not closed when
build is finished.

https://github.com/remix-run/remix/pull/4410

Let's see if not fixed in newer versions and then file an issue.
2023-01-03 18:24:44 +03: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
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
Mateusz Burzyński 3794f9a497 Add a composed Storybook (#529)
This PR builds on top of the work done in
https://github.com/webstudio-is/webstudio-designer/pull/519 and
introduces a root-level storybook that just aggregates all of the
per-package storybooks into one.

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

The current URL from this branch is available
[here](https://638affb61acca1e593c6e558-dksaophpxa.chromatic.com/) so
you can take a look at how this looks in practice.
2022-12-09 14:46:23 +01:00