Commit 145324a
Fergus Bisset
feat(Header): add SSR-safe auto-initialization to HeaderServer
- Add inline <script> tag to HeaderServer for self-initialization
- Script uses document.currentScript.previousElementSibling to find header
- Dynamic import of headerBehaviour module for overflow handling
- No 'use client' directive needed - pure server component
- Progressive enhancement: header functional without JS, enhanced with JS
- Wraps header and script in React Fragment for proper JSX structure
Related: Removed BehavioursLoader (requires 'use client')
Related: Created InitBehaviours using Next.js Script component1 parent 8833bd1 commit 145324a
File tree
782 files changed
+1488
-151943
lines changed- config
- dist
- behaviours
- components
- Account
- ActionLink
- BackLink
- Breadcrumb
- Button
- Card
- CareCard
- CharacterCount
- Checkbox
- ContentsList
- DashboardSummaryGrid
- DataVisualisation
- charts/SPC/SPCChart
- components/MetricCard
- DateInput
- Details
- DoDontList
- ErrorMessage
- ErrorSummary
- Expander
- Fieldset
- GanttChart
- Grid
- HeaderSearch
- Header
- Heading
- Hero
- Hint
- Images
- Input
- InsetText
- Label
- List
- MainWrapper
- Pagination
- Panel
- Parallax
- PatternBanner
- ProductCard
- ProductRoadmap
- Radios
- ResponsiveDataGrid
- Select
- SkipLink
- SlotMatrix
- SortableDataTable
- SortStatusControl
- SpacingUtilities
- SummaryCard
- SummaryList
- Tables
- Tabs
- Tag
- TaskList
- Textarea
- WarningCallout
- WidthUtilities
- WorkflowSplitView
- _internal
- macros
- meta
- packages/nhs-fdp/dist/react
- components
- Button
- Card
- Form
- Link
- Text
- hooks
- theme
- src
- assets/brand
- behaviours
- components
- Account
- ActionLink
- BackLink
- Breadcrumb
- Button
- Card
- CareCard
- CharacterCount
- Checkboxes
- Checkbox
- ContentsList
- DashboardSummaryGrid
- DataVisualisation
- charts
- Axis
- BarChart
- CUSUM
- ChartEnhancer
- ChartNoScript
- ChartWithTableTabs
- FilterableLineChart
- GridLines
- GridlLines
- Legend
- LineChart
- PriestleyTimeline
- RunChart
- SPC
- SPCChart
- components
- hooks
- logic_v2
- __tests__/fixtures
- doc-examples
- docs
- data
- examples
- postprocess
- storybook/data
- utils
- logic
- test-data
- utils
- SPCIcons
- examples
- SPCSpark
- engine
- icons
- utils
- components/MetricCard
- core
- hooks
- logic
- primitives
- series
- stories/utils
- utils
- wizard
- DateInput
- Details
- DoDontList
- ErrorMessage
- ErrorSummary
- Expander
- Fieldset
- Foundations/LayeringDemos
- GanttChart
- Grid
- HeaderSearch
- Header
- assets
- Heading
- Hero
- Hint
- Images
- Input
- InsetText
- Label
- List
- MainWrapper
- PageTemplate
- assets
- Pagination
- Panel
- Parallax
- PatternBanner
- ProductCard
- ProductRoadmap
- Radios
- ResponsiveDataGrid
- Select
- SkipLink
- SlotMatrix
- SortableDataTable
- SortStatusControl
- hooks
- SpacingUtilities
- SummaryCard
- SummaryList
- Tables
- Tabs
- Tag
- TaskList
- Textarea
- TransactionalPageTemplate
- assets
- WarningCallout
- WidthContainer
- WidthUtilities
- WorkflowSplitView
- components
- hooks
- utils
- _internal
- hooks
- mapping
- nextjs
- schemas
- storybook
- styles
- themes
- tokens
- utils
- docs
- components
- scripts
- src
- behaviours
- components/Header
- nextjs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
782 files changed
+1488
-151943
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
223 | 229 | | |
224 | 230 | | |
225 | 231 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
This file was deleted.
0 commit comments