From 59255e11b8989d1e4f60c222590d2918a61adb54 Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 19 May 2023 09:44:06 +0900 Subject: [PATCH] =?UTF-8?q?perf:=20MkImgWithBlurhash=E3=81=A8MkMediaImage?= =?UTF-8?q?=E3=82=92=E6=9C=80=E9=81=A9=E5=8C=96=20(#10782)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * #10781 * fix tsconfig * fetch image?? * Revert "fetch image??" This reverts commit 0925c28d5a4f328264c39d5591dc736795541683. * wip * Revert "wip" This reverts commit be97c6cb88318bcea441edeeecb69b6d6ed0dd8f. * loading="eager" * loading="eager" 2 * error * wip * wip * wip * wip * clean up * fix * 生成するworkerを1つにする? * clean up * use buraha * wip * smaller width, height * update buraha * clean up * fix * Update MkMediaImage.vue * Update MkImgWithBlurhash.vue * Revert "fix(frontend): センシティブ設定された画像を開くとき一瞬レイアウトが崩れる問題を修正" This reverts commit 41e9aa6f9b03107518224e2ebde8889c64408204. * Update MkMediaList.vue * Update MkMediaList.vue * Update MkMediaList.vue * Update CHANGELOG.md * wait for decode * fix * ? * (test) remove container-type: inline-size; * Revert "(test) remove container-type: inline-size;" This reverts commit 9448e64228428175a3d624c04df1bfad0f59cb69. * container-name * Revert "container-name" This reverts commit 94385d32213a00a06a59fbd2296d6ef1b5f91785. * width: 100%; * improve performance * refactor * wip * WIP * wip * Revert "wip" This reverts commit 36e3b75cab8114e423544b79a8e2df353880f43b. * Revert "WIP" This reverts commit 05b729ef9189aea052ba411ac10f30a46cc668c8. * Revert "wip" This reverts commit 0801e7936116c58154d7cecfea955dd15fa61a77. * #10860 * wip * no worker * Revert "no worker" This reverts commit a9c49e4fb49976958a7594393343d52be0e082d7. * :v: * workerNumber固定は不要 --------- Co-authored-by: syuilo --- CHANGELOG.md | 1 + packages/frontend/package.json | 2 +- .../src/components/MkGalleryPostPreview.vue | 15 +- .../src/components/MkImgWithBlurhash.vue | 196 +++++++++++++----- .../frontend/src/components/MkMediaImage.vue | 55 +++-- .../frontend/src/components/MkMediaList.vue | 65 +++++- .../src/components/global/MkAvatar.vue | 3 +- .../frontend/src/pages/settings/general.vue | 3 +- .../src/scripts/worker-multi-dispatch.ts | 75 +++++++ .../frontend/src/workers/draw-blurhash.ts | 15 ++ packages/frontend/src/workers/test-webgl2.ts | 7 + packages/frontend/src/workers/tsconfig.json | 5 + packages/frontend/vite.config.ts | 4 + pnpm-lock.yaml | 12 +- 14 files changed, 367 insertions(+), 91 deletions(-) create mode 100644 packages/frontend/src/scripts/worker-multi-dispatch.ts create mode 100644 packages/frontend/src/workers/draw-blurhash.ts create mode 100644 packages/frontend/src/workers/test-webgl2.ts create mode 100644 packages/frontend/src/workers/tsconfig.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 03b1bb4e2..972958963 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,6 +103,7 @@ Meilisearchの設定に`index`が必要になりました。値はMisskeyサー * 画像が全て隠れた状態で表示されるようになります - 閲覧注意設定された画像は表示した状態でもそれが閲覧注意だと分かる表示をするように - モデレーターはノートに添付された画像上から直接NSFW設定できるように +- 1枚だけのメディアリストの画像のアスペクト比を画像に応じて縦長にするように - プロフィール設定「追加情報」の項目の削除と並び替えができるように - 新しい実績を追加 - AiScriptを0.13.2に更新 diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 7e6c1442b..2f754f8aa 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -25,9 +25,9 @@ "@vue-macros/reactivity-transform": "0.3.7", "@vue/compiler-sfc": "3.3.2", "autosize": "6.0.1", - "blurhash": "2.0.5", "broadcast-channel": "4.20.2", "browser-image-resizer": "github:misskey-dev/browser-image-resizer#v2.2.1-misskey.3", + "buraha": "github:misskey-dev/buraha", "canvas-confetti": "1.6.0", "chart.js": "4.3.0", "chartjs-adapter-date-fns": "3.0.0", diff --git a/packages/frontend/src/components/MkGalleryPostPreview.vue b/packages/frontend/src/components/MkGalleryPostPreview.vue index 4f8f7b945..fccc33dcc 100644 --- a/packages/frontend/src/components/MkGalleryPostPreview.vue +++ b/packages/frontend/src/components/MkGalleryPostPreview.vue @@ -5,12 +5,9 @@