elastic / elastic/docs-builder

Add {vector-sizing-calculator} directive

Open
#3,051 6 comments 0 reactions 1 assignee Claimed by @itsalexcm View on GitHub
ai-triaged ai:eng-question ai:product-question ai:ux-question ai:writer-question design stale
Dominant language
C#
Stars
24
Forks
44
Avg merge
1d 7h
Merged PRs (30d)
146

Description

## 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.

Implementation: https://github.com/elastic/docs-builder/pull/2736

## Status

| Item | Status |
|------|--------|
| Directive block + view + view model | Done in PR #2736 |
| Parser/renderer wiring | Done |
| Web component (React/EUI) in site bundle | Done |
| Syntax docs + directive tests | Done |
| PR merged to `main` | Pending |

## Implementation notes

- Directive: `src/Elastic.Markdown/Myst/Directives/VectorSizing/`
- Web component: `src/Elastic.Documentation.Site/Assets/web-components/VectorSizingCalculator/`
- Asset delivery: Parcel bundle via `main.ts` (registers ``), not a standalone IIFE script tag
- Local preview: `dotnet run --project src/tooling/docs-builder -- serve` → `/syntax/vector-sizing-calculator`
- Integration guide: `tools/vector_sizing_calculator/INTEGRATION.md`

## Out of scope (this issue)

- Embedding in `docs-content` (see docs-content-internal#1030)
- Formula accuracy / BBQ constant (see docs-content-internal#1031)
- Design sign-off (see #3052)
- Landing page / publish (see docs-content-internal#1032–1033)

## Prerequisites

- [x] Single implementation chosen (PR #2736)
- [ ] BBQ constant validated with Search Engineering (blocks launch accuracy; tracked in docs-content-internal#1031)

## Acceptance criteria

- [x] `{vector-sizing-calculator}` recognized by the build without errors
- [x] Directive renders `` in output HTML
- [x] Web component loads on pages using the directive (site bundle)
- [x] Unit tests pass (`VectorSizingBlockTests`)
- [ ] PR #2736 merged
- [ ] Full integration checklist passed before docs-content publish (docs-content-internal#1031)

## Owner

Docs Eng — @itsalexcm

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.