Migrate off the OCA.Viewer global before Nextcloud 36
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, php
- 領域
- backend
調査の方向性
lib/Controller/PageController.php の import と、18 行目および 71-72 行目付近の LoadViewer の dispatch から開始します。Notes に OCA.Viewer の JavaScript 呼び出しがないことを確認し、その後、不要になった viewer 統合を削除して、プロジェクトの check または test が通ることを確認します。ここで LoadViewer または viewer-app の有効化コードが残っていなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Notes dispatches the viewer's load event:
lib/Controller/PageController.php:18:use OCA\Viewer\Event\LoadViewer;lib/Controller/PageController.php:71:if (\OCP\Server::get(IAppManager::class)->isEnabledForUser('viewer') && class_exists(LoadViewer::class))lib/Controller/PageController.php:72:$this->eventDispatcher->dispatchTyped(new LoadViewer())
[!NOTE]
This one is not urgent. Theclass_exists()guard means the dispatch is skipped rather than
fatal once the class is gone, so nothing breaks. It just becomes dead code, along with the
isEnabledForUser('viewer')check, since there is no viewer app to enable and importing
@nextcloud/vieweris what puts the viewer on a page now.
Notes does not call OCA.Viewer from javascript, so there is nothing else to port here.
OCA.Viewer is gone in Viewer 7.0.0. The viewer ships as the
@nextcloud/viewer library rather than a
bundled app, and nextcloud/server#63954 removes the viewer app from Nextcloud 36 altogether.
Roughly what it looks like:
import { canView, getViewer } from '@nextcloud/viewer'
// OCA.Viewer.open({ path }) / ({ fileInfo, list })
getViewer().open(nodes, file) // @nextcloud/files nodes
getViewer().openFolder(folder, file) // when a path is all you have, let it fetch
// OCA.Viewer.mimetypes.includes(mime) / availableHandlers
canView(node)
The part that is not a rename is that the viewer takes @nextcloud/files nodes now, not
fileinfo objects or path strings. Importing the package is also all it takes to get the viewer
onto the page: no LoadViewer event to dispatch, and nothing to check about whether the app is
enabled.
[!IMPORTANT]
There is no compatibility shim, which was a deliberate call, so this is a real port rather
than a rename. Nothing breaks until the server PR lands; after that these calls throw on
Nextcloud 36.
[!TIP]
The developer manual covers the migration under
Critical changes
(being added in nextcloud/documentation#15597), and the
README
has the full before/after table. Happy to help with the port, just ping me.
👾 This issue was written with the help of Claude Code.
- 主要言語
- JavaScript
- スター
- 739
- フォーク
- 162
- 平均マージ
- 15時間 2分
- マージ済み PR(30日)
- 37
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextcloud/notes のほかの issue
-
bug need to reproduce
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
bug need to reproduce
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
bug need to reproduce
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
feature request needs discussion
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
nextcloud/notes#1344 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
0. Needs triage enhancement feature request needs discussion
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
nextcloud/notes の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
sallowayma-git/IELTS-practice#248 ·
メンテナーはふだん 1 日以内に返信
-
a11y data import fails with "missing --authors parameter" (npm drops flags in `bin/configure.js`)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Emanuele-web04/remodex#203 ·
メンテナーはふだん 1 日以内に返信
-
needs-human work-class: mechanical
難易度 2/5 半日 初心者へのやさしさ 84/100
melodic-software/claude-code-plugins#7994 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
keyxmakerx/Chronicle#1532 ·
メンテナーはふだん 1 日以内に返信