Skip to content
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

Enhance(frontend): もっと!ボタンでリアクション一覧が開けるように #12935

Merged
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ebf81dd
もっと!ボタンでリアクション一覧が開けるように
1STEP621 Jan 7, 2024
1f1a61a
update CHANGELOG.md && デバッグ用に最大リアクション表示数を1にしてたのを一応戻した
1STEP621 Jan 7, 2024
dec818d
Merge branch 'develop' of github.com:misskey-dev/misskey into enhance…
1STEP621 Jan 8, 2024
158f26a
fix
1STEP621 Jan 8, 2024
17332d9
Merge branch 'develop' into enhance/click-more-btn-to-see-all-reactions
1STEP621 Jan 8, 2024
ac4d077
Merge branch 'develop' into enhance/click-more-btn-to-see-all-reactions
1STEP621 Jan 10, 2024
818d901
Merge branch 'develop' into enhance/click-more-btn-to-see-all-reactions
1STEP621 Jan 20, 2024
3c2f003
Merge branch 'develop' of github.com:misskey-dev/misskey into enhance…
1STEP621 Feb 5, 2024
a5fb7c4
Merge branch 'develop' of github.com:misskey-dev/misskey into enhance…
1STEP621 Feb 19, 2024
b48dd9c
デザイン調整
1STEP621 Feb 19, 2024
93bf462
maxNumberもどす
1STEP621 Feb 19, 2024
33117d6
fix CHANGELOG
1STEP621 Feb 19, 2024
fab76ff
Merge branch 'develop' into enhance/click-more-btn-to-see-all-reactions
1STEP621 Feb 21, 2024
ceb4459
Merge branch 'develop' into enhance/click-more-btn-to-see-all-reactions
1STEP621 Feb 24, 2024
9e99eac
Merge branch 'develop' of github.com:misskey-dev/misskey into enhance…
1STEP621 Feb 29, 2024
8a060a8
fix
1STEP621 Feb 29, 2024
b013634
Merge branch 'develop' into enhance/click-more-btn-to-see-all-reactions
1STEP621 Mar 21, 2024
887d45e
move changelog
1STEP621 Mar 21, 2024
53ff120
Merge branch 'develop' into enhance/click-more-btn-to-see-all-reactions
kakkokari-gtyih Mar 30, 2024
ab82186
:art:
syuilo Mar 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@

### Client
- Enhance: ノート作成画面のファイル添付メニューの区切り線の位置を調整
- Enhance: ノートについているリアクションの「もっと!」から、リアクションの一覧を表示できるように
- Fix: syuilo/misskeyの時代からあるインスタンスが改変されたバージョンであると誤認識される問題
- Fix: MFMのオートコンプリートが出るべき状況で出ないことがある問題を修正
- Fix: チャートのラベルが消えている問題を修正
Expand Down
27 changes: 22 additions & 5 deletions packages/frontend/src/components/MkNote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<MkReactionsViewer v-if="appearNote.reactionAcceptance !== 'likeOnly'" :note="appearNote" :maxNumber="16" @mockUpdateMyReaction="emitUpdReaction">
<template #more>
<div :class="$style.reactionOmitted">{{ i18n.ts.more }}</div>
<MkButton class="_button" link :to="`/notes/${appearNote.id}/reactions`" :class="[$style.reactionOmitted, { [$style.small]: defaultStore.state.reactionsDisplaySize === 'small', [$style.large]: defaultStore.state.reactionsDisplaySize === 'large' }]">{{ i18n.ts.more }}</MkButton>
</template>
</MkReactionsViewer>
<footer :class="$style.footer">
Expand Down Expand Up @@ -170,6 +170,7 @@ import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
import MkMediaList from '@/components/MkMediaList.vue';
import MkCwButton from '@/components/MkCwButton.vue';
import MkPoll from '@/components/MkPoll.vue';
import MkButton from './MkButton.vue';
import MkUsersTooltip from '@/components/MkUsersTooltip.vue';
import MkUrlPreview from '@/components/MkUrlPreview.vue';
import MkInstanceTicker from '@/components/MkInstanceTicker.vue';
Expand Down Expand Up @@ -994,12 +995,28 @@ function emitUpdReaction(emoji: string, delta: number) {
text-align: center;
opacity: 0.7;
}

.reactionOmitted {
display: inline-block;
height: 32px;
display: inline-flex;
min-width: 0;
height: 42px;
margin: 2px;
padding: 0 6px;
opacity: .8;
border-radius: 6px;
align-items: center;
justify-content: center;
cursor: pointer;
border: dashed 1px var(--divider);

&.small {
height: 32px;
font-size: 1em;
border-radius: 4px;
}

&.large {
height: 52px;
font-size: 2em;
border-radius: 8px;
}
}
</style>
9 changes: 6 additions & 3 deletions packages/frontend/src/components/MkNoteDetailed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,12 @@ import MkReactionIcon from '@/components/MkReactionIcon.vue';
import MkButton from '@/components/MkButton.vue';
import { isEnabledUrlPreview } from '@/instance.js';

const props = defineProps<{
const props = withDefaults(defineProps<{
note: Misskey.entities.Note;
}>();
initialTab: string;
}>(), {
initialTab: 'replies',
});

const inChannel = inject('inChannel', null);

Expand Down Expand Up @@ -303,7 +306,7 @@ provide('react', (reaction: string) => {
});
});

const tab = ref('replies');
const tab = ref(props.initialTab);
const reactionTabType = ref<string | null>(null);

const renotesPagination = computed<Paging>(() => ({
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/src/components/MkReactionsViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ watch([() => props.note.reactions, () => props.maxNumber], ([newSource, maxNumbe
}

.root {
display: flex;
flex-wrap: wrap;
margin: 4px -2px 0 -2px;

&:empty {
Expand Down
3 changes: 2 additions & 1 deletion packages/frontend/src/pages/note.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<div class="_margin _gaps_s">
<MkRemoteCaution v-if="note.user.host != null" :href="note.url ?? note.uri"/>
<MkNoteDetailed :key="note.id" v-model:note="note" :class="$style.note"/>
<MkNoteDetailed :key="note.id" v-model:note="note" :initialTab="initialTab" :class="$style.note"/>
</div>
<div v-if="clips && clips.length > 0" class="_margin">
<div style="font-weight: bold; padding: 12px;">{{ i18n.ts.clip }}</div>
Expand Down Expand Up @@ -66,6 +66,7 @@ import { defaultStore } from '@/store.js';

const props = defineProps<{
noteId: string;
initialTab?: string;
}>();

const note = ref<null | Misskey.entities.Note>();
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/router/definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const routes: RouteDef[] = [{
component: page(() => import('@/pages/user/index.vue')),
}, {
name: 'note',
path: '/notes/:noteId',
path: '/notes/:noteId/:initialTab?',
component: page(() => import('@/pages/note.vue')),
}, {
name: 'list',
Expand Down
Loading