Skip to content

Add --aa-header-height variable for the site header height - #9152

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

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

Conversation

@senid231

@senid231 senid231 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Adds a --aa-header-height CSS variable, set by the plugin to calc(var(--spacing) * 16). Three places hardcoded the same height as h-16: the site header, the layout's top padding, and the side menu's top offset. They now read the variable.

A theme with a shorter header sets the variable in active_admin.css instead of copying the layout, the header, and the navigation.

Part of #9146. The computed sizes are unchanged. The HTML differs only in the class names.

@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 (f3e05ba).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9152   +/-   ##
=======================================
  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.

@senid231

Copy link
Copy Markdown
Contributor Author

CI failed only in the test (3.4, rails_81) job (https://github.com/activeadmin/activeadmin/actions/runs/43208254388/job/131148850894). Headless Chrome on the runner timed out (Browser did not produce websocket url within 30 seconds, Timed out waiting for a response to Target.createTarget), so a few cucumber scenarios failed while opening a page. The other test jobs and all RSpec examples passed.

Could a maintainer re-run the failed job? I don't have permission to.

The header height was hardcoded as h-16 in the header, the layout padding and the side menu offset, so a theme with a shorter header had to copy all three files.

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