Repository navigation
Give websites a code block whose tooltips load their engine lazily - #250
Merged
Merged
Conversation
) A new entry, @noldova/ui.components.angular/site/code-block, exports SiteCodeBlockComponent (nol-site-code-block): the code block with the same inputs, output, template, styles and behavior, whose toolbar takes the lazy tooltip, so a website's start that shows it holds neither the tooltip's engine nor the Angular CDK's dialog, overlay and portal. The block's logic moves into CodeBlockBehavior, which both components build; CodeBlockComponent keeps its API and its eager tooltip, so apps that import the main or the code-block entry keep the same start. The Kit bundles check builds a thirteenth app from the new entry and holds it to that. Agent: DEV3 (developer) Agent-Model: Anthropic Opus 5.5, Medium
rostislavrotaru
marked this pull request as ready for review
November 29, 2026 23:10
rostislavrotaru
commented
Nov 29, 2026
rostislavrotaru
left a comment
Contributor
Author
There was a problem hiding this comment.
Reviewed: #250 at f9e9576
Verdict: Approve
Findings: 0 Should fix, 0 Low, as line comments
Why it's right: SiteCodeBlockComponent loads the tooltip engine lazily, and the new Kit bundles app checks the start holds no engine, overlay or CDK dialog; CodeBlockComponent's selector, inputs, outputs and eager tooltip are unchanged, at the accepted +~600 B. The sites' measured first loads come with their pin PRs, so this is part of #245.
Agent: LEAD (lead)
Agent-Model: Anthropic Opus 5.5, High
This was referenced Nov 29, 2026
Merged
rostislavrotaru
added a commit
that referenced
this pull request
Dec 1, 2026
Closes #286 Moves the kit to 0.0.48, with what has merged since 0.0.47, so apps can take the binary file note and the path tooltip from #282, and the tab marker's tone, close place and dot from #299. ## What changes - `version.json` is at 0.0.48. - `CHANGELOG.md` has the 0.0.48 section, one entry per change a consumer or docs-site reader sees, from #303 (#299), #291 (#280), #281 (#275), #285 (#282), #263 (#151), #250 (#245), #262 (#138, #223), #260 (#16), #248 (#233), #258 (#18), #268 (#28), #255 (#234), #254 (#239), #256 (#236), #253 (#238), #252 (#160), #249 (#244), #242 (#231), #269 (#261) and #259 (#26). - Left out, as changing nothing the package or the docs site shows: #251 (the header's phone-bar rules written once, the same look), #247 (workflow pins), #264 and #277 (build scripts), #266 (example names and their check), #267, #271, #272, #273, #274, #276, #289 and #290 (tests and their tools), #279 and #295 (workflow pins). ## Checks No test covers these two files. The product names check reads the new section in CI; it names no product. Agent: DEV2 (developer) Agent-Model: Anthropic Opus 5.5, Medium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #245.
Websites get a code block whose toolbar's tooltips load their engine once the block renders, so a website's start that shows a code block holds neither the tooltip's engine nor the Angular CDK's dialog, overlay and portal. Apps that import from the main entry or the code-block entry keep
CodeBlockComponentwith its tooltip in the start, as before.What changed
@noldova/ui.components.angular/site/code-block(src/api/site-code-block.ts,.d.ts,package.jsonexports, bothtsconfig.jsonpaths):SiteCodeBlockComponent(nol-site-code-block), withShellRun,ShellRunStateandClipboardWriter, the same classes as the code-block entry's. The main entry and the other entries are unchanged.src/app/components/code-block/code-block-behavior.ts: the block's logic, moved fromcode-block.component.tsunchanged except that it reads the inputs throughICodeBlockSourceand the template's elements throughCodeBlockElements. Both components build one in their injection context, as the two choice pills components shareChoicePillsBehavior.code-block.component.tskeeps its selector, inputs, output,block, constructor andTooltipDirective; its template reaches the logic throughview..site-code-block.component.tsuses the same template and styles withLazyTooltipDirective.bundle-site-code-block, whose start showsSiteCodeBlockComponentfrom the new entry. Its initial chunks must hold the code block but none oftooltip-engine.js,anchored-overlay.jsor the CDK'sdialog,overlay,_overlay-module-chunkandportal, and a lazy chunk must hold the engine.documents/ARCHITECTURE.md(Lazy pages) anddocuments/kit/code-block.mdsay which entry gives which block. The docs site listsSiteCodeBlockComponentwith the other site parts it leaves out.site-code-block.component.spec.tschecks the same geometry asCodeBlockComponent(header, language, Word wrap, Run, Copy and body, in rem, in light and dark), wrap, run and copy, the lazy directive on its buttons and the eager one on the code block's, and its tooltips once the engine arrives.tests/api/site-code-block.spec.tschecks the entry's exports, and the node-load fixture imports the entry.Start sizes
Bytes of code in each Kit bundles app's initial chunks, built against the packed kit on Linux, at main 2449206 and at this head:
bundle-site-code-block(new)bundle-code-block-entrybundle-code-blockbundle-highlighted-code-blockbundle-highlighting-workerbundle-messagebundle-menubundle-buttonbundle-progressbundle-typographybundle-lazy-code-blockbundle-sitebundle-site-frameThe apps that show
CodeBlockComponentgrow about 600 bytes, the cost of the shared behavior's delegation; keeping one copy of the logic was chosen over a second copy in the site component. The site code block app's start holds 27,270 bytes of the Angular CDK, against 65,696 for the code-block entry's.Checks
npm run test:docspass; the Kit bundles check passes with 13 apps.Not in this PR
The 0.0.48 notes go in the version PR. The websites move to
SiteCodeBlockComponentin their own pin PRs.Agent: DEV3 (developer)
Agent-Model: Anthropic Opus 5.5, Medium