Repository navigation
Navbar user menu (#2644) - #2707
Merged
Merged
Conversation
Signed in, the navbar's account corner is one menu under the user's name (Dashboard, Settings, a divider, Sign out as a form-backed item); signed out, Sign in is a nav link and Sign up the bar's one light button (btn-on-strong). Below lg the same items are a section of the collapsed menu, so the bar keeps one row on a phone. Clicking one's own name opens the menu instead of going to Settings. - house component user_menu: components/user_menu.html, scss/components/_user_menu.scss, catalogue entry (both corners) - buttons take --oep-font-size-dense (large ones the body size) in the remap layer; identical at the defaults - the page lint reads the navbar too; the _header.html exemption in NoStatusColourAsAnActionTest is gone - homepage compare masks the navbar's user area from now on - instance theming docs: the navbar buttons are no longer a gap Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- the toggle id is resolved once ({% firstof %})
- compare.mjs masks .user-menu; the benchmark-only data-navbar-user
attribute is gone
- the catalogue example user has pk 0, no real account
- test_user_menu names its page table plainly
- knock-ons of the CSRF token the signed-in navbar now carries and of
two Settings links: the dataset 404 comparison drops the token, the
dashboard header test counts the menu item; the styleguide text
snapshot gains the new entry only
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…menu # Conflicts: # versions/changelogs/current.md
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…menu # Conflicts: # base/static/css/bootstrap.min.css # versions/changelogs/current.md
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2644 (sub-issue of #2632).
What changes
btn-on-strong, from Button roles: four roles, a grey secondary, a blue footer, and the page lint #2641). The cyanbtn-infoand redbtn-dangerbuttons are gone from the navbar. All labels are in sentence case..navbar-collapse. When the menu is open, the same items appear as their own section, marked off by a rule and headed by the user's name. The bar keeps one row (71 px signed in and out). Before, the corner wrapped onto a second row under the logo.House component
user_menubase/templates/components/user_menu.htmltakesuserand an optionalidfor the toggle (the catalogue needs a second one on the same page).theming/scss/components/_user_menu.scssholds only the phone section, the Sign out button reset and the Sign up spacing. Everything else reuses the navbar's own dropdown and link styles inbase-style.css.styleguide/entries/user_menu.htmlshows both corners, signed in as an example user (pk 0, which no account has)._header.htmlincludes the component and loads onlyinstance_theming.Decisions to look at
.btnand.btn-smnow take--oep-font-size-dense, and.btn-lgtakes--bs-body-font-size. This lives in_remap.scssand renders nothing differently at the default values (0.875rem / 1rem, the same as Bootstrap's compiled literals). Buttons were already dense; now the token the spec names for them actually controls them, so an instance that changes--oep-font-size-denseresizes every button. In the navbar,--navbar-remstill wins, so the homepage is unaffected..index-navbar) as well as#main-content, on every page inRESTYLED_PAGES, signed in or out depending on the page. Everything passes. The_header.htmlexemption inNoStatusColourAsAnActionTestand the test that kept it alive are deleted.compare.mjs shootwrites<shot>.mask.jsonbeside each shot. Its selector covers.user-menuplus the pre-Navbar user menu #2644 corner, so a before shot taken on an older branch masks the same place.diffignores pixels inside either side's masks, and only those.Checks
check_catalogue: 20 entries. Literal scan: 0. Theme rebuild: committedbootstrap.min.css/stock_tokens.cssequal a rebuild from the merged sources (sass 1.77.0, bootstrap 5.2.0).dataedit.tests.test_dataset_lifecyclerun 1,065 green. The full suite was not rerun on the merged tree. The only remaining red isLightImportTest, the known isolated-settings failure. Fixed:dataedit.tests.test_dataset_lifecyclecompares two 404 pages byte for byte. Signed in, every page now carries a per-response masked CSRF token in the navbar, so the test strips that token before comparing.login.tests.test_dashboard_headercounted one Settings link in the navbar. There are now two (the menu and the phone section), so it counts the menu'sdropdown-item.page_texts/moved_styleguide.txtwas recaptured. The only change is the new catalogue entry's text.base/tests/test_user_menu.py(8 tests, Django test client):btnin the signed-in navbar;nav-linkand Sign up the only button;instance-theming.mdno longer lists the navbar's Sign up/Sign in buttons as not covered (the docs comment on Navbar user menu #2644).Screenshots
In the vault,
Homepage/_wayfinder/assets/2644/: before/after of the open phone menu signed in and out, the open user menu at 1440, the signed-out corner at 1440, the phone bar, and the catalogue entry at 1280 and 390.Review
/code-reviewwas run on both axes.data-navbar-userattribute is gone (the mask reads.user-menu);compare.mjsare gone.Took develop after #2704
The only conflict was the changelog, resolved as the union.
bootstrap.min.csswas rebuilt and is identical.Took develop after #2706 and #2705
bootstrap.min.css, rebuilt from the merged sources (stock_tokens.cssunchanged).RESTYLED_PAGES, so the page lint now also reads their navbar, and they pass.check_catalogue: 20 entries;🤖 Generated with Claude Code