Skip to content

feat: open whiteboards in the viewer of Nextcloud 36 - #1374

Open
skjnldsv wants to merge 2 commits into
mainfrom
feature/migrate-new-viewer-api
Open

skjnldsv wants to merge 2 commits into
mainfrom
feature/migrate-new-viewer-api

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Oct 7, 2026

Copy link
Copy Markdown
Member

In Nextcloud 36 the viewer is part of the server as @nextcloud/viewer. It takes handlers as custom elements, and nothing dispatches LoadViewer or offers OCA.Viewer.registerHandler any more, so whiteboards no longer open in the viewer on master.

On 36, an init script now registers a <whiteboard-viewer> element on every page. The element renders the board as before, and is defined the first time a board opens. Servers up to 35 keep the viewer app path. The first commit stops the end-to-end setup from installing the viewer app on master: it failed reading the app's checkout, so no test has run against master since the merge.

The element tells it is embedded (read-only) when it sits outside the viewer modal, and that it is being compared when it sits in the comparison view. Both are found from the viewer's class names, as the old code did with .viewer__content. On 36, Text's editor loader for tables now loads on every page, not only in Files.

The listener has unit tests. I checked opening a board and an older version on a master instance. The link preview in Text and Talk needs nextcloud-libraries/nextcloud-viewer#97 and a server change first, so it is untested. Escape inside the board closes the viewer because of a @nextcloud/vue hotkey bug.

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

The viewer is part of the server from 36: the setup installed the app anyway and then failed reading its checkout, so no end-to-end test ran against master.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
@skjnldsv skjnldsv added enhancement New feature or request 3. to review labels Oct 7, 2026
@skjnldsv skjnldsv self-assigned this Oct 7, 2026
@skjnldsv
skjnldsv force-pushed the feature/migrate-new-viewer-api branch from cd789cf to 9addf41 Compare October 7, 2026 08:56
The viewer moved into the server as @nextcloud/viewer, which takes handlers
as custom elements and no longer dispatches LoadViewer or offers
OCA.Viewer.registerHandler. On 36 and up, a small init script now registers
a <whiteboard-viewer> element on every page, defined the first time a
board opens. It renders the board as before: read-only outside the viewer
(the preview of a link to the file) and side by side with another version,
and an older version from its own source.

Servers up to 35 keep the viewer app's LoadViewer path. The main script
skips its legacy registration on 36, where it still runs as the board
shares chunks with it.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant