-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build(#10336): Storybook & Chromatic & msw #10365
Merged
Changes from 101 commits
Commits
Show all changes
102 commits
Select commit
Hold shift + click to select a range
1dfcca7
build(#10336): init
acid-chicken 91e0e49
fix(#10336): invalid name conversion
acid-chicken 0dcb99d
build(#10336): load locales and vite config
acid-chicken a19c560
refactor(#10336): remove unused imports
acid-chicken 6e21147
build(#10336): separate definitions and generated codes
acid-chicken be7b71a
refactor(#10336): remove hatches
acid-chicken 3907cb5
refactor(#10336): module semantics
acid-chicken ca7d208
refactor(#10336): remove unused common preferences
acid-chicken 2ec608f
fix: typo
acid-chicken 2eecb8e
build(#10336): mock assets
acid-chicken bdbbb92
build(#10336): impl `SatisfiesExpression`
acid-chicken 0ac4d74
build(#10336): control themes
acid-chicken bf527cd
refactor(#10336): semantics
acid-chicken cc3fbef
build(#10336): make .storybook as an individual TypeScript project
acid-chicken 49f8bb4
style(#10336): use single quote
acid-chicken 5ced8ae
build(#10336): avoid intrinsic component names
acid-chicken 1d0ca7e
chore: suppress linter
acid-chicken bf5fff8
style: typing
acid-chicken c2d8759
build(#10336): update dependencies
acid-chicken bd7cc6a
docs: note about Storybook
acid-chicken 723cff0
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
acid-chicken 8332c03
build(#10336): sync
acid-chicken 2bce064
build(#10336): full reload server on change
acid-chicken b56d173
chore: use defaultStore instead
acid-chicken 8ca9621
build(#10336): show popups on Story
acid-chicken 899c624
refactor(#10336): remove redundant div
acid-chicken 225a8e1
docs: fix
acid-chicken 356fd72
build(#10336): interactions
acid-chicken bc6d576
build(#10336): add an interaction test for `<MkA/>`
acid-chicken 3db0147
build(#10336): bump storybook
acid-chicken d1c5556
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
acid-chicken 5393436
docs(#10336): mention to pre-build misskey-js
acid-chicken 98fd6b5
build(#10336): write stories for `MkAcct`
acid-chicken 70fc25a
build(#10336): write stories for `MkAd`
acid-chicken bf9846a
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
acid-chicken 558d73b
build(#10336): fix missing type definition
acid-chicken 85f50f3
build(#10336): use `toHaveTextContent`
acid-chicken 671ce6a
build(#10336): write some stories
acid-chicken 5605b03
build(#10336): hide internal args
acid-chicken a47f4b8
build(#10336): generate `components/global` stories only
acid-chicken 2b831da
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
acid-chicken c6d12c2
build(#10336): write stories for `MkMisskeyFlavoredMarkdown`
acid-chicken d300f4a
fix: conflict errors
acid-chicken 5667f0f
build(#10336): subcomponents on sidebar
acid-chicken f246699
refactor: restore `SatisfiesExpression`
acid-chicken f3a29cb
docs(#10336): note development status
acid-chicken 3f1a87d
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
acid-chicken 139dade
build(#10336): use chokidar-cli
acid-chicken f7bc442
docs(#10336): note chokidar-cli mode
acid-chicken f5fd59d
chore(#10336): untrack generated stories files
acid-chicken 38b153c
fix: pointer handling
acid-chicken 1521bb0
build(#10336): finalize
acid-chicken 0960d61
chore: add static option to `MkLoading`
acid-chicken f39b5be
refactor(#10336): bind to local args
acid-chicken 4521e61
fix: missing case
acid-chicken e7a15b5
revert: restore `SatisfiesExpression`
acid-chicken 65f20de
build(#10336): make storybook buildable
acid-chicken ec8905f
build(#10336): staticify assets
acid-chicken 88981e9
build(#10336): staticified directory structure
acid-chicken 0f334f9
build(#10336): normalize path for Windows
acid-chicken 7256b1f
ci(#10336): create actions
acid-chicken 20fb266
build(#10336): ignore tsc errors
acid-chicken b0fa9f3
build(#10336): ignore tsc errors
acid-chicken 9773170
build(#10336): missing dependencies
acid-chicken 8b30a0d
build(#10336): missing dependencies
acid-chicken fc76829
build(#10336): use fast-glob
acid-chicken 97e7f7e
fix: invalid lockfile
acid-chicken b9289c3
ci(#10336): increase heap size
acid-chicken 3f4d93a
build(#10336): use unpkg for storybook tabler icons
acid-chicken edeabac
build(#10336): use unpkg for storybook twemojis
acid-chicken 903d0bd
build(#10336): disable `ProfilePageCat`
acid-chicken 9982ead
build(#10336): blur `MkA` before interaction ends
acid-chicken 388ecfb
ci(#10336): stabilize
acid-chicken a217344
ci(#10336): fetch-depth
acid-chicken faf827a
build(#10336): isChromatic
acid-chicken 5ab02cb
Merge branch 'storybook' of https://github.com/misskey-dev/misskey in…
acid-chicken 5143f33
ci(#10336): notify on changes
acid-chicken 252fe24
ci(#10336): fix typo
acid-chicken f9693d1
ci(#10336): missing working directory
acid-chicken e4f6fac
ci(#10336): skip build
acid-chicken d57a504
ci(#10336): fix path
acid-chicken 29c63ad
build(#10336): fails on Windows
acid-chicken 9946ba0
build(#10336): available on Windows
acid-chicken ddb1635
ci(#10336): disable animation on chromatic
acid-chicken d6b1e5b
Merge branch 'storybook' of https://github.com/misskey-dev/misskey in…
acid-chicken dfb6df0
ci(#10336): add static option to `PageHeader.tabs`
acid-chicken 36e8988
chore: void
acid-chicken a61fe90
Merge branch 'develop' into storybook
acid-chicken 3ab2a00
ci(#10336): change parameters
acid-chicken 423a67f
Merge branch 'storybook' of https://github.com/misskey-dev/misskey in…
acid-chicken 902d7c5
docs(#10336): update CONTRIBUTING
acid-chicken 4f7ba29
docs(#10336): note about meta overriding and etc.
acid-chicken b1b871a
ci(#10336): use Chromatic for checks
acid-chicken b303a80
Merge branch 'storybook' of https://github.com/misskey-dev/misskey in…
acid-chicken 9b00424
ci(#10336): use `pull_request` instead of `pull_request_target` for now
acid-chicken 8d90e88
Merge branch 'develop' of https://github.com/misskey-dev/misskey into…
acid-chicken 2acb655
ci(#10336): use `exitOnceUploaded`
acid-chicken b3b64d8
ci(#10336): reuse built storybook
acid-chicken 211682d
ci(#10336): back to `pull_request_target`
acid-chicken 38b9fc4
chore: unused dependencies
acid-chicken 14591aa
style(#10336): reduce prettier indents
acid-chicken b91d831
style: note about `TSSatisfiesExpression`
acid-chicken File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Storybook | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request_target: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 7 | ||
run_install: false | ||
- name: Use Node.js 18.x | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 18.x | ||
cache: 'pnpm' | ||
- run: corepack enable | ||
- run: pnpm i --frozen-lockfile | ||
- name: Check pnpm-lock.yaml | ||
run: git diff --exit-code pnpm-lock.yaml | ||
- name: Build misskey-js | ||
run: pnpm --filter misskey-js build | ||
- name: Build storybook | ||
run: pnpm --filter frontend build-storybook | ||
env: | ||
NODE_OPTIONS: "--max_old_space_size=7168" | ||
- name: Publish to Chromatic | ||
id: chromatic | ||
uses: chromaui/action@v1 | ||
with: | ||
exitOnceUploaded: true | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
storybookBuildDir: storybook-static | ||
workingDir: packages/frontend | ||
- name: Compare on Chromatic | ||
if: github.event_name == 'pull_request_target' | ||
run: pnpm --filter frontend chromatic -d storybook-static --exit-once-uploaded --patch-build ${{ github.head_ref }}...${{ github.base_ref }} | ||
env: | ||
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: storybook | ||
path: packages/frontend/storybook-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/storybook-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# (cd path/to/frontend; pnpm tsc -p .storybook) | ||
# (cd path/to/frontend; node .storybook/generate.js) | ||
/generate.js | ||
# (cd path/to/frontend; node .storybook/preload-locale.js) | ||
/preload-locale.js | ||
/locale.ts | ||
# (cd path/to/frontend; node .storybook/preload-theme.js) | ||
/preload-theme.js | ||
/themes.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import type { entities } from 'misskey-js' | ||
|
||
export const userDetailed = { | ||
id: 'someuserid', | ||
username: 'miskist', | ||
host: 'misskey-hub.net', | ||
name: 'Misskey User', | ||
onlineStatus: 'unknown', | ||
avatarUrl: 'https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/about-icon.png?raw=true', | ||
avatarBlurhash: 'eQFRshof5NWBRi},juayfPju53WB?0ofs;s*a{ofjuay^SoMEJR%ay', | ||
emojis: [], | ||
bannerBlurhash: 'eQA^IW^-MH8w9tE8I=S^o{$*R4RikXtSxutRozjEnNR.RQadoyozog', | ||
bannerColor: '#000000', | ||
bannerUrl: 'https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/fedi.jpg?raw=true', | ||
birthday: '2014-06-20', | ||
createdAt: '2016-12-28T22:49:51.000Z', | ||
description: 'I am a cool user!', | ||
ffVisibility: 'public', | ||
fields: [ | ||
{ | ||
name: 'Website', | ||
value: 'https://misskey-hub.net', | ||
}, | ||
], | ||
followersCount: 1024, | ||
followingCount: 16, | ||
hasPendingFollowRequestFromYou: false, | ||
hasPendingFollowRequestToYou: false, | ||
isAdmin: false, | ||
isBlocked: false, | ||
isBlocking: false, | ||
isBot: false, | ||
isCat: false, | ||
isFollowed: false, | ||
isFollowing: false, | ||
isLocked: false, | ||
isModerator: false, | ||
isMuted: false, | ||
isSilenced: false, | ||
isSuspended: false, | ||
lang: 'en', | ||
location: 'Fediverse', | ||
notesCount: 65536, | ||
pinnedNoteIds: [], | ||
pinnedNotes: [], | ||
pinnedPage: null, | ||
pinnedPageId: null, | ||
publicReactions: false, | ||
securityKeys: false, | ||
twoFactorEnabled: false, | ||
updatedAt: null, | ||
uri: null, | ||
url: null, | ||
} satisfies entities.UserDetailed |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
現時点ではこのファイルに書いてあるコマンドでストーリーを生成してから
pnpm storybook dev
して Storybook の画面を開くことができるThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[vite] Internal server error: Failed to resolve import "../node_modules/storybook-addon-misskey-theme/preview" from "..\..\..\..\..\..\virtual:\@storybook\builder-vite\vite-app.js". Does the file exist?
が出た
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI は回ってるし謎
あとで調査します
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows 環境で再現した
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@syuilo 多分直った