summaryrefslogtreecommitdiff
path: root/packages/frontend/src
diff options
context:
space:
mode:
authorAcid Chicken (硫酸鶏) <root@acid-chicken.com>2023-04-02 14:59:19 +0900
committerAcid Chicken (硫酸鶏) <root@acid-chicken.com>2023-04-02 14:59:19 +0900
commit388ecfb1ea01fb3983ded12c1d7a1fc977fc3d81 (patch)
tree47b316aa3931ef48bf81e02ca2eb77261efbbf9b /packages/frontend/src
parentbuild(#10336): blur `MkA` before interaction ends (diff)
downloadmisskey-388ecfb1ea01fb3983ded12c1d7a1fc977fc3d81.tar.gz
misskey-388ecfb1ea01fb3983ded12c1d7a1fc977fc3d81.tar.bz2
misskey-388ecfb1ea01fb3983ded12c1d7a1fc977fc3d81.zip
ci(#10336): stabilize
Diffstat (limited to 'packages/frontend/src')
-rw-r--r--packages/frontend/src/components/global/MkAcct.stories.impl.ts6
-rw-r--r--packages/frontend/src/components/global/MkAvatar.stories.impl.ts13
-rw-r--r--packages/frontend/src/components/global/MkEllipsis.stories.impl.ts32
-rw-r--r--packages/frontend/src/components/global/MkEllipsis.vue16
-rw-r--r--packages/frontend/src/components/global/MkLoading.stories.impl.ts3
5 files changed, 62 insertions, 8 deletions
diff --git a/packages/frontend/src/components/global/MkAcct.stories.impl.ts b/packages/frontend/src/components/global/MkAcct.stories.impl.ts
index 79d993decc..7dfa1a14f2 100644
--- a/packages/frontend/src/components/global/MkAcct.stories.impl.ts
+++ b/packages/frontend/src/components/global/MkAcct.stories.impl.ts
@@ -24,7 +24,10 @@ export const Default = {
};
},
args: {
- user: userDetailed,
+ user: {
+ ...userDetailed,
+ host: null,
+ },
},
parameters: {
layout: 'centered',
@@ -34,6 +37,7 @@ export const Detail = {
...Default,
args: {
...Default.args,
+ user: userDetailed,
detail: true,
},
} satisfies StoryObj<typeof MkAcct>;
diff --git a/packages/frontend/src/components/global/MkAvatar.stories.impl.ts b/packages/frontend/src/components/global/MkAvatar.stories.impl.ts
index 2936664a88..6153f81294 100644
--- a/packages/frontend/src/components/global/MkAvatar.stories.impl.ts
+++ b/packages/frontend/src/components/global/MkAvatar.stories.impl.ts
@@ -44,9 +44,6 @@ export const ProfilePage = {
indicator: true,
},
} satisfies StoryObj<typeof MkAvatar>;
-/* Your story couldn’t be captured because it exceeds our 25,000,000px limit. Its dimensions are 5,504,893x5,504,892px. Possible ways to resolve:
- * * Separate pages into components
- * * Minimize the number of very large elements in a story
export const ProfilePageCat = {
...ProfilePage,
args: {
@@ -56,5 +53,13 @@ export const ProfilePageCat = {
isCat: true,
},
},
+ parameters: {
+ chromatic: {
+ /* Your story couldn’t be captured because it exceeds our 25,000,000px limit. Its dimensions are 5,504,893x5,504,892px. Possible ways to resolve:
+ * * Separate pages into components
+ * * Minimize the number of very large elements in a story
+ */
+ disableSnapshot: true,
+ },
+ },
} satisfies StoryObj<typeof MkAvatar>;
- */
diff --git a/packages/frontend/src/components/global/MkEllipsis.stories.impl.ts b/packages/frontend/src/components/global/MkEllipsis.stories.impl.ts
new file mode 100644
index 0000000000..4ed035aed5
--- /dev/null
+++ b/packages/frontend/src/components/global/MkEllipsis.stories.impl.ts
@@ -0,0 +1,32 @@
+/* eslint-disable @typescript-eslint/explicit-function-return-type */
+import { StoryObj } from '@storybook/vue3';
+import isChromatic from 'chromatic/isChromatic';
+import MkEllipsis from './MkEllipsis.vue';
+export const Default = {
+ render(args) {
+ return {
+ components: {
+ MkEllipsis,
+ },
+ setup() {
+ return {
+ args,
+ };
+ },
+ computed: {
+ props() {
+ return {
+ ...this.args,
+ };
+ },
+ },
+ template: '<MkEllipsis v-bind="props" />',
+ };
+ },
+ args: {
+ static: isChromatic,
+ },
+ parameters: {
+ layout: 'centered',
+ },
+} satisfies StoryObj<typeof MkEllipsis>;
diff --git a/packages/frontend/src/components/global/MkEllipsis.vue b/packages/frontend/src/components/global/MkEllipsis.vue
index b3cf69c075..c8f6cd3394 100644
--- a/packages/frontend/src/components/global/MkEllipsis.vue
+++ b/packages/frontend/src/components/global/MkEllipsis.vue
@@ -1,9 +1,19 @@
<template>
-<span :class="$style.root">
+<span :class="[$style.root, { [$style.static]: static }]">
<span :class="$style.dot">.</span><span :class="$style.dot">.</span><span :class="$style.dot">.</span>
</span>
</template>
+<script lang="ts" setup>
+import { } from 'vue';
+
+const props = withDefaults(defineProps<{
+ static?: boolean;
+}>(), {
+ static: false,
+});
+</script>
+
<style lang="scss" module>
@keyframes ellipsis {
0%, 80%, 100% {
@@ -15,7 +25,9 @@
}
.root {
-
+ &.static > .dot {
+ animation-play-state: paused;
+ }
}
.dot {
diff --git a/packages/frontend/src/components/global/MkLoading.stories.impl.ts b/packages/frontend/src/components/global/MkLoading.stories.impl.ts
index ca2e14494d..c3acc0e4c4 100644
--- a/packages/frontend/src/components/global/MkLoading.stories.impl.ts
+++ b/packages/frontend/src/components/global/MkLoading.stories.impl.ts
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { StoryObj } from '@storybook/vue3';
+import isChromatic from 'chromatic/isChromatic';
import MkLoading from './MkLoading.vue';
export const Default = {
render(args) {
@@ -23,7 +24,7 @@ export const Default = {
};
},
args: {
- static: true,
+ static: isChromatic,
},
parameters: {
layout: 'centered',