Skip to content

Commit f875112

Browse files
Fix nested preview quick actions
1 parent de7fd12 commit f875112

6 files changed

Lines changed: 17 additions & 13 deletions

File tree

archive/folderview.plus-2026.03.27.09.txz.sha256

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1b598d8af54967e0ca36a56e46e47d526f033664e0c6a6439645919061d7496f folderview.plus-2026.03.29.08.txz

folderview.plus.plg

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,18 @@
66
<!ENTITY launch "Settings/FolderViewPlus">
77
<!ENTITY plugdir "/usr/local/emhttp/plugins/&name;">
88
<!ENTITY pluginURL "https://raw.githubusercontent.com/&github;/dev/folderview.plus.plg">
9-
<!ENTITY version "2026.03.29.07">
10-
<!ENTITY md5 "0d0c50ec4da1ed297a6d44ac6107bebf">
9+
<!ENTITY version "2026.03.29.08">
10+
<!ENTITY md5 "0adecf12cab94dea247535329443d9bb">
1111
]>
1212

1313
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;" icon="folder-icon.png" support="https://forums.unraid.net/topic/197631-plugin-folderview-plus/" min="7.0.0">
1414
<CHANGES>
1515

16+
###2026.03.29.08
17+
- Fix: Stop nested Docker parent previews from forcing WebUI, console, and logs quick-action icons when those preview actions are disabled.
18+
- Quality: Add a regression guard that keeps nested preview quick actions aligned with the folder's own preview settings.
19+
20+
1621
###2026.03.29.07
1722
- Fix: Preserve dragged Docker folder order across refreshes instead of re-sorting folder placeholders back to folder definition order.
1823
- Quality: Add regression coverage for Docker runtime folder-slot repair and server-side order sync placeholder preservation.

src/folderview.plus/usr/local/emhttp/plugins/folderview.plus/scripts/docker.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4182,13 +4182,10 @@ const renderNestedAggregatePreview = (id, folder, runtimeContainers) => {
41824182
return;
41834183
}
41844184
const entries = Object.values(runtimeContainers || {});
4185-
const nestedParentPreview = folderHasChildren(id);
41864185
const quickActionPrefs = folder?.settings || {};
4187-
// Compatibility fallback: for nested parent previews, always expose quick actions
4188-
// so root-level members keep the same operational affordances.
4189-
const allowWebuiQuickAction = nestedParentPreview || quickActionPrefs.preview_webui === true;
4190-
const allowConsoleQuickAction = nestedParentPreview || quickActionPrefs.preview_console === true;
4191-
const allowLogsQuickAction = nestedParentPreview || quickActionPrefs.preview_logs === true;
4186+
const allowWebuiQuickAction = quickActionPrefs.preview_webui === true;
4187+
const allowConsoleQuickAction = quickActionPrefs.preview_console === true;
4188+
const allowLogsQuickAction = quickActionPrefs.preview_logs === true;
41924189
$preview.empty();
41934190
for (const entry of entries) {
41944191
const { $item: item } = buildDockerPreviewItem({

tests/ui-smoke-layout.test.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,12 @@ test('nested folder expansion avoids duplicate parent previews and keeps child-o
348348
assert.match(dockerJs, /shell:\s*ct\.info\.Shell \|\| '\/bin\/sh'/);
349349
assert.match(dockerJs, /openTerminal\('docker', containerName, shellValue\);/);
350350
assert.match(dockerJs, /openTerminal\('docker', containerName, '\.log'\);/);
351-
assert.match(dockerJs, /const nestedParentPreview = folderHasChildren\(id\);/);
352-
assert.match(dockerJs, /const allowWebuiQuickAction = nestedParentPreview \|\| quickActionPrefs\.preview_webui === true;/);
353-
assert.match(dockerJs, /const allowConsoleQuickAction = nestedParentPreview \|\| quickActionPrefs\.preview_console === true;/);
354-
assert.match(dockerJs, /const allowLogsQuickAction = nestedParentPreview \|\| quickActionPrefs\.preview_logs === true;/);
351+
assert.match(dockerJs, /const allowWebuiQuickAction = quickActionPrefs\.preview_webui === true;/);
352+
assert.match(dockerJs, /const allowConsoleQuickAction = quickActionPrefs\.preview_console === true;/);
353+
assert.match(dockerJs, /const allowLogsQuickAction = quickActionPrefs\.preview_logs === true;/);
354+
assert.doesNotMatch(dockerJs, /nestedParentPreview \|\| quickActionPrefs\.preview_webui === true/);
355+
assert.doesNotMatch(dockerJs, /nestedParentPreview \|\| quickActionPrefs\.preview_console === true/);
356+
assert.doesNotMatch(dockerJs, /nestedParentPreview \|\| quickActionPrefs\.preview_logs === true/);
355357
assert.match(dockerJs, /const shouldRenderPreviewWebuiPlaceholder = \(settings = \{\}, webuiQuickActionEnabled = false\) =>/);
356358
assert.match(dockerJs, /const appendPreviewWebuiPlaceholder = \(\$target\) =>/);
357359
assert.match(dockerJs, /const hasUnresolvedWebuiTemplateTokens = \(value\) =>/);

0 commit comments

Comments
 (0)