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: relax the condition to collapse note (experimental) #241

Merged
merged 1 commit into from
Dec 29, 2024
Merged
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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
### Server
- Fix: ユーザーのプロフィール画面をアドレス入力などで直接表示した際に概要タブの描画に失敗する問題の修正( #15032 )

### Client
- Enhance: ノートの表示がTL上で畳まれる条件を緩和(実験的)\
緩和後の条件は次の通りです。
- ノートに`$[x2`, `$[x3`, `$[x4`, `$[scale`が含まれる
- ノートの行数が10行を超える (Misskey標準: 9行を超える)
- ノートの文字数が500文字を超える
- ノート内のURL数(プレビューあり)が4つを超える (Misskey標準: 3つを超える)
- ノートの添付ファイル数が8つを超える (Misskey標準: 4つを超える)

## 2024.11.0-kinel.1
## 2024.11.0 (merged to 2024.11.0-kinel.1)

Expand Down
6 changes: 3 additions & 3 deletions packages/frontend-shared/js/collapsed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export function shouldCollapsed(note: Misskey.entities.Note, urls: string[]): bo
(note.text.includes('$[x3')) ||
(note.text.includes('$[x4')) ||
(note.text.includes('$[scale')) ||
(note.text.split('\n').length > 9) ||
(note.text.split('\n').length > 10) ||
(note.text.length > 500) ||
(urls.length >= 4)
)) || (note.files != null && note.files.length >= 5)
(urls.length > 4)
)) || (note.files != null && note.files.length > 8)
);

return collapsed;
Expand Down
Loading