Skip to content

Conversation

@hweihwang
Copy link
Contributor

@hweihwang hweihwang commented Dec 17, 2025

Summary

Public share links to whiteboard files on Nextcloud 29 render inside the legacy files_sharing public preview container (#preview/#imgframe), which has its own header/footer and constrained layout. This causes the whiteboard to look boxed and misaligned compared to NC32+.
This change opens public whiteboard shares via the Nextcloud Viewer modal for a consistent fullscreen experience.

Root Cause

On NC29, the whiteboard embeds inside #imgframe which has constrained dimensions (height: 75%, width: 80%, padding: 32px). NC32+ rewrote files_sharing to automatically trigger Viewer for file shares, but NC29's public.js only auto-opens Viewer for image/video/audio - not custom MIME types like whiteboard.
A CSS-only fix doesn't work because hiding the header breaks the height: 100% cascade throughout the legacy template structure.

Solution

  • Register the whiteboard Viewer handler on public share pages
  • Call viewerApi.openWith('whiteboard', ...) to open in a fullscreen Viewer modal
  • Fallback to embedded rendering if Viewer is unavailable
  • Add scoped CSS to hide header/footer and adjust Viewer styling
  • Skip script injection on password prompt pages

Scope

  • Only affects public shares of whiteboard files
  • Non-whiteboard public shares and authenticated Viewer behavior unchanged

@juliusknorr juliusknorr added the bug Something isn't working label Dec 17, 2025
@hweihwang hweihwang force-pushed the fix/public-share-viewer-for-nc29 branch 4 times, most recently from 1eb1bb7 to 528d206 Compare December 24, 2025 16:18
@silverkszlo silverkszlo self-requested a review January 7, 2026 09:47
@hweihwang hweihwang force-pushed the fix/public-share-viewer-for-nc29 branch from 528d206 to cd3f593 Compare January 8, 2026 13:32
@silverkszlo silverkszlo force-pushed the fix/public-share-viewer-for-nc29 branch from cd3f593 to 9dd07da Compare January 13, 2026 10:28
Copy link
Contributor

@silverkszlo silverkszlo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested the UI. Seems to work, thank you! :)

@hweihwang hweihwang merged commit 2656024 into main Jan 13, 2026
31 checks passed
@hweihwang hweihwang deleted the fix/public-share-viewer-for-nc29 branch January 13, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants