Visitar URL original
Split the site header into leading, navigation and actions partials by senid231 · Pull Request #9149 · activeadmin/activeadmin · GitHub
Skip to content

Split the site header into leading, navigation and actions partials - #9149

Open
senid231 wants to merge 1 commit into
activeadmin:masterfrom
senid231:header-partials
Open

senid231 wants to merge 1 commit into
activeadmin:masterfrom
senid231:header-partials

Conversation

@senid231

@senid231 senid231 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Splits _site_header.html.erb into three partials, so a theme can change one part of the header without copying the rest:

  • _header_leading: the menu button and the site title.
  • _header_navigation: empty by default, for navigation between the title and the actions.
  • _header_actions: the dark mode switch and the user menu.

_site_header keeps its outer element and gains id="site-header", so a theme can restyle the bar without copying it. Each partial holds the markup that was there before, moved without changes.

Part of #9146. I compared the rendered dashboard and index pages before and after. The only difference is the new id.

@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.11%. Comparing base (e1dad93) to head (bdf247f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9149   +/-   ##
=======================================
  Coverage   99.11%   99.11%           
=======================================
  Files         139      139           
  Lines        4071     4071           
=======================================
  Hits         4035     4035           
  Misses         36       36           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

A theme that adds a top menu or header items had to copy the whole
_site_header partial. The header wrapper gets a site-header id so a theme
can restyle it without copying it.

Co-Authored-By: Clanker

This branch has not been deployed

No deployments
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.

1 participant