Skip to content

Fix nav dropdown bare link_to children rendering inline - #155

Merged
tylercschneider merged 2 commits into
mainfrom
feat/nav-dropdown-bare-links
Jul 1, 2026
Merged

Fix nav dropdown bare link_to children rendering inline#155
tylercschneider merged 2 commits into
mainfrom
feat/nav-dropdown-bare-links

Conversation

@tylercschneider

Copy link
Copy Markdown
Collaborator

Summary

ui_nav_dropdown's documented API passes bare link_to children (direct <a> children, not wrapped in ul/li). But .nav-dropdown-menu only styled li a, so bare anchors got no display:block/padding and rendered inline — running together and wrapping (e.g. "Biz Owner Sales Associate Fulfillment").

Changes (CSS only)

  • Style direct anchor children (& > a) alongside li a in .nav-dropdown-menu, so the documented bare-link_to usage renders as proper stacked rows.
  • Add white-space: nowrap so menu items don't wrap.

POST items (link_to label, path, data: { turbo_method: :post }) render an <a>, so this fix covers persona sign-in / sign-out / impersonation links too.

Testing

  • Extended test/keystone/nav_css_test.rb (two new assertions, one per behavior, TDD).
  • Full suite green: 428 runs, 1122 assertions, 0 failures.

Closes #139

🤖 Generated with Claude Code

tylercschneider and others added 2 commits July 1, 2026 14:32
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tylercschneider
tylercschneider merged commit ca5f7e7 into main Jul 1, 2026
4 checks passed
@tylercschneider
tylercschneider deleted the feat/nav-dropdown-bare-links branch July 1, 2026 18:41
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.

ui_nav_dropdown: bare link_to children render inline/wrap (CSS only styles li a)

1 participant