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): チャンネル投稿をユーザーページと前後ノートに表示する #238

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions packages/frontend/src/pages/note.vue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

こっちもチャンネル投稿を常に含めるべきかは議論の余地があると思います。(場合によってはupstreamに投げることも考えて。)

例えば対象のノートがチャンネル投稿ならincludeChannelNotesを有効にするとかが考えられるかなと思います。

Copy link

@Sayamame-beans Sayamame-beans Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

私としては、一律で含むつもりでした。
が…現状他の人へのリプとかってここに入っていましたっけ? チャンネルかどうかは気にしないということで良いかも。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確認してきました
ノートの前後表示は、ユーザーページの"ノート"に相当するようで、返信は入っていませんでした。(ついでに、チャンネル投稿は"ノート"には表示されませんでした)
う~む…

Copy link

@Sayamame-beans Sayamame-beans Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ノート"にチャンネル投稿を含むかどうか

ちょっと分かります
どちらが良いかというと難しいですね…(とりあえず後で本家にissueはしましょうかね)

Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import MkClipPreview from '@/components/MkClipPreview.vue';
import { defaultStore } from '@/store.js';
import { pleaseLogin } from '@/scripts/please-login.js';
import { getServerContext } from '@/server-context.js';
import { $i } from '@/account.js';

const CTX_NOTE = getServerContext('note');

Expand All @@ -83,6 +84,8 @@ const prevUserPagination: Paging = {
params: computed(() => note.value ? ({
userId: note.value.userId,
untilId: note.value.id,
withChannelNotes: true,
includeSensitiveChannel: $i != null,
}) : undefined),
};

Expand All @@ -93,6 +96,8 @@ const nextUserPagination: Paging = {
params: computed(() => note.value ? ({
userId: note.value.userId,
sinceId: note.value.id,
withChannelNotes: true,
includeSensitiveChannel: $i != null,
}) : undefined),
};

Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/pages/user/index.timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const pagination = computed(() => tab.value === 'featured' ? {
userId: props.user.id,
withRenotes: tab.value === 'all',
withReplies: tab.value === 'all',
withChannelNotes: tab.value === 'all',
withChannelNotes: true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tab.value == null (ノート)のときにもincludeするべきかは少し議論の余地がある気がします。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

私としては、"すべて"と"ファイル付き"でチャンネル投稿も含めば良いかなという気持ちです

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

個人的には「ノート」にもチャンネル投稿を含めていいと思っていました。(ノートと全ての違いは返信を含むか否かだと考えたため)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ノート欄でchannelが見えないのはupstreamの実装で明示的なものなので、見えるようにするのは私は反対です。(upstreamの議論を経由したいです)

withFiles: tab.value === 'files',
includeSensitiveChannel: $i != null,
},
Expand Down
Loading