Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions HANDOFF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Home-page consistency handoff

Goal: align compressionKIT with the KIT documentation sites and physioKIT.

State:
- Done locally in `issue-79-kit-home-consistency`: replace the hero dot with the existing product icon, render the links below the hero with the shared helia-ui Button, and set `header.titleRegularPrefix` so the prefix is regular and KIT stays bold. The hero headline blends from icon-matched yellow on “Carry” toward bright green across “less data.” The home body follows the shared order: overview, four feature cards, source-checkout installation, and four navigation cards. Cards use CardHeader's full-card link and shared interactive focus treatment.
- Verified: Astro check and build pass. Link and layout audits pass (1,867 links; 404 layout checks), as do 12 content checks. The layout audit verifies readable shared quick buttons in both themes and pointer clicks in card bodies reaching their intended pages. Desktop, 785px and 390px mobile screenshots were inspected in light and dark mode; the icon renders and the page has no horizontal overflow.
- Preview: http://127.0.0.1:8778/compressionkit/
- Tracked by AmbiqAI/compressionkit#79. Draft PR #80 is open; no release or deployment has occurred.

Decisions:
- Reuse the repository's existing product icon and keep its current hero color and destination links.
- Use the shared Button component for the links under the hero; do not introduce a site-specific pill design.
- Pin helia-ui v0.1.0-alpha.24, published from f7158bf, with an npm 11.19.0 lockfile. Clean installs reproduce the shared header without a local patch.

Next: finish checks against the released package, final review and CI, merge under Adam's authorization, then verify the Pages deployment.

Not-found handling: restrict the product hero to the home route so unknown routes show the 404 page; built output and browser checks cover the fallback.


Release validation: clean installation of alpha.24 passed. Final check/build/output checks pass, with 404 rendered acceptance checks passing against the clean released dependency. User authorized merging after green CI.
1 change: 1 addition & 0 deletions astro-site/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default defineConfig({
sidebar: "always",
header: {
title: "compressionKIT",
titleRegularPrefix: "compression",
Comment thread
apage224 marked this conversation as resolved.
hub: {
label: "HELIA",
href: "https://ambiqai.github.io/helia-developer-hub/",
Expand Down
28 changes: 4 additions & 24 deletions astro-site/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion astro-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"refresh:fidelity": "python3 scripts/refresh-fidelity.py"
},
"dependencies": {
"@ambiqai/helia-ui": "https://codeload.github.com/AmbiqAI/helia-ui/tar.gz/f523f6008aca7e1f9b4c3a17198f3f48da83cd7a",
"@ambiqai/helia-ui": "https://codeload.github.com/AmbiqAI/helia-ui/tar.gz/refs/tags/v0.1.0-alpha.24",
"@astrojs/markdown-remark": "^7.3.1",
"@astrojs/react": "7.0.0",
"@astrojs/starlight": "^0.41.5",
Expand Down
27 changes: 26 additions & 1 deletion astro-site/scripts/audit-layout.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,43 @@ try {
const issues = await page.evaluate(() => {
const main = document.querySelector('main');
const visible = element => element.getBoundingClientRect().height > 0;
const probe = document.createElement('span');
probe.style.color = 'var(--helia-ink-primary)';
document.body.append(probe);
const buttonColor = getComputedStyle(probe).color;
probe.remove();
return {
overflow: document.documentElement.scrollWidth > innerWidth + 1,
images: [...main.querySelectorAll('img')].filter(image => visible(image) && (!image.complete || !image.naturalWidth)).map(image => image.getAttribute('src')),
headings: main.querySelectorAll('h1').length,
emptyLinks: [...main.querySelectorAll('a')].filter(link => visible(link) && !link.textContent.trim() && !link.getAttribute('aria-label') && !link.querySelector('img[alt],svg')).map(link => link.getAttribute('href')),
codeCards: [...main.querySelectorAll('.helia-card')].filter(card => card.querySelector('pre')).length,
unreadableButtons: [...main.querySelectorAll('.task-links a')].filter(link => getComputedStyle(link).color !== buttonColor).length,
};
});
checked++;
if (resourceFailures.length || response.status() !== 200 || issues.overflow || issues.images.length || issues.headings !== 1 || issues.emptyLinks.length || issues.codeCards) {
if (resourceFailures.length || response.status() !== 200 || issues.overflow || issues.images.length || issues.headings !== 1 || issues.emptyLinks.length || issues.codeCards || issues.unreadableButtons) {
failures.push({ width, theme, route, status: response.status(), resourceFailures, ...issues });
}
if (route === '/compressionkit/') {
const prefix = page.locator('.helia-site-header__prefix');
if (await prefix.textContent() !== 'compression') failures.push({ width, theme, route, titlePrefix: await prefix.textContent() });
if (!await page.locator('.hero-meta img').isVisible()) failures.push({ width, theme, route, missingHeroLogo: true });
const card = page.locator('.kit-home-nav .helia-card').first();
const destination = await card.locator('a').first().getAttribute('href');
const description = card.locator('.helia-card-content p').first();
await description.scrollIntoViewIfNeeded();
const body = await description.boundingBox();
await page.mouse.click(body.x + body.width / 2, body.y + body.height / 2);
await page.waitForURL(url => url.pathname === destination);
if (new URL(page.url()).pathname !== destination) failures.push({ width, theme, route, cardDestination: page.url(), expected: destination });
}
}
const missingRoute = '/compressionkit/this-route-does-not-exist/';
const missingResponse = await page.goto(base + missingRoute);
const missingTitle = await page.locator('main h1').textContent();
if (missingResponse.status() !== 404 || missingTitle.trim() !== '404') {
failures.push({ width, theme, route: missingRoute, status: missingResponse.status(), title: missingTitle });
}
await page.close();
}
Expand Down
Loading
Loading