Skip to content

fix: track docs-site ROS2+ROS1 merge and inline section headings - #7

Open
bcastets-robotiq wants to merge 1 commit into
mainfrom
fix-ros-merge-and-inline-headings
Open

bcastets-robotiq wants to merge 1 commit into
mainfrom
fix-ros-merge-and-inline-headings

Conversation

@bcastets-robotiq

Copy link
Copy Markdown
Collaborator

Problem

The daily update-readme run failed (run):

Could not import the "ROS2" software tools section: no AUTO-GENERATED-ROS2-TABLE markers found in robotiq.github.io's docs/intro.mdx. It may have been restructured — refusing to publish a partial section.

Correct behavior — the safety check from PR #2 did exactly its job and refused to publish a broken section. The docs site restructured again:

  • ROS2 and ROS1 merged into a single ROS category (one column, not per-distro).
  • Each section's own ### Heading moved from outside its marker pair to inside it (previously: heading, blank line, {/* START */}; now: {/* START */}, heading, blank line, table).

The second part is a real bug fix, not just a config update: naively updating SOFTWARE_SECTIONS without handling the heading move would have produced a duplicated #### ROS / ### ROS pair in the README (confirmed by actually running the regenerator before this fix).

Fix

  • SOFTWARE_SECTIONS: drop ROS2/ROS1, add single ROS.
  • extractMarkerBlock now strips a leading heading line from the extracted block regardless of which side of the marker it's on, since buildSoftwareToolsSection always supplies its own heading.
  • Refreshed scripts/fixtures/intro.mdx from the live site; updated test expectations to match (new heading list, new product names, new Libraries/ROS paths).
  • Added a regression test for the inline-heading stripping.

Test plan

  • All 17 tests pass (node --test scripts/*.test.mjs)
  • Ran the script end-to-end against live data — output verified clean (no duplicate headings, correct single ROS table)

🤖 Generated with Claude Code

The docs site restructured docs/intro.mdx again: ROS2 and ROS1 were
merged into a single ROS category (one column instead of per-distro
columns), and each section's own "### Heading" moved from outside its
marker pair to inside it. The former just needed SOFTWARE_SECTIONS
updated; the latter was silently producing a duplicate heading
(ours, then the leaked upstream one) until extractMarkerBlock now
strips a leading heading line from the extracted block regardless of
which side of the marker it's on.

Refreshed scripts/fixtures/intro.mdx from the live site and updated
the test suite's expectations to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment thread scripts/update-readme.mjs
// format, inside as of the Libraries/ROS/Simulation restructure) — strip
// a leading heading line either way, since buildSoftwareToolsSection
// always supplies its own heading and a leaked one would duplicate it.
return m[1].trim().replace(/^#{1,6}[^\n]*\n+/, '').trim();

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.

Nit (scripts/update-readme.mjs:98): the heading strip only works if a newline follows the heading. The outer regex already consumes the \n before END, so a block containing only a heading comes through unchanged. The README would then get #### X followed by ### X. I reproduced this with a test string. It can't happen today because the generator always writes a No ... documented yet. line, so it's low priority. A possible fix is /^#{1,6}[^\n]*(\n+|$)/, plus a test case.

Comment on lines +9 to +11
Lots of software tools are available to work with `Robotiq` products. Some of
those tools are developed and maintained by `Robotiq` and some other by the
community of developers.

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.

Grammar: "and some other by the community of developers" → "and others by the developer community". Suggest: "Many software tools are available for working with Robotiq products. Some are developed and maintained by Robotiq, others by the developer community." This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.

Comment on lines +13 to +15
You will find in this documentation website the documentation for the software
tools developed and maintained by `Robotiq` as well as reference to the
software tools developed by the community.

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.

Grammar: "You will find in this documentation website the documentation for … as well as reference to the software tools developed by the community" is awkward ("reference" is also missing an article). Suggest: "This site documents the software tools developed and maintained by Robotiq and references those developed by the community." This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.

Comment on lines +18 to +19
For details about `Robotiq` product hardware, please refer to the corresponding
Hardware manual available on [Robotiq support website](https://robotiq.com/support).

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.

Grammar: missing "the" before "Robotiq support website", and "Hardware" shouldn't be capitalized. Suggest: "…please refer to the corresponding hardware manual on the Robotiq support website." This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.

Comment on lines +22 to +23
This site has a sitewide **Stable / Development (main)** switcher, at the
top of every page, covering every `Robotiq`-maintained tool. **Stable** is

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.

Minor: "a sitewide … switcher, at the top of every page, covering every…" reads better as "a sitewide Stable / Development (main) switcher at the top of every page that covers every Robotiq-maintained tool." This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.

Comment on lines +25 to +26
it always tracks that tool's newest tagged release, and is the only
version this site makes any compatibility commitment about.

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.

Minor: "the only version this site makes any compatibility commitment about" → "the only version for which this site makes any compatibility commitment." This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.

## Software tools

Badge colors indicate who maintains the integration: ![Robotiq](https://img.shields.io/badge/Robotiq-blue) an official Robotiq-maintained driver, ![Third party](https://img.shields.io/badge/Third_party-lightgrey) a community-maintained project.
Here below is a summary about available tools.

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.

Grammar: "Here below is a summary about available tools." → "Below is a summary of the available tools." This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.

Here below is a summary about available tools.

### Libraries
Badge colors indicate who maintains the integration: ![Robotiq](https://img.shields.io/badge/Robotiq-blue) an official `Robotiq` maintained driver, ![Third party](https://img.shields.io/badge/Third_party-lightgrey) a community-maintained project.

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.

Missing hyphen: "an official Robotiq maintained driver" → "an official Robotiq-maintained driver" (matches the "Robotiq-maintained" spelling on line 23). This text is copied from the live docs page, so fix it in robotiq.github.io docs/intro.mdx and refresh this fixture afterwards. Not blocking for this PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants