Skip to content

Commit 8be74e6

Browse files
Keep dashboard quick rail visible during legacy exits
1 parent c9895ef commit 8be74e6

6 files changed

Lines changed: 22 additions & 3 deletions

File tree

archive/folderview.plus-2026.03.22.36.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+
f353f40862ed858eb343e3aa7e30c74ecb02608b220f136600f957b4c4883d09 folderview.plus-2026.03.23.08.txz

folderview.plus.plg

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,19 @@
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.23.07">
10-
<!ENTITY md5 "a0c6c28a46bd8527409895ecbe64e59d">
9+
<!ENTITY version "2026.03.23.08">
10+
<!ENTITY md5 "cb1fb4fda2eb6c3709b71d6b80f83dbc">
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.23.08
17+
- Fix: Kept the Dashboard widget action rail visible from the start of `Legacy` view exits instead of waiting for the async widget rebuild to begin.
18+
- Quality: Cleared per-widget `Legacy` transition state on failed or superseded view switches so quick-rail visibility does not get stuck.
19+
- Test: Expanded Dashboard layout regression coverage for early transition-state activation during `Legacy` view switches.
20+
21+
1622
###2026.03.23.07
1723
- Fix: Kept the Dashboard widget action rail visible during `Legacy` view transitions by tracking per-widget layout rebuild state instead of hiding the rail while cards are temporarily absent.
1824
- Quality: Hardened the Dashboard quick-rail visibility logic so it treats local widget rebuilds as an active state rather than a collapsed/empty widget.

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,10 @@ const handleDashboardWidgetLayoutQuickSwitch = async (type, value) => {
763763
};
764764
const saveToken = (dashboardLayoutPersistTokenByType[resolvedType] || 0) + 1;
765765
dashboardLayoutPersistTokenByType[resolvedType] = saveToken;
766+
if (requiresStructureReload) {
767+
dashboardLayoutTransitionInFlightByType[resolvedType] = true;
768+
scheduleDashboardWidgetVisibilitySyncForType(resolvedType, 0);
769+
}
766770
folderTypePrefs[resolvedType] = utils.normalizePrefs(nextPrefs);
767771
scheduleDashboardLayoutApplyForType(resolvedType);
768772
syncDashboardWidgetLayoutQuickControlForType(resolvedType);
@@ -784,8 +788,16 @@ const handleDashboardWidgetLayoutQuickSwitch = async (type, value) => {
784788
syncDashboardWidgetLayoutQuickControlForType(resolvedType);
785789
} catch (_error) {
786790
if (dashboardLayoutPersistTokenByType[resolvedType] !== saveToken) {
791+
if (requiresStructureReload) {
792+
dashboardLayoutTransitionInFlightByType[resolvedType] = false;
793+
scheduleDashboardWidgetVisibilitySyncForType(resolvedType, 0);
794+
}
787795
return;
788796
}
797+
if (requiresStructureReload) {
798+
dashboardLayoutTransitionInFlightByType[resolvedType] = false;
799+
scheduleDashboardWidgetVisibilitySyncForType(resolvedType, 0);
800+
}
789801
folderTypePrefs[resolvedType] = previousPrefs;
790802
scheduleDashboardLayoutApplyForType(resolvedType);
791803
syncDashboardWidgetLayoutQuickControlForType(resolvedType);

tests/dashboard-layout-regression.test.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ test('dashboard runtime supports layout classes, accordion guards, and overflow
124124
assert.match(dashboardScript, /const applyDashboardLayoutStateForType = \(type\) =>/);
125125
assert.match(dashboardScript, /const scheduleDashboardLayoutApplyForType = \(type\) =>/);
126126
assert.match(dashboardScript, /const requiresStructureReload = previousDashboard\.layout === 'legacy' \|\| nextLayout === 'legacy';/);
127+
assert.match(dashboardScript, /if \(requiresStructureReload\) \{\s*dashboardLayoutTransitionInFlightByType\[resolvedType\] = true;/);
127128
assert.match(dashboardScript, /dashboardLayoutTransitionInFlightByType\[resolvedType\] = true;/);
128129
assert.match(dashboardScript, /dashboardLayoutTransitionInFlightByType\[resolvedType\] = false;/);
129130
assert.match(dashboardScript, /await rerenderDashboardWidgetStructureForType\(resolvedType\);/);

0 commit comments

Comments
 (0)