Migrate off the OCA.Viewer global before Nextcloud 36
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 86/100
- Tipo de issue
- Refactorización
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, php
- Área
- backend
Línea de trabajo
Comienza en lib/Controller/PageController.php, en el import y en el dispatch de LoadViewer alrededor de las líneas 18 y 71-72. Confirma que Notes no tiene llamadas de JavaScript a OCA.Viewer; después elimina la integración obsoleta del visor y verifica que los checks o tests del proyecto pasen; se considera hecho cuando aquí ya no sea necesario ningún código de habilitación de LoadViewer o viewer-app.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- JavaScript
- Estrellas
- 739
- Forks
- 162
- Merge medio
- 15 h 2 min
- PR fusionados (30 d)
- 37
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nextcloud/notes
-
bug need to reproduce
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
bug need to reproduce
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
bug need to reproduce
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
feature request needs discussion
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
nextcloud/notes#1344 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
0. Needs triage enhancement feature request needs discussion
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
Todos los issues de nextcloud/notes
Issues similares
-
[BUG]: Prompt compressor crashes with TypeError when a past chat has a non-string response.textPosiblemente ocupada @ManojDevarajulu la tomó hoy. Abiertopossible bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Mintplex-Labs/anything-llm#6737 ·
Los mantenedores suelen responder en 1 día
-
Add: Tooncast brazil feedAbiertocheck:passed feeds:add
Dificultad 2/5 Menos de una hora Aptitud para principiantes 62/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
codex-team/editor.js#3037 ·
-
No Code Attached Yet
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
joomla/joomla-cms#48626 ·
Los mantenedores suelen responder en 1 día
-
complexity: trivial good first issue impact: low
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
ueberdosis/tiptap#8522 ·
Los mantenedores suelen responder en 1 día