Skip to content

Fix: draw a settings separator only between rows that are visible - #19

Merged
SandObserver merged 1 commit into
mainfrom
fix/row-separator-last-visible
Aug 10, 2026
Merged

SandObserver merged 1 commit into
mainfrom
fix/row-separator-last-visible

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Replace .row:last-child{border-bottom:none} with .row:not(:has(~ .row:not(.d-none))){border-bottom:none}, so the exemption follows the last row the user can actually see.
  • Hide the four conditional rows (#ie-pw, #sec-revoke-row, #ie-socket, #srv-hide-healthy-row) with the existing .d-none class instead of style="display:none", and switch the seven style.display toggles in admin.js and admin-settings.js to classList.toggle('d-none', …). A selector cannot see an inline style, so this is what makes the rule answerable.
  • Delete .row.drow:last-child{border-bottom:none}: the new rule covers it, and the drag ghost is appended to document.body rather than as a sibling, so it cannot affect the list.
  • :has() is Safari 15.4, inside the documented 16.2 floor.

Why not the one-line version: .row + .row { border-top } would fix Security, but leaves a stray border if a group's first row is ever the hidden one. This asks the real question instead.

Testing
All green: 1055 backend, 553 frontend, lint, format, both typechecks, cache-busting check. Added 4 tests covering the rule, the markup, the JS toggles and the .d-none definition; mutation-checked all three halves by restoring the :last-child rule, hiding a row inline, and reverting a JS toggle.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.
  • CHANGELOG.md updated under Unreleased if the change is user-visible.

The exemption was .row:last-child, which asks about position in the DOM. The
Security group ends with two rows that stay hidden until password protection is
on, so the exemption landed on a hidden row and Password Protection drew a
border under itself with nothing beneath it.

A selector cannot see an inline display, so the four rows that hide now carry
d-none and the seven places that toggled them set the class. The rule asks
whether any later row is visible, which also makes the drow copy of it
redundant.
@SandObserver SandObserver added the ui/ux UI, UX, and accessibility only fix label Aug 10, 2026
@SandObserver
SandObserver merged commit 1d53201 into main Aug 10, 2026
4 checks passed
@SandObserver
SandObserver deleted the fix/row-separator-last-visible branch August 10, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui/ux UI, UX, and accessibility only fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant