From 74d9cc4e38e791dfe5f0e7d0cc1da402a1863f9a Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Fri, 18 Apr 2025 17:11:35 +0900
Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8E=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packages/frontend/src/style.scss | 1 -
1 file changed, 1 deletion(-)
diff --git a/packages/frontend/src/style.scss b/packages/frontend/src/style.scss
index f3979fab1d..9a3a43bdc3 100644
--- a/packages/frontend/src/style.scss
+++ b/packages/frontend/src/style.scss
@@ -164,7 +164,6 @@ rt {
.ti {
width: 1.28em;
vertical-align: -12%;
- line-height: 1em;
&::before {
font-size: 128%;
From 978ab2f848d4d37de6d3a4e6b2ecfc0adcbd09b7 Mon Sep 17 00:00:00 2001
From: zyoshoka <107108195+zyoshoka@users.noreply.github.com>
Date: Fri, 18 Apr 2025 18:56:46 +0900
Subject: [PATCH 2/2] fix(storybook): implement missing stories (#15862)
---
packages/frontend/.storybook/fakes.ts | 35 +++++++++++++++
.../MkChatHistories.stories.impl.ts | 45 +++++++++++++++++++
.../MkDisableSection.stories.impl.ts | 7 +++
3 files changed, 87 insertions(+)
create mode 100644 packages/frontend/src/components/MkChatHistories.stories.impl.ts
create mode 100644 packages/frontend/src/components/MkDisableSection.stories.impl.ts
diff --git a/packages/frontend/.storybook/fakes.ts b/packages/frontend/.storybook/fakes.ts
index 0a5ac15aa5..91ef41eedf 100644
--- a/packages/frontend/.storybook/fakes.ts
+++ b/packages/frontend/.storybook/fakes.ts
@@ -43,6 +43,41 @@ export function channel(id = 'somechannelid', name = 'Some Channel', bannerUrl:
};
}
+export function chatMessage(room = false, id = 'somechatmessageid', text = 'Hello!'): entities.ChatMessage {
+ const fromUser = userLite();
+ const toRoom = chatRoom();
+ const toUser = userLite('touserid');
+ return {
+ id,
+ createdAt: '2016-12-28T22:49:51.000Z',
+ fromUserId: fromUser.id,
+ fromUser,
+ text,
+ isRead: false,
+ reactions: [],
+ ...room ? {
+ toRoomId: toRoom.id,
+ toRoom,
+ } : {
+ toUserId: toUser.id,
+ toUser,
+ },
+ };
+}
+
+export function chatRoom(id = 'somechatroomid', name = 'Some Chat Room'): entities.ChatRoom {
+ const owner = userLite('someownerid');
+ return {
+ id,
+ createdAt: '2016-12-28T22:49:51.000Z',
+ ownerId: owner.id,
+ owner,
+ name,
+ description: 'A chat room for testing',
+ isMuted: false,
+ };
+}
+
export function clip(id = 'someclipid', name = 'Some Clip'): entities.Clip {
return {
id,
diff --git a/packages/frontend/src/components/MkChatHistories.stories.impl.ts b/packages/frontend/src/components/MkChatHistories.stories.impl.ts
new file mode 100644
index 0000000000..8268adc36f
--- /dev/null
+++ b/packages/frontend/src/components/MkChatHistories.stories.impl.ts
@@ -0,0 +1,45 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+import { http, HttpResponse } from 'msw';
+import { action } from '@storybook/addon-actions';
+import { chatMessage } from '../../.storybook/fakes';
+import MkChatHistories from './MkChatHistories.vue';
+import type { StoryObj } from '@storybook/vue3';
+import type * as Misskey from 'misskey-js';
+export const Default = {
+ render(args) {
+ return {
+ components: {
+ MkChatHistories,
+ },
+ setup() {
+ return {
+ args,
+ };
+ },
+ computed: {
+ props() {
+ return {
+ ...this.args,
+ };
+ },
+ },
+ template: '',
+ };
+ },
+ parameters: {
+ layout: 'centered',
+ msw: {
+ handlers: [
+ http.post('/api/chat/history', async ({ request }) => {
+ const body = await request.json() as Misskey.entities.ChatHistoryRequest;
+ action('POST /api/chat/history')(body);
+ return HttpResponse.json([chatMessage(body.room)]);
+ }),
+ ],
+ },
+ },
+} satisfies StoryObj;
diff --git a/packages/frontend/src/components/MkDisableSection.stories.impl.ts b/packages/frontend/src/components/MkDisableSection.stories.impl.ts
new file mode 100644
index 0000000000..78e556c63e
--- /dev/null
+++ b/packages/frontend/src/components/MkDisableSection.stories.impl.ts
@@ -0,0 +1,7 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+import MkDisableSection from './MkDisableSection.vue';
+void MkDisableSection;