Pre-flight checklist
Problem or use case
storybook is Beta (it's not in the issue form's area dropdown, so this is filed under "other"). It's a helper-only entry point — storyHtml, when, plus the 1.14.0 additions classMap, styleMap, ifDefined, repeat, and unsafeHtml — and those template helpers are one minor old. Teams writing stories against these helpers need a frozen surface, and unsafeHtml in particular needs its security contract pinned down given bQuery's secure-by-default stance.
Proposed solution
Freeze the storybook helper API for one cycle, document each helper (especially the safety boundary of unsafeHtml and how it interacts with the security module's sanitizer), and add coverage for the template helpers' output. Exit criteria: frozen surface, documented helpers with unsafeHtml security guidance, tested rendering output.
Possible API or UX shape
import { storyHtml, classMap, ifDefined, repeat } from "@bquery/bquery/storybook";
export const Default = storyHtml`
<my-card class=${classMap({ active: true })} title=${ifDefined(title)}>
${repeat(items, i => i.id, i => storyHtml`<li>${i.label}</li>`)}
</my-card>
`;
Alternatives considered
Leaving it Beta as a "minor helper module" — but it's part of the stated road-to-stable for all modules, and its unsafeHtml helper has a security dimension that warrants a pinned contract. Folding it into testing — different purpose (authoring stories vs. assertions), so keep it separate.
Relevant area
other
Additional context
Filed as other because storybook is absent from the area dropdown — flag to maintainers whether the dropdown should add a storybook option. The unsafeHtml boundary should be defined in terms of the existing security/sanitizer module.
Pre-flight checklist
Problem or use case
storybookis Beta (it's not in the issue form's area dropdown, so this is filed under "other"). It's a helper-only entry point —storyHtml,when, plus the 1.14.0 additionsclassMap,styleMap,ifDefined,repeat, andunsafeHtml— and those template helpers are one minor old. Teams writing stories against these helpers need a frozen surface, andunsafeHtmlin particular needs its security contract pinned down given bQuery's secure-by-default stance.Proposed solution
Freeze the
storybookhelper API for one cycle, document each helper (especially the safety boundary ofunsafeHtmland how it interacts with the security module's sanitizer), and add coverage for the template helpers' output. Exit criteria: frozen surface, documented helpers withunsafeHtmlsecurity guidance, tested rendering output.Possible API or UX shape
Alternatives considered
Leaving it Beta as a "minor helper module" — but it's part of the stated road-to-stable for all modules, and its
unsafeHtmlhelper has a security dimension that warrants a pinned contract. Folding it intotesting— different purpose (authoring stories vs. assertions), so keep it separate.Relevant area
otherAdditional context
Filed as
otherbecausestorybookis absent from the area dropdown — flag to maintainers whether the dropdown should add astorybookoption. TheunsafeHtmlboundary should be defined in terms of the existing security/sanitizer module.