Skip to content

chore: improve API docs structure with dedicated index.md files#10472

Open
gitKrystan wants to merge 3 commits intomainfrom
fix-docs-build
Open

chore: improve API docs structure with dedicated index.md files#10472
gitKrystan wants to merge 3 commits intomainfrom
fix-docs-build

Conversation

@gitKrystan
Copy link
Copy Markdown
Contributor

@gitKrystan gitKrystan commented Feb 15, 2026

Summary

Improves the structure and organization of legacy API documentation.

Changes

  • Moved package overview documentation from index.ts to index.md files for:
    • @ember-data/store
    • @ember-data/json-api
    • @ember-data/serializer
    • @ember-data/tracking
    • @ember-data/model
    • @warp-drive/build-config
    • And other packages
    • It's annoying that this was necessary, but I couldn't figure out another way to get the "index" documentation to show up at the root of the package instead of only showing up if you click the package and then click the /index link in the sidebar separately.
  • Cleaned up documentation writing guides
  • Some minor language tweaks
  • Updated docs-viewer/docs.warp-drive.io/.vitepress/theme/custom.css, docs-viewer/docs.warp-drive.io/.vitepress/config.mts, docs-viewer/src/site-utils.ts to improve API Docs sidebar nav

Documentation Preview

Screenshots of some of the more significant changes:

Contributing > Writing Documentation Pages

Details docs-guide-writing-documentation docs-guide-writing-api-docs docs-guide-writing-guides

@ember-data/json-api

Includes detailed overview of the {json:api} package with setup and configuration guidance.

Details docs-api-ember-data-json-api

@ember-data/model

Enriched with model definition patterns and usage examples.

Details docs-api-ember-data-model

@ember-data/serializer

Enhanced with sections on legacy serializers, implementation patterns, and usage examples.

Details docs-api-ember-data-serializer

@ember-data/store

Package overview now includes comprehensive introduction, installation instructions, and usage examples.

Details docs-api-ember-data-store

@ember-data/tracking

Improved with reactive tracking overview and integration details.

Details docs-api-ember-data-tracking

@warp-drive/build-config

Added comprehensive build configuration documentation.

Details docs-api-warp-drive-build-config

Impact

  • Better developer experience when browsing API documentation
  • Clearer separation between package-level docs and API reference
  • Clearer distinction between legacy and modern packages

@gitKrystan gitKrystan added 🎯 canary PR is targeting canary (default) 🏷️ doc This PR adds/improves/or fixes documentation labels Feb 15, 2026
@github-project-automation github-project-automation Bot moved this to needs triage in EmberData Feb 15, 2026
display: none !important;
}

.VPSidebarItem .level-1 > .item > p.text {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This selector wasn't working before. The Universal Packages and Framework Packages headers in the sidebar are a bit sharper w/ this change.

link: '/api/',
items: [
{ text: 'Universal' },
{ text: 'Universal Packages' },
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit more clear, plus a closer match to what shows up on /api/ when you click the API Docs link from the homepage.

collapsed: true,
// link: '/api/',
// Ensures that this sidebar item is active when you load /api/ or any of its sub-pages
link: '/api/',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it so that when you when you click the API Docs link (to /api/) from the homepage, the API Docs section of the sidebar is active and expanded.

},
{
text: 'Legacy Packages',
text: 'Legacy API Docs',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I toyed w/ moving this under API Docs but I think it does make sense to keep it separate so that if we end up compiling (for LLMs) "Modern API Docs" separately from "Legacy API Docs", there's a clearer distinction in the UI. I changed the name here though so that the sidebar reads:

  • API Docs
  • Legacy API Docs
    which reduced my cognitive overhead of "What is docs vs packages?" when reading the sidebar.


// generate the API documentation
const apiDocumentation = `${ApiDocumentation}\n\n## Main Packages\n\n${MainPackages.join('\n')}\n\n## Framework Packages\n\n${FrameworkPackages.join('\n')}\n\n## Legacy Packages\n\n${OldPackages.join('\n')}\n\n`;
const apiDocumentation = `${ApiDocumentation}\n\n## Universal Packages\n\n${MainPackages.join('\n')}\n\n## Framework Packages\n\n${FrameworkPackages.join('\n')}\n\n## Legacy Packages\n\n${OldPackages.join('\n')}\n\n`;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making it match sidebar.

// if the file is in @warp-drive/legacy add the legacy badge
if (file.includes('@warp-drive/legacy')) {
// if the file is in a legacy package add the legacy badge
const isLegacyPackage = OLD_PACKAGES.some((pkg) => file.includes(pkg)) || file.includes('@warp-drive/legacy');
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More little red badges for stuff you should avoid using in new projects.

Comment thread guides/contributing/writing-documentation/writing-api-docs.md

<br>

---
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. these gaps looked weird

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mergeModuleWith <project>

^ this is the secret sauce for not having the index ones show up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎯 canary PR is targeting canary (default) 🏷️ doc This PR adds/improves/or fixes documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants