Skip to content

Add Component and Service API overview pages#5068

Open
btshrewsbury-viam wants to merge 4 commits into
mainfrom
docs/api-overview-pages
Open

Add Component and Service API overview pages#5068
btshrewsbury-viam wants to merge 4 commits into
mainfrom
docs/api-overview-pages

Conversation

@btshrewsbury-viam
Copy link
Copy Markdown
Contributor

What

Adds two new Overview pages that let you scan every API type and its methods at a glance:

  • Reference > APIs > Component APIs > Overview (/reference/apis/components/overview/) — 18 component APIs
  • Reference > APIs > Service APIs > Overview (/reference/apis/services/overview/) — 9 service APIs

Each page is a compact CSS grid of cards. A card's title links to that API's full reference page; each method renders as a chip linking straight to the method's anchor on that page. The _index.md APIs landing page gets a discoverability card linking each new overview.

Why / design

Today the only way to see what methods an API offers is to open each component/service page one at a time. These pages give one scannable grid.

Method data is read at Hugo build time from the existing auto-generated per-API -table.md includes (the same files the detail pages render), via a new api-overview shortcode driven by a small data file. So the overview can never drift from the per-API pages — when the API surface changes, the generated tables update and the grid follows automatically. This is why it's a shortcode + data file rather than a static markdown page.

Files

File Purpose
data/component_apis.yaml, data/service_apis.yaml API title / link / table-include map (the irregular slug↔file mapping; movement-sensor uses its manual table)
layouts/shortcodes/api-overview.html Renders the grid from a named data file
docs/reference/apis/{components,services}/overview.md The two new pages
assets/scss/_styles_project.scss .api-overview-grid / .api-method-chip styles
docs/reference/apis/_index.md Discoverability cards to both overviews

slam is intentionally excluded — it has a generated table but no detail page (its URL is aliased away).

Verification

  • Built locally with Hugo — clean build, both pages render 18 and 9 cards (170 / 66 method chips).
  • Edge cases checked: movement-sensor (manually maintained table) and board (3-column table) render identically to standard ones.
  • Method anchors spot-checked against the built detail pages; chips reuse the exact anchors the per-API table includes already emit, so anchor validity is structural. Full link checking (htmltest) runs in CI.
  • markdownlint clean on the new/changed pages.
  • Visual rendering best confirmed via the Netlify deploy preview.

🤖 Generated with Claude Code

Add two new "Overview" pages — one under Reference > APIs > Component
APIs, one under Reference > APIs > Service APIs — that render every API
type and its methods in a compact CSS grid. Selecting an API name opens
its full reference; selecting a method jumps to that method's anchor.

Method data is read at Hugo build time from the existing auto-generated
per-API `-table.md` includes via the new `api-overview` shortcode, so
the grid can never drift from the per-API detail pages.

- data/{component,service}_apis.yaml: API title/link/table-include map
- layouts/shortcodes/api-overview.html: renders the grid from a data file
- docs/reference/apis/{components,services}/overview.md: the new pages
- assets/scss/_styles_project.scss: .api-overview-grid / .api-method-chip
- docs/reference/apis/_index.md: discoverability cards to both pages

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 22, 2026

Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit 2c7123c
🔍 Latest deploy log https://app.netlify.com/projects/viam-docs/deploys/6a1092ab67f2cc00084ada03
😎 Deploy Preview https://deploy-preview-5068--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 35 (🔴 down 12 from production)
Accessibility: 99 (no change from production)
Best Practices: 100 (🟢 up 8 from production)
SEO: 92 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@viambot viambot added the safe to build This pull request is marked safe to build from a trusted zone label May 22, 2026
Address review feedback on the overview pages:

- Sort APIs and their methods alphabetically (in the shortcode, so it
  holds regardless of data-file order).
- List one method per line instead of wrapped chips.
- Give each card a header band with the API name in Space Grotesk and a
  light-blue hover highlight on method rows; match the card border to
  the rest of the docs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@viambot
Copy link
Copy Markdown
Member

viambot commented May 22, 2026

It looks like the following files may have been renamed. Please ensure you set all needed aliases:
rename docs/set-up-a-machine/{first-machine.md => overview.md} (19%)

btshrewsbury-viam and others added 2 commits May 22, 2026 11:27
Merge latest main, which removed the Navigation service API (#5067).
Its generated method table no longer exists, so remove the Navigation
entry from data/service_apis.yaml; the overview now lists 8 services.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to build This pull request is marked safe to build from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants