Adjust documentation website to import C++ sdk documentation - #2
Conversation
bcastets-robotiq
commented
Sep 11, 2026
- Render C++ sdk doxygen API documentation
- Render C++ readme and attached md documentation files
- Provide instructions about how to document C++ repository and import it to the documentation website
a02d56d to
63c5898
Compare
f35342f to
ca3a554
Compare
ebarnett3
left a comment
There was a problem hiding this comment.
Scope: main...feature/cpp-api-docs.
Verified locally: npm ci, npm run generate, npx docusaurus build and
npm test all run; the build passes and the working tree stays clean
afterwards. Findings 1, 2 and 3 were confirmed against the generated
output rather than read off the diff.
Rendered check (2026-09-11/12): the site was regenerated on this branch
with SKIP_SUBMODULE_RESET=1 and external/2f85_cpp checked out at the
grippers documentation-update branch (859a2a4), then browsed under
http://localhost:3000/docs/drivers/2F%20hande/SDK/C++/. Findings 1-4
reproduce on the rendered pages; findings 9 and 10 come from that pass.
docusaurus build at ca3a554 still passes with the one broken-anchor
warning from finding 4.
Findings 1-11 are inline. 12. Noted during the rendered pass — fine to fix in later work (info)
None of these needs to land in this PR; they are recorded here so they are
not lost.
- Homepage cards are not links.
src/components/HomepageFeatures/index.js
renders Sense / Grip / Integrate as<div>+<img>with no<Link>,
same as onmainand on the live site; this PR only swaps the ROS2 logo
path. Wrappingstyles.featureCardin<Link to=…>is a separate change. //!leaks into the Core API diagram.API/groups/core-apishows the
block diagram with a//!prefix on every line and the following\note
rendered as raw text. The markers are already in Doxygen's XML
(group__core__api.xml:17-36, inside<verbatim>), so this is a
grippers-side issue:groups.doxuses\verbatiminside a//!comment,
and Doxygen keeps the comment markers there where\codestripped them.
That change was made at my request during the grippers #26 review, so the
fix belongs there:\code{.unparsed}or a/*! … */block for that
section.- Dev workflow. Running
npm run generateordocusaurus buildwhile
npm startis up rewrites.docusaurus/under the dev server and leaves
the open tab requesting chunks that no longer exist (ChunkLoadError,
"Unexpected token '<'");npm run clearand a restart recover. Worth one
sentence indocs/contribute/index.mdxnext to the preview instructions.
Test coverageLeaving the review findings aside, I want to flag the pattern behind them rather than just the individual bugs. This PR adds ~1,800 lines, of which What we have today is The result is visible in this review. Of the findings raised across both passes, 11 are one-assertion unit tests — I wrote and ran each of them against Three concrete asks: 1. Make the transforms testable. Add 2. Assert on the generated tree, not just that it exists. Extend 3. Cover the degraded paths in CI. CI is one job: Ubuntu, all submodules present, One thing I'd flag separately: None of this needs to block the merge; the feature works and the build is green. But the transforms are regex-based rewriting of third-party generator output, which is exactly the code that breaks silently the next time doxygen2docusaurus or upstream Doxygen changes its markup. Without unit tests, every such change reopens this review by hand. |
mbegin-robotiq
left a comment
There was a problem hiding this comment.
Approving.
The feature works, the build is green, and none of the findings from my pass
block the merge — the two I'd most like to see land before this goes out are
moveDetailedDescriptionToTop (the Members index ending up at the bottom of
every class page) and the folder-guide titles, both already on Eric's threads
with a failing test attached.
The test-coverage ask in the comment above stands as follow-up work rather than
a condition on this PR.
c8556f8 to
a101e43
Compare
- Render C++ SDK doxygen API documentation - Render C++ readme and attached md documentation files - Provide instructions about how to document a C++ repository and import it to the documentation website Migrates the C++ SDK's API reference from the archived Doxybook2 to the actively maintained @xpack/doxygen2docusaurus, registers the 2f85_cpp submodule, and wires it into scripts/sync-external-docs.js: - A `doxygen2docusaurus` job type generates into a gitignored staging folder (apiFolderPath/apiBaseUrl pre-set to this site's real mount point), then copies the filtered result into docs/, builds a Global Index directly from the Doxygen XML (every class plus every \ingroup-owned free function/variable/data-type/enum, regardless of how it's grouped - neither Doxygen's nor doxygen2docusaurus's own indices cover that), and writes a pruned/merged sidebar subtree so sidebars.js needs no manual group/class upkeep as the SDK's \defgroup/\ingroup hierarchy changes. - Post-processing matches Doxygen's own reference look: strips private members, merges per-kind member tables into one continuous table, rebuilds multi-parameter signatures as a real aligned table, moves each page's full description to the top instead of a truncated brief + jump link, and strips the noisy re-embedded source/"Definition at line N" caption under every member. - Nothing about this pipeline is hardcoded to this one SDK: the Global Index's namespace list is discovered fresh from Doxygen's own index.xml every run (not a hand-maintained array), the section's landing page is doxygen2docusaurus's own generated Topics overview (not a hand-authored page that can drift from the submodule), and `doxygen-xml/` is deleted before every run so an excluded/removed symbol can never leak back in from stale output Doxygen itself never cleans up. - `scripts/check-doc-snippets.js` + `templates/check_doc_snippets.py` verify a hand-authored guide's `<!-- snippet: file tag -->` fence still matches the real, compiled example it claims to copy; independent of which tool generates the API reference. - `docs/contribute/` documents the whole pipeline (Doxyfile setup, \ingroup vs \addtogroup, \cond DOXYGEN_EXCLUDE, check_doc_groups.py, the docs/ guide-file naming convention, the Global Index, matching Doxygen's reference look) and ends with a "Checklist: onboarding a new C++ tool repo" so a second SDK repo can adopt this same pipeline with no changes needed in this repo beyond one job entry. - Fixes two dev-server crashes hit while iterating on this (rspack's persistent module-graph cache panicking, and an OOM during the server-side compile) and a `.gitignore` gap where generated API/docs content across all products was being committed instead of ignored. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
a101e43 to
7d4e006
Compare