From 12ae9a2b23436732ef453c6bca5f22bbca229d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=82=8B=E3=81=B5=E3=82=8B?= Date: Mon, 13 May 2024 11:19:19 +0900 Subject: [PATCH 01/18] =?UTF-8?q?feat:=20DevContainer=E3=81=ABpnpm?= =?UTF-8?q?=E3=82=92=E3=82=A4=E3=83=B3=E3=82=B9=E3=83=88=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=81=99=E3=82=8B=E9=9A=9B=E3=80=81corepack=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E3=81=86=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B=20(#1382?= =?UTF-8?q?1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 6 ++---- .devcontainer/init.sh | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 182ee2fbb2..31b6212cb5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,12 +4,10 @@ "service": "app", "workspaceFolder": "/workspace", "features": { - "ghcr.io/devcontainers-contrib/features/pnpm:2": { - "version": "8.9.2" - }, "ghcr.io/devcontainers/features/node:1": { "version": "20.12.2" - } + }, + "ghcr.io/devcontainers-contrib/features/corepack:1": {} }, "forwardPorts": [3000], "postCreateCommand": "sudo chmod 755 .devcontainer/init.sh && .devcontainer/init.sh", diff --git a/.devcontainer/init.sh b/.devcontainer/init.sh index bcad3e6d85..729e1a9d2d 100755 --- a/.devcontainer/init.sh +++ b/.devcontainer/init.sh @@ -4,6 +4,8 @@ set -xe sudo chown -R node /workspace git submodule update --init +corepack install +corepack enable pnpm config set store-dir /home/node/.local/share/pnpm/store pnpm install --frozen-lockfile cp .devcontainer/devcontainer.yml .config/default.yml From 9b0fc317514a9c6ec8f400a317e67fdeba160e7a Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Tue, 14 May 2024 19:18:30 +0900 Subject: [PATCH 02/18] Update FUNDING.yml --- .github/FUNDING.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index c6b2a1611c..d42b58abc0 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ # These are supported funding model platforms +github: [misskey-dev] patreon: syuilo From def7b8c55e342aea855e56da634994c02f56f600 Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Sat, 18 May 2024 12:42:26 +0900 Subject: [PATCH 03/18] fix(frontend): fix Chromatic test fails (#13826) * fix: attempt to fix Chromatic test fails * chore: add comment --- packages/frontend/src/components/MkModal.vue | 5 ++++- .../frontend/src/components/global/MkAd.stories.impl.ts | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkModal.vue b/packages/frontend/src/components/MkModal.vue index eb240da759..9e69ab2207 100644 --- a/packages/frontend/src/components/MkModal.vue +++ b/packages/frontend/src/components/MkModal.vue @@ -276,8 +276,11 @@ const align = () => { const onOpened = () => { emit('opened'); + // NOTE: Chromatic テストの際に undefined になる場合がある + if (content.value == null) return; + // モーダルコンテンツにマウスボタンが押され、コンテンツ外でマウスボタンが離されたときにモーダルバックグラウンドクリックと判定させないためにマウスイベントを監視しフラグ管理する - const el = content.value!.children[0]; + const el = content.value.children[0]; el.addEventListener('mousedown', ev => { contentClicking = true; window.addEventListener('mouseup', ev => { diff --git a/packages/frontend/src/components/global/MkAd.stories.impl.ts b/packages/frontend/src/components/global/MkAd.stories.impl.ts index a1d274382f..aef26ab92d 100644 --- a/packages/frontend/src/components/global/MkAd.stories.impl.ts +++ b/packages/frontend/src/components/global/MkAd.stories.impl.ts @@ -11,6 +11,10 @@ import { i18n } from '@/i18n.js'; let lock: Promise | undefined; +function sleep(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + const common = { render(args) { return { @@ -43,6 +47,8 @@ const common = { lock = new Promise(r => resolve = r); try { + // NOTE: sleep しないと何故か落ちる + await sleep(100); const canvas = within(canvasElement); const a = canvas.getByRole('link'); // await expect(a.href).toMatch(/^https?:\/\/.*#test$/); @@ -53,7 +59,7 @@ const common = { const i = buttons[0]; await expect(i).toBeInTheDocument(); await userEvent.click(i); - // await expect(canvasElement).toHaveTextContent(i18n.ts._ad.back); + await expect(canvasElement).toHaveTextContent(i18n.ts._ad.back); await expect(a).not.toBeInTheDocument(); await expect(i).not.toBeInTheDocument(); buttons = canvas.getAllByRole('button'); From ba62b7378bb13b384bd9db27acb0013fb90b53b3 Mon Sep 17 00:00:00 2001 From: zyoshoka <107108195+zyoshoka@users.noreply.github.com> Date: Sat, 18 May 2024 18:52:17 +0900 Subject: [PATCH 04/18] fix(storybook): fix wrong `tabler-icons` CSS path (#13828) --- packages/frontend/.storybook/preview-head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/.storybook/preview-head.html b/packages/frontend/.storybook/preview-head.html index 4722fe7f5f..ae42fd49bc 100644 --- a/packages/frontend/.storybook/preview-head.html +++ b/packages/frontend/.storybook/preview-head.html @@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only - +