Skip to content

Add OK FV sticky-header wrappers - #3049

Draft
fredvisser wants to merge 2 commits into
mainfrom
feat/add-ok-fv-sticky-header-wrappers
Draft

Add OK FV sticky-header wrappers#3049
fredvisser wants to merge 2 commits into
mainfrom
feat/add-ok-fv-sticky-header-wrappers

Conversation

@fredvisser

@fredvisser fredvisser commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Pull Request

🤨 Rationale

Add an OK FV sticky-header component and framework wrappers. Consumers can provide a header in normal document flow and a second header that appears in a fixed overlay after the primary header leaves the viewport.

👩‍💻 Implementation

  • Added and registered ok-fv-sticky-header in @ni/ok-components.
  • Added Angular, React, and Blazor wrappers with header and sticky-header slot or render-fragment support.
  • Added component, Angular, and Blazor projection tests, including coverage for headers below the viewport.
  • Added Storybook documentation and examples, including a summary-panel composition with a full primary panel and compact sticky panel.
  • Added beachball patch entries for @ni/ok-components, @ni/ok-angular, @ni/ok-react, and @ni/ok-blazor.

🧪 Testing

  • OK components: build, lint, and 171/171 Chrome tests.
  • Angular: build, lint, and 179/179 OK tests.
  • React: build and lint.
  • Storybook: TypeScript build, lint, and production build.
  • Blazor: dotnet format --verify-no-changes, full release build, and 1,330/1,330 tests across net8.0 and net10.0 using SDK 10.0.302.

✅ Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the FV sticky-header component with framework integrations, tests, documentation, and release metadata.

Changes:

  • Implements viewport-based header swapping.
  • Adds Angular, React, and Blazor wrappers.
  • Adds tests, Storybook examples, and patch entries.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/storybook/src/ok/fv/sticky-header/fv-sticky-header.stories.ts Adds usage stories.
packages/storybook/src/ok/fv/sticky-header/fv-sticky-header.mdx Documents the component.
packages/react-workspace/ok-react/src/fv/sticky-header/index.ts Adds the React wrapper.
packages/ok-components/src/fv/sticky-header/tests/sticky-header.spec.ts Tests core behavior.
packages/ok-components/src/fv/sticky-header/template.ts Defines slots and visibility.
packages/ok-components/src/fv/sticky-header/styles.ts Styles the fixed overlay.
packages/ok-components/src/fv/sticky-header/index.ts Implements observation logic.
packages/ok-components/src/fv/all-fv.ts Registers the component bundle.
packages/blazor-workspace/Tests/OkBlazor.Tests/Unit/Components/Fv/OkFvStickyHeaderTests.cs Tests Blazor projection.
packages/blazor-workspace/OkBlazor/Source/Fv/StickyHeader/OkFvStickyHeader.razor.cs Defines Blazor parameters.
packages/blazor-workspace/OkBlazor/Source/Fv/StickyHeader/OkFvStickyHeader.razor Adds Blazor markup.
packages/angular-workspace/ok-angular/fv/sticky-header/tests/ok-fv-sticky-header.directive.spec.ts Tests Angular integration.
packages/angular-workspace/ok-angular/fv/sticky-header/public-api.ts Exposes Angular APIs.
packages/angular-workspace/ok-angular/fv/sticky-header/ok-fv-sticky-header.module.ts Adds the Angular module.
packages/angular-workspace/ok-angular/fv/sticky-header/ok-fv-sticky-header.directive.ts Adds the Angular directive.
packages/angular-workspace/ok-angular/fv/sticky-header/ng-package.json Configures Angular packaging.
change/@ni-ok-react-98ed5700-6c71-4a8c-9a21-da50c968ec53.json Adds React release metadata.
change/@ni-ok-components-0d6660a8-22e7-449f-8175-0eb63bde8931.json Adds component release metadata.
change/@ni-ok-blazor-919dec65-a16e-429d-a9b3-05b95b8ae1a9.json Adds Blazor release metadata.
change/@ni-ok-angular-a3fa1a66-e706-4190-b074-923d78dde1a5.json Adds Angular release metadata.
Suppressed comments (1)

packages/ok-components/src/fv/sticky-header/index.ts:75

  • disconnect() stops future observations but does not discard entries already queued for delivery. After slotted header elements are replaced, a queued entry for an old element can therefore run later and reinsert that target into headerVisibility; a stale true value can then prevent the sticky header from ever appearing. Drain queued records when resetting the observed targets (or ignore entries not already in the map).
        this.headerIntersectionObserver.disconnect();

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/ok-components/src/fv/sticky-header/index.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants