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 3 times, most recently from ee2ce43 to 1eb1bb7 Compare December 24, 2025 15:09
Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
@hweihwang hweihwang force-pushed the fix/public-share-viewer-for-nc29 branch from 1eb1bb7 to 528d206 Compare December 24, 2025 16:18
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.

3 participants