IONOS(viewer): NC33 fork release — reinstate IONOS delta (HDNEXT-1585) - #45
Open
printminion-co wants to merge 20 commits into
Open
IONOS(viewer): NC33 fork release — reinstate IONOS delta (HDNEXT-1585)#45printminion-co wants to merge 20 commits into
printminion-co wants to merge 20 commits into
Conversation
printminion-co
force-pushed
the
mk/dev/HDNEXT-1585-viewer-nc33
branch
from
July 24, 2026 12:16
cb416c0 to
8158194
Compare
enable via: ./occ config:app:set --value yes --type string viewer always_show_viewer Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de> (cherry picked from commit 781cfbf)
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de> (cherry picked from commit 939299c)
in order later to use it as default viewer Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de> (cherry picked from commit de2ba4d)
in order later to display it for all not known mime types Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de> (cherry picked from commit 4cfcad5)
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de> (cherry picked from commit c997a3d)
in order to reuse it later Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de> (cherry picked from commit 41daec7)
Signed-off-by: Franziska Bath <franziska.bath@strato.de> (cherry picked from commit 1eeec05)
in order to be able to influence it later Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de> (cherry picked from commit a2072f4)
…hown Signed-off-by: Franziska Bath <franziska.bath@strato.de> (cherry picked from commit e7ac87e)
Don't include directories as they can not be displayed. Note: including directories could also cause a follow-up error with certain directory structures which happen to include a directory named like a number (i.e. 123) because of sloppy, too broad type casting in fileUtils.ts's genFileInfo() accidentally converting such a folder name to a Number, which then can not be used in string comparisons. Signed-off-by: Thomas Lehmann <t.lehmann@strato.de> (cherry picked from commit 4534420)
== The error The text below the mimetype icon has Nextcloud's default text styling, which is dark text on light background, yet here it's dark background. == The fix The default component now defines a text color. Signed-off-by: Thomas Lehmann <t.lehmann@strato.de> (cherry picked from commit 7834768)
== The cause Previously the code attempted to load a preview of an image. If loading this preview image failed it was attempted to load the original image. Load errors of images were only handled _once_. This meant that a load error for the original image was never handled, thus the viewer was still in loading state and showed a browser-dependant "broken image" replacement icon. == The fix Now further image load errors are handled too. In case the original fails too, the loading state is ended and a placeholder text is shown. The default preview component, which was introduced to show something for any mimetype if configured, is now also used as a fallback. Signed-off-by: Thomas Lehmann <t.lehmann@strato.de> (cherry picked from commit 04a1740)
For Safari 16.5/167.3 this fixes different icon sizes for the same mime type, visible when cycling through files with different file names. Signed-off-by: Franziska Bath <franziska.bath@strato.de> (cherry picked from commit ff8f900)
Signed-off-by: Franziska Bath <franziska.bath@strato.de> (cherry picked from commit cc760f4)
Signed-off-by: Franziska Bath <franziska.bath@strato.de> (cherry picked from commit d845ff2)
Signed-off-by: Franziska Bath <franziska.bath@strato.de> (cherry picked from commit f271af9)
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de> (cherry picked from commit 83f3557)
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de> (cherry picked from commit 43284c4)
…efault component Signed-off-by: Franziska Bath <franziska.bath@strato.de> (cherry picked from commit d403b49)
printminion-co
force-pushed
the
mk/dev/HDNEXT-1585-viewer-nc33
branch
from
July 24, 2026 12:30
8158194 to
b5c294d
Compare
There was a problem hiding this comment.
Pull request overview
Reinstates the IONOS-specific Viewer delta on top of upstream Nextcloud Viewer v33.0.6, primarily to support “always show viewer” behavior, default/fallback viewing, and Collabora/office/PDF preview exclusions, with rebuilt frontend assets committed for distribution.
Changes:
- Add an
always_show_viewerconfig module + server-provided initial state, and use it to influence viewer enablement, modal title, handler fallback, grouping, and folder listing behavior. - Introduce a Default handler/component and wire it into the viewer so unsupported mimes can fall back to a default UI.
- Improve image fallback handling (preview → original → default) and harden live photo peer matching; rebuild and commit the generated JS/CSS artifacts.
Reviewed changes
Copilot reviewed 16 out of 38 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/views/Viewer.vue | Uses config to drive modal title, handler/group fallback, folder filtering, and default-component fallback selection. |
| src/utils/livePhotoUtils.ts | Coerces basename to string before startsWith to avoid type-related runtime errors. |
| src/services/Viewer.js | Registers the new Default handler in the viewer’s handler registry. |
| src/models/default.ts | Declares the Default handler mapped to the configured “default” mime type. |
| src/models/config.ts | Loads always_show_viewer from initial state and defines the default mime type constant. |
| src/files_actions/viewerAction.ts | Adjusts file action enabled-logic to support always-show behavior. |
| src/components/Images.vue | Adds a second-stage failure state and renders the Default component when original image load also fails. |
| src/components/Default.vue | Adds a default fallback UI for unsupported/unrenderable items. |
| lib/Listener/LoadViewerScript.php | Provides always_show_viewer initial state from app config to the frontend. |
| js/viewer-main.mjs | Rebuilt main viewer bundle reflecting the new default/always-show behavior. |
| js/previewUtils-BAoIfi1D.chunk.mjs.map.license | Generated license metadata for rebuilt preview utils chunk/map. |
| js/previewUtils-BAoIfi1D.chunk.mjs.license | Generated license metadata for rebuilt preview utils chunk. |
| js/NcModal-BjXpg4f9.chunk.mjs.map.license | Generated license metadata for rebuilt NcModal chunk/map. |
| js/NcModal-BjXpg4f9.chunk.mjs.license | Generated license metadata for rebuilt NcModal chunk. |
| js/NcIconSvgWrapper-Bui9PhAS-BmHHvszF.chunk.mjs.map.license | Generated license metadata for rebuilt NcIconSvgWrapper chunk/map. |
| js/NcIconSvgWrapper-Bui9PhAS-BmHHvszF.chunk.mjs.map | Rebuilt sourcemap for NcIconSvgWrapper chunk. |
| js/NcIconSvgWrapper-Bui9PhAS-BmHHvszF.chunk.mjs.license | Generated license metadata for rebuilt NcIconSvgWrapper chunk. |
| js/NcIconSvgWrapper-Bui9PhAS-BmHHvszF.chunk.mjs | Rebuilt NcIconSvgWrapper chunk. |
| js/NcActionButton-CTBtzndk.chunk.mjs.map.license | Generated license metadata for rebuilt NcActionButton chunk/map. |
| js/NcActionButton-CTBtzndk.chunk.mjs.map | Rebuilt sourcemap for NcActionButton chunk. |
| js/NcActionButton-CTBtzndk.chunk.mjs.license | Generated license metadata for rebuilt NcActionButton chunk. |
| js/NcActionButton-CTBtzndk.chunk.mjs | Rebuilt NcActionButton chunk. |
| js/index-CQjyoCOa.chunk.mjs.map.license | Generated license metadata for rebuilt editor-related index chunk/map. |
| js/index-CQjyoCOa.chunk.mjs.license | Generated license metadata for rebuilt editor-related index chunk. |
| js/index-CQjyoCOa.chunk.mjs | Rebuilt editor-related index chunk. |
| css/viewer-main.css | Updates CSS imports to point at rebuilt chunk filenames. |
| css/viewer-init.css | Updates CSS imports to point at rebuilt chunk filenames. |
| css/main-n63QkgA_.chunk.css | Rebuilt main CSS chunk reflecting updated component scoping/hashes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+36
to
+38
| mounted() { | ||
| this.doneLoading() | ||
| }, |
Comment on lines
+7
to
+9
| <div class="default_container"> | ||
| <img :src="mimeIcon" alt="mimetype-icon"> | ||
| <span class="title"> |
Comment on lines
+110
to
+114
| // Always enabled if configured so | ||
| if (configModule.alwaysShowViewer) { | ||
| // disable for folders | ||
| return !nodes.some(node => node.type === 'folder') | ||
| } |
Comment on lines
+1
to
+5
| /** | ||
| * SPDX-FileLicenseText: 2024 STRATO AG | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| * SPDX-FileContributor: Mikhailo Matiyenko-Kupriyanov <kupriyanov@strato.de> | ||
| */ |
This was referenced Jul 24, 2026
Merged
Author
|
Folded, one-commit-per-feature variant of this PR opened as #46 (byte-identical tree, history reshaped for upstream-readiness). Leaving both open for granular-vs-folded comparison. |
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.
Summary
NC33 IONOS
viewerline: upstream vanillav33.0.6+ cherry-picked IONOS delta.ionos-dev-v33= vanillanextcloud/viewerv33.0.6(app 6.0.0, NC 33).always_show_viewer, remove Collabora (office/pdf) documents from preview, folder/mimetype/preview fixes, and Default-component styling.ionos-dev(previously last maintained onionos-dev-v31.0.6).appinfo/info.xmlalready declaresmax-version="33"— no bump needed.js/,css/) rebuilt with vite (node 24) and committed, as this fork ships built assets.provideInitialState, semicolon-free preview filter) are folded into the commits that introduced them (781cfbf / f271af9) — no follow-up fixup commits.Reconciliation against v33.0.6
Kept (22 commits, reconciled to the v33 defineComponent Viewer.vue + viewerAction.ts structure):
Dropped (with reasons):
^18.3.1.toString()?.localeCompare+isNumber()handlingnpm installagainst v33 depsCI note
static-psalm-analysisfails on a pre-existing base issue, not this delta: the psalm job pullsnextcloud/ocp dev-master, which now requires PHP~8.3, whilecomposer.jsonconfig.platform.phpis8.2(unchanged from vanillav33.0.6—git diff ionos-dev-v33..HEAD -- composer.jsonis empty). Fixing it would mean diverging the vanilla base's platform pin; tracked separately.Consumed by
IONOS-Productivity/nc-server#279via a submodule bump after merge + tag.Linked PRs
apps-external/viewersubmodule bump after merge + tagJira: HDNEXT-1585