Summary
Wire the {vector-sizing-calculator} custom directive into elastic/docs-builder so the
interactive vector sizing calculator can be embedded in docs-content pages.
This is a prerequisite for the docs-content embed PR and must merge first.
Background
An open PR in elastic/docs-builder stages the React + EUI web component, directive examples,
and integration docs under tools/vector_sizing_calculator/. That PR includes three versions of
the calculator. Before opening this directive PR, Docs Eng must align on which version
to build from.
Scope
- Add directive files under
src/Elastic.Markdown/Myst/Directives/VectorSizing/:
VectorSizingBlock.cs
VectorSizingView.cshtml
VectorSizingViewModel.cs
- Apply patches from
DirectiveBlockParser.patch.md:
DirectiveBlockParser.cs — add VectorSizingBlock case before the UnknownDirectiveBlock fallback
DirectiveHtmlRenderer.cs — add WriteVectorSizing method and VectorSizingBlock case in the Write() switch
- Update base HTML template — add
<script src="/_static/vector-sizing-calculator.iife.js" defer></script>
- Ship the compiled web component bundle (
vector-sizing-calculator.iife.js) via standard bundle delivery
Out of scope
Formula updates, UI enhancements, and new element type support are owned by the Vector Search
team and tracked separately.
Prerequisites
Acceptance criteria
{vector-sizing-calculator} directive is recognized by the build system without errors
- The compiled JS bundle loads correctly on pages where the directive is used
- The directive renders a
<vector-sizing-calculator> custom element in the output HTML
- Integration guide verification checklist passes (element types, quantization combinations,
HNSW and DiskBBQ advanced settings, cluster totals, formula panel accuracy)
Owner
Docs Eng
Summary
Wire the
{vector-sizing-calculator}custom directive intoelastic/docs-builderso theinteractive vector sizing calculator can be embedded in docs-content pages.
This is a prerequisite for the docs-content embed PR and must merge first.
Background
An open PR in
elastic/docs-builderstages the React + EUI web component, directive examples,and integration docs under
tools/vector_sizing_calculator/. That PR includes three versions ofthe calculator. Before opening this directive PR, Docs Eng must align on which version
to build from.
Scope
src/Elastic.Markdown/Myst/Directives/VectorSizing/:VectorSizingBlock.csVectorSizingView.cshtmlVectorSizingViewModel.csDirectiveBlockParser.patch.md:DirectiveBlockParser.cs— addVectorSizingBlockcase before theUnknownDirectiveBlockfallbackDirectiveHtmlRenderer.cs— addWriteVectorSizingmethod andVectorSizingBlockcase in theWrite()switch<script src="/_static/vector-sizing-calculator.iife.js" defer></script>vector-sizing-calculator.iife.js) via standard bundle deliveryOut of scope
Formula updates, UI enhancements, and new element type support are owned by the Vector Search
team and tracked separately.
Prerequisites
docs-builderPRAcceptance criteria
{vector-sizing-calculator}directive is recognized by the build system without errors<vector-sizing-calculator>custom element in the output HTMLHNSW and DiskBBQ advanced settings, cluster totals, formula panel accuracy)
Owner
Docs Eng