• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MushroomObserver / mushroom-observer / 26633137683
97%
main: 97%

Build:
Build:
LAST BUILD BRANCH: nimmo-account-preferences-phlex
DEFAULT BRANCH: main
Ran 29 May 2026 10:56AM UTC
Jobs 1
Files 1039
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 May 2026 10:52AM UTC coverage: 96.508%. Remained the same
26633137683

Pull #4392

github

nimmolo
## Summary

Converts the top-bar dropdown + mobile sidebar markup builders in `Header::ContextNavHelper` to two Phlex components — `Components::ContextNav::TopBar` (the right-side "Context Actions" dropdown) and `Components::ContextNav::Sidebar` (the `xs`-only collapsible nav). The helper's public API stays the same: views still call `add_context_nav(links)` to populate both `content_for` blocks, and a handful of ERB partials that consumed `context_nav_links(links)` directly (e.g. `users/show/_profile.erb` wraps each link in its own custom `<ul>`) keep that interface too.

## What moved to Phlex

- `add_context_nav_to_top_bar` / `context_nav_dropdown` / `context_nav_dropdown_toggle` / `context_nav_dropdown_menu` → `Components::ContextNav::TopBar`
- `add_context_nav_to_sidebar` / `context_nav_sidebar_links` / `sidebar_nav_link` → `Components::ContextNav::Sidebar`
- The `[text, url, args]`-tuple → HTML dispatch (`button_to` for `:post`, `CrudButton::*` for `:destroy` / `:put` / `:patch`, `link_to` otherwise) lives in `Components::ContextNav::LinkRendering`, a private mixin both components include
- `sidebar_css_classes` (a one-method module — `SidebarHelper` — whose only caller was the sidebar builder) inlines as a `CSS_CLASSES` constant on `Components::ContextNav::Sidebar`

## What stayed in the helper

- `add_context_nav(links)` — the entry-point. Now a 6-line shim that renders the two components into the `content_for` blocks
- `context_nav_links(links, extra_args = {})` — kept for ERB callers that build their own non-dropdown layout
- `context_nav_link(link, extra_args = {})` — the per-link converter
- `merge_context_nav_link_args` / `crud_button_or_link` — supporting methods

The helper module went from ~170 lines to ~85, half-size, but doesn't *just* delegate — it keeps the helper-context (string-returning) version of the link dispatch for ERB callers that need it. The Phlex components have their own emit-to-buffer parallel implementations, which i... (continued)
Pull Request #4392: Header::ContextNavHelper: convert dropdown + sidebar builders to Phlex

75 of 76 new or added lines in 4 files covered. (98.68%)

39553 of 40984 relevant lines covered (96.51%)

667.86 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
92.86
app/components/context_nav.rb
Jobs
ID Job ID Ran Files Coverage
1 26633137683.1 29 May 2026 10:56AM UTC 1039
96.51
GitHub Action Run
Source Files on build 26633137683
  • Tree
  • List 1039
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26633137683
  • Pull Request #4392
  • PR Base - main (#26632455807)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc