Commit Graph
16 Commits
Author SHA1 Message Date
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 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
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 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 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
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 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
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 ac413cdd5f rename designer to builder 2023-02-14 11:15:24 +01: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 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
Mateusz Burzyński 730b12b21b Deploy per-PR Storybooks on Chromatic (#519)
This publishes all available Storybooks to Chromatic - this happens per
push so you will always be able to check out the current state of things
in those Storybooks.

Since you have a lot of Storybooks... this isn't quite convenient. I
plan to combine all of those Storybooks into a single one (a single
storybook that will reference all of those smaller ones). I'd like to do
that in a follow-up PR though - let's now focus on getting this up and
running.
2022-12-06 08:32:51 +01:00