[{"data":1,"prerenderedAt":820},["ShallowReactive",2],{"figure-telemetry":3,"menu-audits":6,"menu-decisions":7,"menu-projects":23,"menu-workflows":99,"decision-0034-huella-legal-header-navigation":116},{"value":4,"alert":5},"18%",false,[],[8,11,14,17,20],{"label":9,"to":10},"0041 The visitor view becomes its own app, and the portal reads only as a developer platform","\u002Fdecisions\u002F0041-personal-site-splits-from-developer-portal",{"label":12,"to":13},"0040 Visitors land on the front page and toggle to the developer view","\u002Fdecisions\u002F0040-developer-portal-visitor-structure",{"label":15,"to":16},"0039 The developer portal is redesigned for visitors, from a twelve-site benchmark","\u002Fdecisions\u002F0039-developer-portal-benchmark",{"label":18,"to":19},"0038 Marina Roustan's discovery","\u002Fdecisions\u002F0038-marina-roustan-discovery",{"label":21,"to":22},"0013 New linters: the robustness gap is tsconfig and enforcement, not plugins","\u002Fdecisions\u002F0013-linter-coverage",[24,29,60,83],{"labelKey":25,"icon":26,"to":27,"badge":28},"app.menu.allProjects","i-lucide-layers","\u002Fprojects","11",{"labelKey":30,"icon":31,"to":32,"badge":33,"children":34},"app.menu.kinds.apps","i-lucide-app-window","\u002Fprojects?kind=apps","5",[35,40,45,50,55],{"label":36,"icon":31,"to":37,"badge":38,"coverage":39},"developer-portal","\u002Fprojects\u002Fdeveloper-portal","94%",94.37,{"label":41,"icon":31,"to":42,"badge":43,"coverage":44},"huella-legal","\u002Fprojects\u002Fhuella-legal","97%",97.48,{"label":46,"icon":31,"to":47,"badge":48,"coverage":49},"marina-roustan","\u002Fprojects\u002Fmarina-roustan","100%",100,{"label":51,"icon":31,"to":52,"badge":53,"coverage":54},"portfolio","\u002Fprojects\u002Fportfolio","91%",91.31,{"label":56,"icon":31,"to":57,"badge":58,"coverage":59},"wp-editor","\u002Fprojects\u002Fwp-editor","50%",49.89,{"labelKey":61,"icon":62,"to":63,"badge":64,"children":65},"app.menu.kinds.packages","i-lucide-package","\u002Fprojects?kind=packages","4",[66,71,75,80],{"label":67,"icon":62,"to":68,"badge":69,"coverage":70},"configs","\u002Fprojects\u002Fconfigs","76%",75.7,{"label":72,"icon":62,"to":73,"badge":48,"coverage":74},"content","\u002Fprojects\u002Fcontent",99.58,{"label":76,"icon":62,"to":77,"badge":78,"coverage":79},"i18n","\u002Fprojects\u002Fi18n","99%",99.08,{"label":81,"icon":62,"to":82,"badge":48,"coverage":49},"observability","\u002Fprojects\u002Fobservability",{"labelKey":84,"icon":85,"to":86,"badge":87,"children":88},"app.menu.kinds.infrastructure","i-lucide-server","\u002Fprojects?kind=infrastructure","2",[89,94],{"label":90,"icon":85,"to":91,"badge":92,"coverage":93},"scripts","\u002Fprojects\u002Fscripts","79%",78.6,{"label":95,"icon":85,"to":96,"badge":97,"coverage":98},"translations","\u002Fprojects\u002Ftranslations","93%",93.33,[100,103,106,109,112],{"label":101,"to":102},"Huella Legal","\u002Fworkflows\u002Fhuella-legal",{"label":104,"to":105},"Marina Roustan","\u002Fworkflows\u002Fmarina-roustan",{"label":107,"to":108},"Developer portal front door","\u002Fworkflows\u002Fdeveloper-portal-front-door",{"label":110,"to":111},"Huella Legal editorial","\u002Fworkflows\u002Fhuella-legal-editorial",{"labelKey":113,"icon":114,"to":115},"app.menu.newProject","i-lucide-plus","\u002Fworkflows\u002Fnew",{"id":117,"title":118,"body":119,"description":801,"extension":809,"kind":810,"meta":811,"navigation":815,"path":816,"seo":817,"stem":818,"url":810,"verdict":810,"__hash__":819},"docs\u002Fdocs\u002Fdecisions\u002F0034-huella-legal-header-navigation.md","🧭 Huella Legal keeps UNavigationMenu and hydrates it from lg only",{"type":120,"value":121,"toc":800},"minimark",[122,136,141,160,179,226,230,251,287,290,356,359,362,466,476,480,588,592,597,674,683,689,693],[123,124,126,127,131,132,135],"h1",{"id":125},"huella-legal-keeps-unavigationmenu-and-hydrates-it-from-lg-only","🧭 Huella Legal keeps ",[128,129,130],"code",{},"UNavigationMenu"," and hydrates it from ",[128,133,134],{},"lg"," only",[137,138,140],"h2",{"id":139},"context","Context",[142,143,144,145,147,148,155,156,159],"p",{},"The header has to serve three jobs: reading, finding the next good read, and persuading legal\nprofessionals to publish. It rendered four flat links through ",[128,146,130],{},", and\n",[149,150,152],"a",{"href":151},"repo:apps\u002Fhuella-legal\u002Flayers\u002Farchive\u002Fapp\u002Fpages\u002Fabout.vue",[128,153,154],{},"\u002Fsobre\u002F"," was reachable only from the\nfooter, so a would-be author couldn't easily find out what the journal is. huellalegal.com has the\nsame gap: its \"Sobre\" item links to ",[128,157,158],{},"\u002Fcolaboradores\u002F",".",[142,161,162,163,167,168,170,171,174,175,178],{},"The app README listed ",[164,165,166],"em",{},"A lighter header"," under Deliberately deferred. ",[128,169,130],{}," statically\nimports ",[128,172,173],{},"UPopover"," and ",[128,176,177],{},"UTooltip",", so every page loaded floating-ui for a row of plain links. Three\nways out were on the table:",[180,181,182,195],"table",{},[183,184,185],"thead",{},[186,187,188,192],"tr",{},[189,190,191],"th",{},"Option",[189,193,194],{},"What it means",[196,197,198,210,218],"tbody",{},[186,199,200,204],{},[201,202,203],"td",{},"A",[201,205,206,207,209],{},"Drop ",[128,208,130],{}," and render the links yourself",[186,211,212,215],{},[201,213,214],{},"B",[201,216,217],{},"Keep it and use more of it",[186,219,220,223],{},[201,221,222],{},"C",[201,224,225],{},"B, with the header's menu loaded lazily",[137,227,229],{"id":228},"result","Result",[142,231,232,242,243,246,247,250],{},[233,234,235,236,238,239,241],"strong",{},"C: the menu stays ",[128,237,130],{},", gains dropdowns, and hydrates only where ",[128,240,134],{}," matches."," The\nfloating-ui import has nothing to do with dropdowns. In ",[128,244,245],{},"@nuxt\u002Fui"," 4.12's ",[128,248,249],{},"NavigationMenu.vue",":",[252,253,254,269,284],"ul",{},[255,256,257,174,259,261,262,265,266,159],"li",{},[128,258,173],{},[128,260,177],{}," render only in ",[128,263,264],{},"collapsed"," vertical mode or for an item with ",[128,267,268],{},"tooltip",[255,270,271,272,275,276,279,280,283],{},"Horizontal dropdowns are Reka's ",[128,273,274],{},"NavigationMenuTrigger",", ",[128,277,278],{},"NavigationMenuContent"," and\n",[128,281,282],{},"NavigationMenuViewport",", which CSS positions.",[255,285,286],{},"Content stays unmounted until it opens.",[142,288,289],{},"Measured on a production build with the e2e fakes. Sizes are brotli; the last two rows are every JS\nchunk a page requests on load:",[180,291,292,304],{},[183,293,294],{},[186,295,296,298,301],{},[189,297],{},[189,299,300],{},"Before",[189,302,303],{},"After",[196,305,306,317,331,345],{},[186,307,308,311,314],{},[201,309,310],{},"Layout chunk",[201,312,313],{},"19.7 kB (92.6 kB minified)",[201,315,316],{},"6.8 kB (19.7 kB minified)",[186,318,319,325,328],{},[201,320,321,322,324],{},"floating-ui + ",[128,323,130],{},", static imports of the layout",[201,326,327],{},"12.8 kB + most of the layout chunk",[201,329,330],{},"Async: 9.8 kB + 14.0 kB",[186,332,333,339,342],{},[201,334,335,336],{},"JS on load, ",[128,337,338],{},"\u002F",[201,340,341],{},"232.1 kB",[201,343,344],{},"211.6 kB",[186,346,347,350,353],{},[201,348,349],{},"JS on load, an article",[201,351,352],{},"286.6 kB",[201,354,355],{},"279.3 kB",[142,357,358],{},"An article saves less because the article page loads floating-ui for its own popovers.",[142,360,361],{},"What the header is now:",[180,363,364,374],{},[183,365,366],{},[186,367,368,371],{},[189,369,370],{},"Where",[189,372,373],{},"What it does",[196,375,376,416,429,442],{},[186,377,378,386],{},[201,379,380,275,383],{},[128,381,382],{},"apps\u002Fhuella-legal\u002Fapp\u002Fcomposables\u002FuseSiteNav.ts",[128,384,385],{},"HEADER",[201,387,388,174,391,394,395,398,399,402,403,405,406,275,409,174,412,415],{},[164,389,390],{},"Publicaciones",[164,392,393],{},"Áreas"," carry a panel ",[128,396,397],{},"slot",". ",[164,400,401],{},"Revista"," links to ",[128,404,154],{}," and groups ",[164,407,408],{},"Sobre Huella Legal",[164,410,411],{},"Colaboradores",[164,413,414],{},"Contacto",", each with a description. Publicar stays a link. A child whose link has a hash never counts as current",[186,417,418,423],{},[201,419,420],{},[128,421,422],{},"layers\u002Farchive\u002Fapp\u002Fcomponents\u002Fnav\u002FPublicationsPanel.vue",[201,424,425,426],{},"Browse links (all, by format, search), then the lead and two latest from ",[128,427,428],{},"\u002Fapi\u002Fhome",[186,430,431,436],{},[201,432,433],{},[128,434,435],{},"layers\u002Farchive\u002Fapp\u002Fcomponents\u002Fnav\u002FSubjectsPanel.vue",[201,437,438,439],{},"The eight largest areas, then ",[164,440,441],{},"Todas las áreas",[186,443,444,449],{},[201,445,446],{},[128,447,448],{},"apps\u002Fhuella-legal\u002Fapp\u002Fcomponents\u002Fshell\u002FSiteHeader.vue",[201,450,451,454,455,458,459,462,463,465],{},[128,452,453],{},"LazyUNavigationMenu hydrate-on-media-query"," inline, a ",[128,456,457],{},"LazyUNavigationMenu"," in the slideover, and the panels as ",[128,460,461],{},"LazyNav*"," in the slots. ",[164,464,401],{}," opens as an accordion in the slideover",[142,467,468,469,472,473,475],{},"The panels read ",[128,470,471],{},"useCachedFetch\u003CHome>(\"\u002Fapi\u002Fhome\")"," when they mount, so the first open fetches it\nunless ",[128,474,338],{}," or the search palette already has.",[137,477,479],{"id":478},"options-considered","Options considered",[180,481,482,491],{},[183,483,484],{},[186,485,486,488],{},[189,487,191],{},[189,489,490],{},"Why not",[196,492,493,529,537,553,568],{},[186,494,495,502],{},[201,496,497,498,501],{},"A — plain ",[128,499,500],{},"ULink"," row",[201,503,504,505,507,508,510,511,514,515,518,519,521,522,528],{},"C takes the same bytes off the initial load. What A gives up is the dropdowns, and without them ",[128,506,154],{},", the areas and featured reads don't fit at ",[128,509,134],{}," beside search and ",[164,512,513],{},"Suscribirse",". Hand-rolling dropdowns would mean owning Reka's roving focus, Esc and focus return, hover intent and ",[128,516,517],{},"aria-controls"," wiring. The axe scan has already broken once on ",[128,520,517],{}," IDs (",[149,523,525],{"href":524},"repo:apps\u002Fhuella-legal\u002Fmodules\u002FkeepServerPrefetch.ts",[128,526,527],{},"keepServerPrefetch.ts",")",[186,530,531,534],{},[201,532,533],{},"B — dropdowns, eager",[201,535,536],{},"The dropdowns add nothing to the bytes, but the menu and floating-ui stay on every page's load",[186,538,539,546],{},[201,540,541,542,545],{},"A kit component on Reka's ",[128,543,544],{},"NavigationMenu*"," primitives",[201,547,548,549,552],{},"A's byte profile with C's dropdowns, but it means owning a component and theme that Nuxt UI already ships. It is the way out if the desktop chunk after ",[128,550,551],{},"load"," turns out to matter",[186,554,555,561],{},[201,556,557,558],{},"C with ",[128,559,560],{},"hydrate-on-interaction",[201,562,563,564,567],{},"The first ",[128,565,566],{},"pointerenter"," starts hydration and Vue replays it before the chunk lands, so a pointer that rests on a trigger never opens it until it leaves and comes back. Reka opens on pointer moves",[186,569,570,581],{},[201,571,572,573,576,577,580],{},"Adding ",[128,574,575],{},"reka-ui"," as a direct dependency, for ",[128,578,579],{},"NavigationMenuLink"," in the panels",[201,582,583,584,587],{},"It would close a dropdown when a panel link is chosen. A ",[128,585,586],{},"v-model"," on the menu that the header resets on every route change does the same with no new dependency",[137,589,591],{"id":590},"consequences","Consequences",[142,593,594],{},[233,595,596],{},"Behaviours an edit can break:",[252,598,599,616,658],{},[255,600,601,604,605,607,608,611,612,615],{},[233,602,603],{},"Changing the inline menu's props hydrates it."," Vue hydrates a lazy component, and fetches its\nchunk, as soon as its props change before hydration. On desktop that is what moves the active\nunderline after a client-side navigation. Below ",[128,606,134],{}," the menu is hidden, so ",[128,609,610],{},"SiteHeader.vue"," hands\nit the server-rendered items until ",[128,613,614],{},"(min-width: 64rem)"," matches. Without that hold, a phone loads\nthe desktop menu on its first navigation. The same applies to anything else passed to the inline\nmenu that changes per route.",[255,617,618,621,622,625,626,275,628,174,630,632,633,636,637,639,640,646,647,649,650,653,654,657],{},[233,619,620],{},"The triggers stay links before hydration."," A horizontal trigger is ",[128,623,624],{},"NavigationMenuTrigger as-child"," around the item's link, so ",[164,627,390],{},[164,629,393],{},[164,631,401],{}," work as plain ",[128,634,635],{},"\u003Ca>","\nuntil window ",[128,638,551],{},", when ",[149,641,643],{"href":642},"repo:apps\u002Fhuella-legal\u002Fserver\u002Fplugins\u002FdeferHydration.ts",[128,644,645],{},"deferHydration.ts","\nstarts hydration. ",[164,648,401],{}," has a ",[128,651,652],{},"to"," for this reason. In the slideover it is a ",[128,655,656],{},"trigger","\ninstead, because a link there would leave only the chevron to open the accordion.",[255,659,660,666,667,669,670,673],{},[233,661,662,663,159],{},"The viewport needs ",[128,664,665],{},"shrink-0"," It is a flex item of a wrapper as wide as the nav, so without\n",[128,668,665],{}," in ",[128,671,672],{},"layers\u002Fdesign\u002Fapp\u002Ftheme\u002FnavigationMenu.ts"," a panel wider than the nav is clipped.",[142,675,676,679,680,682],{},[233,677,678],{},"What C costs:"," on desktop, every first visit fetches about 24 kB brotli after ",[128,681,551],{},", once\nhydration starts. A pointer that comes to rest on a trigger in the half second before the chunk\nlands still needs a move to open it.",[142,684,685,688],{},[233,686,687],{},"When to revisit:"," if that desktop chunk proves costly, switch to the Reka-primitives option. Plain A\nis the answer only if the dropdowns go.",[137,690,692],{"id":691},"confirmation","Confirmation",[180,694,695,705],{},[183,696,697],{},[186,698,699,702],{},[189,700,701],{},"Claim",[189,703,704],{},"Check",[196,706,707,733,747,760,775,788],{},[186,708,709,712],{},[201,710,711],{},"No menu or floating-ui code is a static import of the layout",[201,713,714,717,718,721,722,725,726,729,730],{},[128,715,716],{},"pnpm exec nx build @joinery\u002Fhuella-legal",", then confirm that the chunk in ",[128,719,720],{},".output\u002Fpublic\u002F_nuxt"," containing ",[128,723,724],{},"ShellSiteHeader"," imports no chunk containing ",[128,727,728],{},"NavigationMenuRoot"," or ",[128,731,732],{},"middlewareData",[186,734,735,738],{},[201,736,737],{},"A phone never loads the desktop menu",[201,739,740,743,744],{},[128,741,742],{},"SiteHeader.spec.ts",": ",[164,745,746],{},"holds the inline menu below lg",[186,748,749,752],{},[201,750,751],{},"The active marker follows a client-side navigation",[201,753,754,743,757],{},[128,755,756],{},"e2e\u002Fshell.spec.ts",[164,758,759],{},"the header follows a client-side navigation before anyone has touched it",[186,761,762,767],{},[201,763,764,766],{},[128,765,154],{}," is one step from every header",[201,768,769,743,771,774],{},[128,770,756],{},[164,772,773],{},"the about page is one step from the header",", on all three viewports",[186,776,777,780],{},[201,778,779],{},"A resting pointer opens a dropdown on its first entry",[201,781,782,743,784,787],{},[128,783,756],{},[128,785,786],{},"openDropdown"," hovers once, after hydration, and never re-enters",[186,789,790,793],{},[201,791,792],{},"An open dropdown stays accessible",[201,794,795,743,797],{},[128,796,756],{},[164,798,799],{},"an open header dropdown has no WCAG AA violations",{"title":801,"searchDepth":802,"depth":802,"links":803},"",2,[804,805,806,807,808],{"id":139,"depth":802,"text":140},{"id":228,"depth":802,"text":229},{"id":478,"depth":802,"text":479},{"id":590,"depth":802,"text":591},{"id":691,"depth":802,"text":692},"md",null,{"issue":812,"status":813,"decision":814},343,"implemented","accepted",true,"\u002Fdocs\u002Fdecisions\u002F0034-huella-legal-header-navigation",{"title":118,"description":801},"docs\u002Fdecisions\u002F0034-huella-legal-header-navigation","nTpL6s60HL-DtObRP67SSw1P4dEUeqbbpJE2bX8f1LY",1795478396675]