Server settings: keep the sub-menu in view while the page scrolls #699
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#699
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On a long Server settings page the list of sections scrolls away with the page, and the way to another section is back at the top. The maintainer's list asks for it to stay put: "Server settings: sub-menu floating always on top-left."
What exists today
server/base.html: alg:flex lg:items-start lg:gap-10row holding an<aside class="mb-6 lg:mb-0 lg:w-56 lg:shrink-0">and the page's column (src/postulo/templates/server/base.html:7-15). The aside is not sticky. Its content is the area's name as a paragraph and{% server_sidebar %}, which drawspartials/sidebar.html: a<nav>of ten sections (core/server_sections.py: Overview, People, Sign-in, Email, Plugins, Capture, Data protection, Logs, Defaults, Design), a column fromlgup and a horizontal strip that scrolls sideways below it.lg:sticky lg:top-[calc(var(--header-height,3.5rem)+1rem)](templates/accounts/profile.html:30,templates/resume/overview.html:31), where--header-heightis the masthead's height asapp.jsmeasures it, with 3.5rem where scripts do not run (app.js:1143-1157,base.htmlcomment on the floating header, #195).tests/test_header.py::test_the_header_floats_and_everything_that_has_to_clear_it_reads_one_heightalready pins the class on the Your details page.templates/settings/base.html:9-20); the maintainer's list names Server settings only.lg:items-start, which is what lets a sticky child keep its own height inside a flex row; the frame needs nothing else to start sticking.Checked against
mainatf09b6010b.Proposal
lgup, with the pattern the other two frames use:lg:sticky lg:top-[calc(var(--header-height,3.5rem)+1rem)]on the<aside>inserver/base.html. Belowlgthe sidebar stays a strip above the page, as it is.lgleaves under the masthead (a 1024 by 500 tablet in landscape). So the aside also takeslg:max-h-[calc(100dvh-var(--header-height,3.5rem)-2rem)]andlg:overflow-y-auto, and the last row can always be reached by scrolling the aside or by Tab. A little padding on the scrolling box so a focus ring on a link at its edge is not clipped.tests/test_template_lint.py).npm run build:css) and commit it; the new utilities exist in no compiled CSS yet (tests/test_stylesheet.py).Decisions
settings/base.htmlis the same markup with the same problem, and two sidebars of one design that stick in one place and not the other would be an arbitrary difference. Recommended: the same change tosettings/base.htmlin the same commit, with the issue's tests covering both; if the maintainer wants Server settings alone it is one template less.settings/base.htmlexplains (#227). Showing a section title there, as #677 proposes for the pages made of anchors, does not apply: these entries are pages, and the current one is already marked.Builds on
#195 (the floating header and
--header-height), #282 and #299 (the masthead and its measured height), #320 (the frame takes the screen and each page keeps its own measure). Related: #486 (the current section is not marked on four People sub-pages), #677 (the sub-menu of Your details and Your career).Done when
tests/e2e/test_sticky_header.py, with the administrator fixture the People e2e file uses (tests/e2e/test_people_menu.py:88).lg(390 wide) the strip is where it was and scrolls sideways inside itself without widening the page (tests/e2e/test_reflow.pycovers the page).lg:stickyand the--header-heightoffset are in a Server settings page's HTML (tests/test_server_settings.py, next totest_every_section_renders_inside_the_sidebar), and in a Settings page if Settings is included.tests/e2e/test_accessibility.py) stays clean, including the rule for a scrollable region without a focusable child.tests/test_stylesheet.pypasses with the rebuiltapp.css. No new string, so the catalogues and Weblate (#349) need nothing.From the list of improvements of 2026-10-02.