Repository navigation
fix: mount the viewer into #nc-viewer, not #viewer - #201
Merged
Merged
Conversation
On Nextcloud 35 the viewer app is still on the page, and its styles hide the header and reshape the Files sidebar while a #viewer exists. Its own is the modal, gone once closed, while the library's container stays, so the page was left without a header after the first file opened. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #201 +/- ##
==========================================
- Coverage 89.61% 89.61% -0.01%
==========================================
Files 61 61
Lines 5305 5304 -1
Branches 1150 1150
==========================================
- Hits 4754 4753 -1
Misses 519 519
Partials 32 32 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
susnux
reviewed
Dec 1, 2026
| // hides the header). Its own is the modal, gone once closed; this one stays | ||
| const ViewerRoot = document.createElement('div') | ||
| ViewerRoot.id = 'viewer' | ||
| ViewerRoot.id = 'nc-viewer' |
Contributor
There was a problem hiding this comment.
Do we really need a known name here? We could also just use a random generated ID to prevent clashes?
susnux
approved these changes
Dec 1, 2026
Nothing finds the root again: it is mounted by reference. Without an id nothing can clash with it, and the tests count mounted apps instead. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Nextcloud 35 the viewer app still runs next to the library, and its global styles hide the header and reshape the Files sidebar while any
#viewerexists (body:has(#viewer)). In the app that's the modal, gone once it closes. The library's container stays, so after the first file opened through it the page had no header until a reload.Nothing depended on the id: copies of the library find each other through their shared scope, and the modal is teleported to
body, so no app style reached it through#vieweranyway.Fixes #195
👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.