Stop hiding the top bar globally -- it hid the Save button on entity edit forms

.top-bar was unconditionally hidden on every page (admin_chrome library)
on the assumption it always renders empty, which held on our own pages
but not on entity edit forms, where Gin puts the page's local actions --
Save included -- inside .top-bar. Folded it into the same route-scoped
library as the admin sidebar (renamed hide_admin_sidebar ->
hide_admin_chrome) so both are hidden only on our front-end routes and
real admin pages keep a working Save button.
This commit is contained in:
2026-09-05 17:01:39 +02:00
parent 73818779c1
commit 619a2ab70c
5 changed files with 39 additions and 43 deletions
@@ -1,23 +1,7 @@
/* Core Navigation's top bar (`.top-bar`) only shows itself when its
tools/context/actions regions are non-empty -- but with no blocks placed
there, the regions still contain whitespace text nodes from the Twig
loop scaffolding, which defeats the `:not(:empty)` check. Result: an
empty top bar renders anyway, with the page content pushed down to make
room for it. We only use the Gin sidebar (the left icon rail), so force
the phantom bar off and collapse the space it would otherwise reserve. */
.top-bar {
display: none !important;
}
.top-bar ~ .dialog-off-canvas-main-canvas {
margin-block-start: 0 !important;
}
/* Grand livre / Dashboard switcher, top-right of both pages. Only present
on those two custom routes, but attached here (already loaded on every
page for the phantom-top-bar fix above) rather than duplicated between
home.css and dashboard.css -- and defined with its own explicit colors
rather than relying on either page's #figli-*-app-scoped custom
on those two custom routes, but attached here rather than duplicated
between home.css and dashboard.css -- and defined with its own explicit
colors rather than relying on either page's #figli-*-app-scoped custom
properties, since this <nav> sits outside both of those elements. */
.figli-page-nav {
display: flex;