Skip to content

Fix: Dashboard icons appearing over menu bar#2374

Merged
limetech merged 2 commits into
unraid:masterfrom
Squidly271:patch-3
Sep 17, 2025
Merged

Fix: Dashboard icons appearing over menu bar#2374
limetech merged 2 commits into
unraid:masterfrom
Squidly271:patch-3

Conversation

@Squidly271

@Squidly271 Squidly271 commented Sep 17, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Resolved layering issues in dashboard stats so popups, menus, and close buttons display and interact correctly, including when the Sidebar Theme is active.
  • Style
    • Minor CSS housekeeping and formatting cleanup with no other user-visible changes.

@coderabbitai

coderabbitai Bot commented Sep 17, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Lowered z-index values for several DashStats UI elements in CSS and added a trailing newline; added a server-side conditional to set the dialog z-index when the Sidebar Theme is active in DashStats.page.

Changes

Cohort / File(s) Summary
CSS z-index adjustments
emhttp/plugins/dynamix/sheets/DashStats.css
Reduced z-index: a.cpu_close, span.hand from 1001 → 100; .port_view, .control from 10000 → 100. Added trailing newline.
Dialog z-index conditional
emhttp/plugins/dynamix/DashStats.page
In dialogStyle() inserted server-side conditional: if $themeHelper->isSidebarTheme() is true, inject $('.ui-dialog').css({'z-index':'2001'}) to adjust dialog stacking when Sidebar Theme is active.

Sequence Diagram(s)

sequenceDiagram
    participant Page as DashStats.page (server)
    participant Browser as Client
    Note over Page: Existing dialogStyle() JS output
    Browser->>Page: Request page
    Page-->>Browser: HTML + JS (includes dialogStyle)
    alt Sidebar Theme active ($themeHelper->isSidebarTheme() == true)
        Note over Page,Browser #d6f5d6: server injects dialog z-index line
        Browser->>Browser: execute dialogStyle()\nset .ui-dialog z-index to 2001
    else Sidebar Theme not active
        Browser->>Browser: execute dialogStyle()\n(no injected z-index line)
    end
    Browser->>Browser: CSS from DashStats.css applied\n(a.cpu_close, span.hand, .port_view, .control at lower z-index)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibbled styles with careful care,
Lowered heights so layers share.
When the sidebar dresses new,
I tuck the dialog into view.
A tidy hop, a newline sent—
Bunny-crafted tiny patch, content. 🐰✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Fix: Dashboard icons appearing over menu bar" is concise and directly summarizes the primary change in the changeset: adjusting z-index behavior to prevent dashboard icons from overlapping the menu bar. The diffs lower z-index values in DashStats.css for icon-related selectors and add a conditional .ui-dialog z-index in DashStats.page when the Sidebar Theme is active, which aligns with the title's intent. As written, the title is specific and clear enough for a teammate scanning PR history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Sep 17, 2025

Copy link
Copy Markdown

🔧 PR Test Plugin Available

A test plugin has been generated for this PR that includes the modified files.

Version: 2025.09.17.0323
Build: View Workflow Run

📥 Installation Instructions:

Install via Unraid Web UI:

  1. Go to Plugins → Install Plugin
  2. Copy and paste this URL:
https://preview.dl.unraid.net/pr-plugins/pr-2374/webgui-pr-2374.plg
  1. Click Install

Alternative: Direct Download

⚠️ Important Notes:

  • Testing only: This plugin is for testing PR changes
  • Backup included: Original files are automatically backed up
  • Easy removal: Files are restored when plugin is removed
  • Conflicts: Remove this plugin before installing production updates

📝 Modified Files:

Click to expand file list
emhttp/plugins/dynamix/DashStats.page
emhttp/plugins/dynamix/sheets/DashStats.css

🔄 To Remove:

Navigate to Plugins → Installed Plugins and remove webgui-pr-2025.09.17.0323, or run:

plugin remove webgui-pr-2025.09.17.0323

🤖 This comment is automatically generated and will be updated with each new push to this PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
emhttp/plugins/dynamix/sheets/DashStats.css (2)

244-248: Sanity-check stacking vs. header/menu; ensure positioned elements.

z-index: 100 should solve bleed-over, but confirm:

  • The header/menu bar’s z-index is > 100.
  • a.cpu_close and span.hand are positioned (non-static); otherwise z-index is ignored.

If you want to avoid future z-index skirmishes, consider scoping these controls under a local stacking context (e.g., container with position: relative; isolation: isolate).


289-292: Verify interaction with dialogs/tooltips using similar z-layers.

Setting .port_view, .control to z-index: 100 may collide with UI frameworks that also use ~100 for dialogs/tooltips. Please quickly check that:

  • jQuery UI dialogs, menus, or tooltips (if present) still overlay these controls.
  • Hover/click targets in the header remain accessible.

If there’s any conflict, drop these to 90 or raise dialogs header to a higher, centralized token.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ada892e and 3ead1d4.

📒 Files selected for processing (1)
  • emhttp/plugins/dynamix/sheets/DashStats.css (3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: Squidly271
PR: unraid/webgui#0
File: :0-0
Timestamp: 2025-05-31T05:10:13.120Z
Learning: Squidly271 prefers not to receive CodeRabbit reviews or feedback while PRs are in draft status. Only provide reviews after PRs are moved out of draft.
🔇 Additional comments (1)
emhttp/plugins/dynamix/sheets/DashStats.css (1)

528-530: Trailing newline added — good hygiene.

EOF newline helps with POSIX tooling and diffs.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
emhttp/plugins/dynamix/DashStats.page (2)

2030-2033: Also raise the overlay’s z-index to block sidebar clicks when a dialog is open (Sidebar theme).

Only bumping .ui-dialog can leave .ui-widget-overlay beneath the sidebar/menu, allowing unintended interactions. Raise the overlay just below the dialog.

-  <? if ($themeHelper->isSidebarTheme()):?>
-    $('.ui-dialog').css({'z-index':'2001'});
-  <? endif;?>
+  <? if ($themeHelper->isSidebarTheme()):?>
+    // Keep overlay above sidebar but below dialog
+    $('.ui-widget-overlay').css({'z-index':'2000'});
+    $('.ui-dialog').css({'z-index':'2001'});
+  <? endif;?>

Please verify on Sidebar theme:

  • Open “Tile Management” and confirm the sidebar/menu cannot be clicked and visually sits under the dim overlay.
  • Sanity‑check TopNav theme remains unchanged.

2030-2033: Optional: avoid magic numbers and global selector.

Consider centralizing z-index values (CSS var or theme constant) and scoping to the created dialog (e.g., box.parents('.ui-dialog')) instead of all .ui-dialog instances to reduce unintended side effects.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ead1d4 and cb8a00d.

📒 Files selected for processing (1)
  • emhttp/plugins/dynamix/DashStats.page (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: Squidly271
PR: unraid/webgui#0
File: :0-0
Timestamp: 2025-05-31T05:10:13.120Z
Learning: Squidly271 prefers not to receive CodeRabbit reviews or feedback while PRs are in draft status. Only provide reviews after PRs are moved out of draft.

@limetech limetech merged commit d05f8aa into unraid:master Sep 17, 2025
2 checks passed
@Squidly271 Squidly271 deleted the patch-3 branch September 17, 2025 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants