Skip to content

enhance(frontend): UploaderItemsの詳細メニューからもプレビューを起動できるように - #17811

Merged
syuilo merged 2 commits into
misskey-dev:developfrom
kakkokari-gtyih:fix-17810
Jul 27, 2026
Merged

enhance(frontend): UploaderItemsの詳細メニューからもプレビューを起動できるように#17811
syuilo merged 2 commits into
misskey-dev:developfrom
kakkokari-gtyih:fix-17810

Conversation

@kakkokari-gtyih

@kakkokari-gtyih kakkokari-gtyih commented Jul 27, 2026

Copy link
Copy Markdown
Member

What

アップローダーの「…」側にも「プレビュー」ボタンを付けると良さそう

をやった

Why

Fix #17810

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md 同一リリースのためCHANGELOGなし
  • (If possible) Add tests

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 27, 2026
@github-actions github-actions Bot added the packages/frontend Client side specific issue/PR label Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

アップロード項目にプレビュー用objectUrlを追加し、生成・更新・破棄をuseUploaderへ集約しました。ライトボックスはコンポーネント独自のURL管理を廃止し、項目が保持するURLを参照します。

Changes

アップロードURL管理

Layer / File(s) Summary
objectUrl契約と初期化
packages/frontend/src/composables/use-uploader.ts
UploaderItemobjectUrlを追加し、ファイル初期化時にサムネイルと共有するURLを生成して保持します。
URLの更新と破棄
packages/frontend/src/composables/use-uploader.ts
削除、画像編集、画像・動画の前処理、リセット処理で、objectUrlとサムネイルURLを共通ヘルパーにより更新・破棄します。
ライトボックスプレビュー連携
packages/frontend/src/components/MkUploaderItems.vue, packages/frontend/src/composables/use-uploader.ts
objectUrlMapを削除し、UploaderItem.objectUrlからライトボックスのContentを構築します。

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Poem

URLは項目に宿り、
サムネイルと手をつなぐ。
編集されても、前処理されても、
古い姿は静かに消え、
ライトボックスに光が灯ります。

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #17810 の目的どおり、詳細メニューから lightbox を起動できるようになっています。
Out of Scope Changes check ✅ Passed プレビュー起動に必要な objectUrl 管理の追加で、目的に直接関連する範囲に収まっています。
Title check ✅ Passed 詳細メニューからプレビューを起動できるようにする変更を端的に表しており、内容と一致しています。
Description check ✅ Passed What/Why/Checklist が揃っており、目的と変更内容も確認できるためテンプレート要件を満たしています。
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 13.97%. Comparing base (e897255) to head (b0244d3).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
packages/frontend/src/composables/use-uploader.ts 0.00% 27 Missing and 2 partials ⚠️
...ckages/frontend/src/components/MkUploaderItems.vue 0.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #17811       +/-   ##
============================================
- Coverage    26.55%   13.97%   -12.58%     
============================================
  Files         1183      248      -935     
  Lines        40410    12034    -28376     
  Branches     11192     4042     -7150     
============================================
- Hits         10731     1682     -9049     
+ Misses       23815     8115    -15700     
+ Partials      5864     2237     -3627     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@syuilo
syuilo merged commit 703aa23 into misskey-dev:develop Jul 27, 2026
24 checks passed
@syuilo

syuilo commented Jul 27, 2026

Copy link
Copy Markdown
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages/frontend Client side specific issue/PR size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Development

Successfully merging this pull request may close these issues.

アップロード前の画像とドライブから添付した画像で画像プレビューの起動方法が違う

2 participants