feat(docs): reference docs enhancements and curated side bar - #1258
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds TypeDoc categories to SDK documentation and introduces a plugin that categorizes declarations and configures navigation. It updates the HTML documentation configuration and adds a separate command and configuration for JSON output. ChangesTypeDoc Documentation
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The documentation changes appear ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
hey, some commits here have unverified signatures. can you please sign them before we merge? |
- Refactor typedoc.js to use entryPoints resolve strategy and auth0 theme - Add scripts/typedoc-plugin.js: categorizes exports and extends sidebar nav - Add scripts/typedoc-plugin-mintlify.js: injects markdown type links for Mintlify - Add typedoc.docsv2.js: JSON-only config for docs-v2 Mintlify pipeline - Add docs:docsv2 npm script for generating the Mintlify artifact
Shape the generated TypeDoc reference so the landing page and sidebar read as Getting Started / Hooks & HOCs / Context / Errors / Reference instead of one flat alphabetical list of ~100 symbols, and surface the Auth0ContextInterface members directly in the sidebar. - Tag every top-level export and context member with @category where it is declared; re-exports and error classes are placed by rule. - Rewrite the TypeDoc plugin around three categorization rules with a build-failing guardrail: a symbol this SDK declares that no rule places fails the build rather than drifting into a default section. - Discriminate own symbols from dependency re-exports by source path outside node_modules (survives a basePath shift) with a zero-count backstop, so the guardrail cannot be silently defeated. - Order context members by category then declaration line; member source order is left as-is, so the sidebar reflects the existing order. - Ignore the docs:docsv2 artefact directory; align React dev deps to main.
…c-plugin.js and typedoc.docsv2.js
16fa586 to
38fd34e
Compare
Summary
Updates TypeDoc so the generated API reference is grouped into readable sections (Getting Started, Hooks & HOCs, Context, Errors, Reference) instead of a flat alphabetical list.
Categories derive from
@categorytags on the public declarations, a plugin controls category order and warns when an own-symbol is left uncategorised, and the sidebar now surfacesAuth0ContextInterfacemembers grouped by category.No runtime changes, only documentation-related updates.
Supersedes
This PR supersedes and closes the earlier docs-reference work:
Changes
Entry point: reference is generated from
src/index.tsx(the public contract) rather than expanding the wholesrc/tree, keeping internal modules (reducer, auth state, utils)out.
Grouping by category:
typedoc.jsgroups the landing page and sidebar by@category, wired to the plugin'sCATEGORY_ORDERandDEFAULT_CATEGORY.Plugin (
scripts/typedoc-plugin.js): controls category order and validates categories per reflection against level-scoped allowed-sets (top-level vs interface-member).Category tags:
@categorytags added across the public surface (hooks/HOCs, provider options, context interface + its members, errors, and re-exported spa-js option/claim typesunder Reference).Auth0ContextInterfacemembers are tagged so they appear grouped in the sidebar.Testing
npm run docs:docsv2— generates the Mintlify JSON artefact (exit 0; Reference holds 60symbols, 57 re-exported).
npm test— 100% coverage, all tests pass.npm run lint— clean.Summary by CodeRabbit
Documentation
useAuth0documentation, including the returned auth state, methods, and available sub-clients.