Skip to content

Sidebar: the released version below the menu's last item, never over it - #20

Merged
bpacholek merged 1 commit into
mainfrom
fix/release-below-menu
Oct 22, 2026
Merged

bpacholek merged 1 commit into
mainfrom
fix/release-below-menu

Conversation

@bpacholek

Copy link
Copy Markdown
Contributor

What this changes

The released version (options.released_version, #18) no longer covers the end of a long menu (recomaty/recomaty-panel#650).

What that gives, as asked:

  • a) menu taller than the window: the version comes right after the last item and scrolls with the menu. It stays out of sight until the menu is scrolled to its end.
  • b) menu shorter than the window: the version sits at the bottom of the sidebar. The box now takes the rest of the sidebar's height (flex: 1 1 auto; min-height: 0), and the badge's margin-top: auto takes the free space above it.
  • The collapsed rail still hides it. With no version, nothing is drawn.

Contract

  • No block, option or class removed or renamed. adminata_sidebar_release keeps its name and moves into the box; .adm-sidebar-nav now grows.
    • An app that put its own content in the box after the menu (side_bar_after_nav) still sees it there. That card's mt-auto now actually moves it down, as upstream intended.
  • CHANGELOG: the unreleased entry from Sidebar: the application's released version at the foot of the rail #18 is corrected (same day).
  • No Bootstrap/AdminLTE class, no jQuery, no inline script added.

Gates

Run locally:

  • make lint: CS-Fixer and check-names clean, lint:twig OK.
  • make lint-js, stylelint and Vitest all pass (281/281).
  • Panther (Firefox 158, local): 26/26, including the new testTheReleasedVersionEndsTheSidebarWithoutCoveringTheMenu, which measures the badge on screen:
    • folded menu in a 900 px window: at the bottom of the sidebar;
    • unfolded menu in a 420 px window: right after the last item, below the box's visible edge;
    • scrolled to the end: in view, not over the last item.
    • The browser environment gets a version through a when@browser default in the demo's packages.yaml. The demo, the fixtures' content and the screenshot baselines show none.
  • DemoSmokeTest pins the badge inside the box, after the menu and before the place script. JsFixtureDumperTest passes after make js-fixtures, which re-dumped the fixtures for whitespace only.
  • Playwright (Chromium wide, local): 157 passed (sidebar-place, markup, hygiene, accessibility, dashboard).
  • Sabotage: Panther catches each of 5 broken versions:
    • the badge moved back outside the box;
    • the box not growing;
    • no margin-top: auto;
    • the badge pinned with position: sticky;
    • the badge before the menu.

CI: PHPStan and Rector are expected to fail exactly as on main's nightly run (43 errors, 5 files); I compare before merging.

Screenshots

The demo with ADMINATA_DEMO_RELEASED_VERSION='v10.1.0+3·ab12cd3', 1920×1080. Its menu is short, so the version sits at the bottom of the sidebar (case b).

Light:
adminata-version-light

Dark:
adminata-version-dark

Case a (a long menu) can't be shown with the demo's five entries at 1080 px. The Panther test above covers it, and recomaty-panel's PR has screenshots of it (private repo, so they're not copied here).

Changelog

Unreleased → Added: the released-version entry now says where the badge goes.

— [Bober] 🦫

The version badge sat after the menu's scrolling box, pinned to the bottom of the sidebar, so
under a long menu it covered the end of the menu (recomaty-panel#650). It is now the last thing in
the box (`adminata_sidebar_release` moved into `.adm-sidebar-nav`, after the menu and before the
place script):

- under a menu taller than the box it comes right after the last item and scrolls with the menu,
  out of sight until the menu is scrolled to its end;
- under a shorter one it sits at the bottom of the sidebar: the box now takes the rest of the
  sidebar's height (`flex: 1 1 auto; min-height: 0`), and the badge's `margin-top: auto` takes
  the free space above it.

Tests: the demo's browser environment (APP_ENV=browser, the Panther suites) gets a version, and
DashboardPantherTest measures where the badge lands, folded in a 900 px window and unfolded in a
420 px one, before and after scrolling to the end; DemoSmokeTest pins it inside the box, after the
menu and before the place script. The demo, the fixtures' content and the screenshot baselines
show no version, as before. CHANGELOG entry updated (unreleased, same day).
@bpacholek
bpacholek merged commit 987f223 into main Oct 22, 2026
17 of 21 checks passed
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