fix: Enhance DashStats UI: Update select elements for better layout a…#2403
Conversation
…nd styling. Add new CSS rules for network-selects to improve responsiveness and alignment.
WalkthroughUpdates the DashStats page to wrap network-related UI elements in a new container and add specific classes to network selects. Corresponding CSS introduces responsive layout and sizing rules for these selectors within the header area. No logic or control-flow changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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/DashStats.page (1)
501-514: Add accessible labels to selectsThese selects have no associated labels. Add aria-labels for SR users without impacting layout.
- <select name="port_select" class="network-select network-interface" onchange="portSelect(this.value)"> + <select name="port_select" class="network-select network-interface" aria-label="<?=_('Network interface')?>" onchange="portSelect(this.value)"> <?foreach ($ports as $port):?> <?=mk_option("",$port,_($port))?> <?endforeach;?> </select> - <select name="enter_view" class="network-select network-type" onchange="changeView(this.value)"> + <select name="enter_view" class="network-select network-type" aria-label="<?=_('Network view type')?>" onchange="changeView(this.value)"> <?=mk_option("", "0", _("General info"))?> <?=mk_option("", "1", _("Counters info"))?> <?=mk_option("", "2", _("Errors info"))?> <?=mk_option("", "3", _("Network traffic"))?> </select>emhttp/plugins/dynamix/sheets/DashStats.css (1)
58-82: Flex sizing: avoid width:100% on flex item; consider select ellipsis behavior
- Using width: 100% on a flex item can cause overflow in some Safari versions. Prefer a 0% basis and let flex grow.
- text-overflow on native select is inconsistently supported; verify truncation in Safari/iOS and Firefox.
-span.head_gap.network-selects { - width: 100%; - display: flex; - align-items: center; - gap: 1rem; - flex: 1 1 auto; -} +span.head_gap.network-selects { + display: flex; + align-items: center; + gap: 1rem; + flex: 1 1 0%; +} select.network-select { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; + box-sizing: border-box; }Please sanity-check the truncation/overflow on:
- macOS Safari and iOS Safari
- Firefox (latest)
- Edge/Chrome (latest)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
emhttp/plugins/dynamix/DashStats.page(1 hunks)emhttp/plugins/dynamix/sheets/DashStats.css(1 hunks)
⏰ 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)
🧹 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. |
…nd styling. Add new CSS rules for network-selects to improve responsiveness and alignment.
Summary by CodeRabbit