Fix: Buttons on plugins tab overlap#2388
Conversation
WalkthroughA single UI change updates the DOM insertion target for plugin control elements in emhttp/plugins/dynamix.plugin.manager/Plugins.page, switching from the .tabs selector to .tabs-container during initialization. The buttons and their behavior remain unchanged. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant P as Plugins.page
participant D as DOM (.tabs-container)
U->>P: Load Plugins page
activate P
Note over P: Initialization
P->>D: Append "Check For Updates", "Update All", "Remove Selected" controls
deactivate P
U->>D: Click a control
D-->>P: Trigger existing handlers (unchanged)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Comment |
🔧 PR Test Plugin AvailableA test plugin has been generated for this PR that includes the modified files. Version: 📥 Installation Instructions:Install via Unraid Web UI:
Alternative: Direct Download
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
emhttp/plugins/dynamix.plugin.manager/Plugins.page (2)
148-150: Add a resilient fallback if .tabs-container isn’t presentDefensive selection avoids silently missing controls on layouts that don’t render
.tabs-container(and aligns with prior guidance to use.title .rightwhen tabs markup differs).Apply this diff:
- $('.tabs-container').append("<span id='checkall' class='status vhshift'><input type='button' value=\"_(Check For Updates)_\" onclick='openPlugin(\"checkall\",\"_(Plugin Update Check)_\",\":return\")' disabled></span>"); - $('.tabs-container').append("<span id='updateall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value=\"_(Update All Plugins)_\" onclick='updateList()'></span>"); - $('.tabs-container').append("<span id='removeall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value=\"_(Remove Selected Plugins)_\" onclick='removeList()'></span>"); + const $dest = $('.tabs-container').length ? $('.tabs-container') + : ($('.title .right').length ? $('.title .right') : $('.tabs')); + $dest.append( + "<span id='checkall' class='status vhshift'><input type='button' value=\"_(Check For Updates)_\" onclick='openPlugin(\"checkall\",\"_(Plugin Update Check)_\",\":return\")' disabled></span>" + + "<span id='updateall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value=\"_(Update All Plugins)_\" onclick='updateList()'></span>" + + "<span id='removeall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value=\"_(Remove Selected Plugins)_\" onclick='removeList()'></span>" + );
149-150: Avoid inline left margins; prefer logical spacing or a CSS ruleInline
margin-left:12pxcan misbehave in RTL and at tight widths. Consider a CSS rule or logical property:For example (in CSS):
.tabs-container .status + .status { margin-inline-start: 12px; }and drop the inline styles here.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
emhttp/plugins/dynamix.plugin.manager/Plugins.page(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: zackspear
PR: unraid/webgui#2354
File: emhttp/plugins/dynamix/ShareEdit.page:0-0
Timestamp: 2025-09-05T19:26:36.587Z
Learning: In emhttp/plugins/dynamix/ShareEdit.page, the clone-settings div was moved outside the form element and both are wrapped in a div.relative container to prevent event bubbling issues while maintaining proper positioning.
Learnt from: zackspear
PR: unraid/webgui#2258
File: emhttp/plugins/dynamix/DashStats.page:0-0
Timestamp: 2025-06-21T00:10:40.789Z
Learning: In the Unraid webgui codebase (emhttp/plugins/dynamix), replacing `<i>` elements with `<button>` elements for accessibility would require extensive CSS refactoring due to legacy CSS having direct button styles that would conflict with icon-based toggles.
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.
📚 Learning: 2025-09-05T19:26:36.587Z
Learnt from: zackspear
PR: unraid/webgui#2354
File: emhttp/plugins/dynamix/ShareEdit.page:0-0
Timestamp: 2025-09-05T19:26:36.587Z
Learning: In emhttp/plugins/dynamix/ShareEdit.page, the clone-settings div was moved outside the form element and both are wrapped in a div.relative container to prevent event bubbling issues while maintaining proper positioning.
Applied to files:
emhttp/plugins/dynamix.plugin.manager/Plugins.page
📚 Learning: 2025-05-22T20:15:34.297Z
Learnt from: zackspear
PR: unraid/webgui#2203
File: emhttp/plugins/dynamix/include/DefaultPageLayout/HeadInlineJS.php:345-356
Timestamp: 2025-05-22T20:15:34.297Z
Learning: Status updates from the showStatus function should be appended to $('.title .right') rather than $('.tabs') as this element is created by MainContentTabless. This ensures status messages appear in the correct location in the UI layout.
Applied to files:
emhttp/plugins/dynamix.plugin.manager/Plugins.page
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
emhttp/plugins/dynamix.plugin.manager/Plugins.page (1)
148-150: LGTM: moving controls to .tabs-container fixes the overlapThis change should resolve the z-index/flow clash with the tab strip; IDs and downstream logic still work as before.
Please sanity-check in light and dark themes at 125–150% zoom and with long translated labels to confirm no wrapping/regression.
|
@coderabbitai. tabs-container is always present. inline style removal is outside the scope of this quick fix |
|
Tip For best results, initiate chat on the files or code changes. @Squidly271 Thank you for the clarification! I understand that ✏️ Learnings added
🧠 Learnings used |
🧹 PR Test Plugin Cleaned UpThe test plugin and associated files for this PR have been removed from the preview environment. 🤖 This comment is automatically generated when a PR is closed. |
Summary by CodeRabbit