Skip to content

Fix dropdown z-index on docker page when clicking on container icon#2639

Open
Joly0 wants to merge 2 commits into
unraid:masterfrom
Joly0:patch-1
Open

Fix dropdown z-index on docker page when clicking on container icon#2639
Joly0 wants to merge 2 commits into
unraid:masterfrom
Joly0:patch-1

Conversation

@Joly0
Copy link
Copy Markdown

@Joly0 Joly0 commented May 14, 2026

Fixes clicking on a docker container when page has many containers the dropdown menu will be behind the footer and even outside the visible area because the scrollbar doesnt extend as far. The fix will make sure that the dropdown will always be in front of the footer if expanded and will increase the height slightly so the dropdown doesnt overlay the footer. Tested on multiple machines across 7.2.6 and 7.3.0

Before:
grafik
After:
grafik

Related to ENG-424

Fixes clicking on a docker container when page has many containers the dropdown menu will be behind the footer and even outside the visible area because the scrollbar doesnt extend as far.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Walkthrough

The Docker manager's container context menu now receives a high z-index value and a hidden spacer element to correct stacking order and ensure the dropdown menu displays correctly above other page elements.

Changes

Docker container dropdown styling

Layer / File(s) Summary
Dropdown z-index and spacer element
emhttp/plugins/dynamix.docker.manager/javascript/docker.js
After the dropdown context menu is attached, z-index is set to 10001 on #dropdown-<id> and a hidden spacer <li> is appended to ensure proper positioning and stacking.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A docker dropdown was hiding behind,
So a spacer and z-index, we find!
Ten thousand and one, a hoppy delight,
Now menus pop up, stacked just right. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing dropdown z-index positioning on the Docker page when interacting with container icons.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@Joly0 Joly0 changed the title Fix dropdown z-index Fix dropdown z-index on docker page when clicking on container icon May 14, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
emhttp/plugins/dynamix.docker.manager/javascript/docker.js (1)

54-55: ⚡ Quick win

Make spacer insertion idempotent.

This append is unconditional. If the context is rebound multiple times, spacer nodes can accumulate on the same dropdown. Add a guard (or remove existing spacer first) before appending.

Proposed change
-  $('#dropdown-'+id).css('z-index', 10001)
-    .append('<li style="position:absolute;top:100%;left:0;width:1px;height:60px;pointer-events:none;list-style:none"></li>');
+  var $dropdown = $('#dropdown-'+id).css('z-index', 10001);
+  $dropdown.find('.docker-dropdown-spacer').remove();
+  $dropdown.append('<li class="docker-dropdown-spacer" style="position:absolute;top:100%;left:0;width:1px;height:60px;pointer-events:none;list-style:none" aria-hidden="true"></li>');
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@emhttp/plugins/dynamix.docker.manager/javascript/docker.js` around lines 54 -
55, The spacer <li> is appended unconditionally to $('#dropdown-'+id) causing
duplicates on rebinding; before appending, check for and remove any existing
spacer (e.g., selector like '#dropdown-'+id + ' > li.spacer' or a unique
attribute/class) or first call .find(...).remove() to ensure idempotency, then
append a single spacer element (add a class or data-attr to the spacer so future
runs can detect and avoid duplicating it).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@emhttp/plugins/dynamix.docker.manager/javascript/docker.js`:
- Around line 54-55: The spacer <li> is appended unconditionally to
$('#dropdown-'+id) causing duplicates on rebinding; before appending, check for
and remove any existing spacer (e.g., selector like '#dropdown-'+id + ' >
li.spacer' or a unique attribute/class) or first call .find(...).remove() to
ensure idempotency, then append a single spacer element (add a class or
data-attr to the spacer so future runs can detect and avoid duplicating it).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5764c60b-af1b-4743-b537-343b73c3f9c8

📥 Commits

Reviewing files that changed from the base of the PR and between b78d577 and d464bda.

📒 Files selected for processing (1)
  • emhttp/plugins/dynamix.docker.manager/javascript/docker.js

@elibosley elibosley added the 7.3 label May 14, 2026
@github-actions
Copy link
Copy Markdown

🔧 PR Test Plugin Available

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

Version: 2026.05.14.1501
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-2639/webgui-pr-2639.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
  • Post-merge behavior: This preview stays available after merge until preview storage expires or it is manually cleaned up

📝 Modified Files:

Click to expand file list
emhttp/plugins/dynamix.docker.manager/javascript/docker.js

🔄 To Remove:

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

plugin remove webgui-pr-2639

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

@elibosley
Copy link
Copy Markdown
Member

Thank you! This looks like a good fix to get in the OS :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants