Skip to content

Commit

Permalink
Revert "test(misskey-dev#10336): add components/Mk[A-B].* stories (m…
Browse files Browse the repository at this point in the history
…isskey-dev#10475)"

This reverts commit 9bb6c53.
  • Loading branch information
tamaina committed Apr 13, 2023
1 parent bbba5c5 commit 1fd2661
Show file tree
Hide file tree
Showing 21 changed files with 245 additions and 617 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ You can override the default story by creating a impl story file (`MyComponent.s

```ts
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable import/no-duplicates */
import { StoryObj } from '@storybook/vue3';
import MyComponent from './MyComponent.vue';
export const Default = {
Expand Down
12 changes: 6 additions & 6 deletions packages/frontend/.storybook/generate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function toStories(component: string): string {
.replace(/[-.]|^(?=\d)/g, '_')
.replace(/(?<=^[^A-Z_]*$)/, '_')}
/> as estree.Identifier;
const parameters =
const parameters = (
<object-expression
properties={[
<property
Expand All @@ -137,8 +137,9 @@ function toStories(component: string): string {
]
: []),
]}
/> as estree.ObjectExpression;
const program =
/>
) as estree.ObjectExpression;
const program = (
<program
body={[
<import-declaration
Expand Down Expand Up @@ -378,11 +379,11 @@ function toStories(component: string): string {
declaration={(<identifier name='meta' />) as estree.Identifier}
/> as estree.ExportDefaultDeclaration,
]}
/> as estree.Program;
/>
) as estree.Program;
return format(
'/* eslint-disable @typescript-eslint/explicit-function-return-type */\n' +
'/* eslint-disable import/no-default-export */\n' +
'/* eslint-disable import/no-duplicates */\n' +
generate(program, { generator }) +
(hasImplStories ? readFileSync(`${implStories}.ts`, 'utf-8') : ''),
{
Expand All @@ -396,7 +397,6 @@ function toStories(component: string): string {
// glob('src/{components,pages,ui,widgets}/**/*.vue')
Promise.all([
glob('src/components/global/*.vue'),
glob('src/components/Mk{A,B}*.vue'),
glob('src/components/MkGalleryPostPreview.vue'),
glob('src/pages/user/home.vue'),
])
Expand Down
10 changes: 0 additions & 10 deletions packages/frontend/.storybook/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ export const onUnhandledRequest = ((req, print) => {
}) satisfies SharedOptions['onUnhandledRequest'];

export const commonHandlers = [
rest.get('/fluent-emoji/:codepoints.png', async (req, res, ctx) => {
const { codepoints } = req.params;
const value = await fetch(`https://raw.githubusercontent.com/misskey-dev/emojis/main/dist/${codepoints}.png`).then((response) => response.blob());
return res(ctx.set('Content-Type', 'image/png'), ctx.body(value));
}),
rest.get('/fluent-emojis/:codepoints.png', async (req, res, ctx) => {
const { codepoints } = req.params;
const value = await fetch(`https://raw.githubusercontent.com/misskey-dev/emojis/main/dist/${codepoints}.png`).then((response) => response.blob());
return res(ctx.set('Content-Type', 'image/png'), ctx.body(value));
}),
rest.get('/twemoji/:codepoints.svg', async (req, res, ctx) => {
const { codepoints } = req.params;
const value = await fetch(`https://unpkg.com/@discordapp/[email protected]/dist/svg/${codepoints}.svg`).then((response) => response.blob());
Expand Down
2 changes: 0 additions & 2 deletions packages/frontend/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<link rel="preload" href="https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/about-icon.png?raw=true" as="image" type="image/png" crossorigin="anonymous">
<link rel="preload" href="https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/fedi.jpg?raw=true" as="image" type="image/jpeg" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/@tabler/[email protected]/tabler-icons.min.css">
<link rel="stylesheet" href="https://unpkg.com/@fontsource/m-plus-rounded-1c/index.css">
<style>
Expand Down
84 changes: 0 additions & 84 deletions packages/frontend/.vscode/storybook.code-snippets

This file was deleted.

1 change: 0 additions & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"vuedraggable": "next"
},
"devDependencies": {
"@storybook/addon-actions": "7.0.2",
"@storybook/addon-essentials": "7.0.2",
"@storybook/addon-interactions": "7.0.2",
"@storybook/addon-links": "7.0.2",
Expand Down
49 changes: 0 additions & 49 deletions packages/frontend/src/components/MkAbuseReport.stories.impl.ts

This file was deleted.

This file was deleted.

33 changes: 0 additions & 33 deletions packages/frontend/src/components/MkAccountMoved.stories.impl.ts

This file was deleted.

4 changes: 2 additions & 2 deletions packages/frontend/src/components/MkAccountMoved.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div :class="$style.root">
<i class="ti ti-plane-departure" style="margin-right: 8px;"></i>
{{ i18n.ts.accountMoved }}
<MkMention :class="$style.link" :username="username" :host="host ?? localHost"/>
<MkMention :class="$style.link" :username="acct" :host="host ?? localHost"/>
</div>
</template>

Expand All @@ -12,7 +12,7 @@ import { i18n } from '@/i18n';
import { host as localHost } from '@/config';
defineProps<{
username: string;
acct: string;
host: string;
}>();
</script>
Expand Down
56 changes: 0 additions & 56 deletions packages/frontend/src/components/MkAchievements.stories.impl.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { StoryObj } from '@storybook/vue3';
import MkAnalogClock from './MkAnalogClock.vue';
import isChromatic from 'chromatic';
export const Default = {
render(args) {
return {
Expand All @@ -23,14 +22,6 @@ export const Default = {
template: '<MkAnalogClock v-bind="props" />',
};
},
args: {
now: isChromatic() ? () => new Date('2023-01-01T10:10:30') : undefined,
},
decorators: [
() => ({
template: '<div style="container-type:inline-size;height:100%"><div style="height:100cqmin;margin:auto;width:100cqmin"><story/></div></div>',
}),
],
parameters: {
layout: 'fullscreen',
},
Expand Down
Loading

0 comments on commit 1fd2661

Please sign in to comment.