Skip to content

Add FV OK web components and Storybook coverage#2944

Draft
fredvisser wants to merge 11 commits intomainfrom
users/fvisser/fv-ok-web-components-only
Draft

Add FV OK web components and Storybook coverage#2944
fredvisser wants to merge 11 commits intomainfrom
users/fvisser/fv-ok-web-components-only

Conversation

@fredvisser
Copy link
Copy Markdown
Contributor

@fredvisser fredvisser commented Apr 29, 2026

Summary

Add the FV OK web component implementations and Storybook coverage for card, chip selector, context help, split button, split button anchor, summary panel, summary panel tile, and toolbar.

What changed

  • add the new FV OK web component source, registration, templates, styles, types, and package tests
  • add Storybook API stories, matrix stories, and MDX docs for the new FV components
  • update the existing FV accordion-item and FV search-input Storybook surfaces to match the current grouped docs/story structure and repo conventions
  • add the FV component-status entries and the beachball change file for @ni/ok-components
  • restore the FV-local component-review skill bundle and repository best-practices reference under packages/ok-components/src/fv/.github/skills
  • FV search input: refine the clear button styling and positioning

Notes

  • this PR intentionally covers the web components and Storybook/docs surface only
  • Angular and Blazor wrappers will follow in a separate PR

Validation

  • npm run build:components -w @ni/ok-components
  • npm run build:ts -w @ni-private/storybook

Comment thread packages/storybook/src/utilities/storybook.ts Outdated
@rajsite rajsite requested review from rajsite and removed request for rajsite April 30, 2026 20:12
@@ -0,0 +1,6 @@
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@fredvisser @jattasNI commenting because I mentioned to Fred but consider smaller PR chunks (maybe one component at a time or something) as if test instability is introduced (unit tests, chromatic tests, etc) then the commits are likely to be reverted and that would revert potentially more changes that expected. But can also appreciate the increased cost of separate reviews so up to y'all's discretion.

Comment on lines +49 to +79
## Badge Styling

The card does not bake alternate success, warning, error, or branded badge colors into the component. The recommended pattern is to slot a `nimble-chip` and let the client application own any alternate palette.

For an outline badge chip, clients can scope theme-aware overrides to the chip itself:

- Override `bodyFontColor` to change the chip text color.
- Override `actionRgbPartialColor` to change the outline tint.
- Override `borderRgbPartialColor` as well if the chip may also be disabled or use block appearance.

```css
nimble-theme-provider[theme='light'] .pink-badge {
--ni-nimble-body-font-color: rgb(190 45 122);
--ni-nimble-action-rgb-partial-color: 190, 45, 122;
}

nimble-theme-provider[theme='dark'] .pink-badge {
--ni-nimble-body-font-color: rgb(255 173 220);
--ni-nimble-action-rgb-partial-color: 255, 173, 220;
}

nimble-theme-provider[theme='color'] .pink-badge {
--ni-nimble-body-font-color: rgb(255 199 227);
--ni-nimble-action-rgb-partial-color: 255, 199, 227;
}

/* Also set this when the chip can be disabled or use block appearance. */
.pink-badge {
--ni-nimble-border-rgb-partial-color: 190, 45, 122;
}
``` No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We shouldn't be designing apis that require users to override CSS custom properties for styling.

Similar to the sizing discussion we should either allow styling the host element to propagate down (this is the theory of the text customized tests where font styles are inherited through the host for configuration) or if there are multiple parts that can be styled then they should be exposed as CSS shadow parts with guidance on how to style them.

componentName: 'fv chip selector',
statusLink: './?path=/docs/component-status--docs#ok-components'
})}
<${fvChipSelectorTag}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

consider having the chip selector use the anchored region to implement the popover like all of our other popover elements (select, combobox, tooltip, menu button)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also popover based elements in storybook should use the helper to prevent storybook transforms and let the popover come over the story, ex:

${disableStorybookZoomTransform}

>
<${iconArrowExpanderDownTag}></${iconArrowExpanderDownTag}>
</button>
<div
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

consider using an actual menu button like done in systemlinklibangular

also consider testing with scrollbars enabled / on windows in general

Image

componentName: 'fv card',
statusLink: './?path=/docs/component-status--docs#ok-components'
})}
<style>${badgeStyles}</style>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should review your show code contents on the storybook pages, people tend to just copy and paste it and there is a lot of junk in here:

Image

leverage the code-hide and code-hide-top-container helper CSS classes

Comment on lines +153 to +158
args: {
title: 'McBain Dailies',
subtitle: 'Soundstage vault',
description: 'Monitor reel intake, dub approvals, and pickup slips awaiting final sign-off.',
interactionMode: FvCardInteractionMode.card,
initials: 'MB'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

consider simpsons related example content

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I asked for deep cuts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

oh snap, love it

episode-19-interview-gif-find-share-on-giphy

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