Skip to content

Parse Root and Expanded attributes on navigation <Group> elements#61

Merged
robertmclaws merged 1 commit into
devfrom
feature/group-attributes
Jun 8, 2026
Merged

Parse Root and Expanded attributes on navigation <Group> elements#61
robertmclaws merged 1 commit into
devfrom
feature/group-attributes

Conversation

@robertmclaws

Copy link
Copy Markdown
Contributor

Summary

ParseGroupConfig only read Name, Icon, and Tag, so a template <Group> could not set GroupConfig.Root or GroupConfig.Expanded — even though both exist on the model and serialize to docs.json. That made it impossible to give identically-named groups a distinct root page.

This matters for sidebars that repeat group names across sibling sections (e.g. a "Brands" tab where each brand has its own Episodes, Planning, Competitive Analysis, … groups). Mintlify keys a group's sidebar expand/collapse state off its identity; without a unique root, the same-named groups expand/collapse together. Setting Root per group decouples them (and gives each a landing page).

Changes

  • ParseGroupConfig now reads the optional Root (string) and Expanded (bool) attributes.
    • RootGroupConfig.Root, optional (null when omitted — no required check).
    • ExpandedGroupConfig.Expanded, parsed with the existing !IsNullOrWhiteSpace && bool.TryParse convention; left null when absent or non-boolean.
    • Added <remarks> + <example> documenting all supported <Group> attributes.
  • Tests (GenerateDocumentationTaskTests): Root present/absent, Expanded true/false/True, and missing/invalid Expanded → null; extended the complete-attributes test.
  • Build/security: pinned System.Security.Cryptography.Xml above the transitive 9.0.0 (high-severity advisories GHSA-37gx-xxp4-5rgx, GHSA-w3x6-4m5h-cxqf), per TFM (net10 → 10.*, net9/8 → 9.*), so restore passes with NuGet audit enabled.

Verification

  • ParseGroupConfig test suite: 22 passed, 0 failed (net10, MSTest/MTP runner).
  • Restore succeeds with the NuGet audit enabled (NU1903 resolved).

Notes

Both new attributes are fully optional and backward-compatible — existing templates are unaffected.

🤖 Generated with Claude Code

ParseGroupConfig only read Name, Icon, and Tag, so a template <Group> could
not set GroupConfig.Root or GroupConfig.Expanded even though both exist on the
model and serialize to docs.json. This made it impossible to give identically
named groups (e.g. repeated "Episodes"/"Planning" groups across sibling brand
sections) a distinct root page, which Mintlify uses to keep their sidebar
expand/collapse state independent.

- ParseGroupConfig now reads the optional Root (string) and Expanded (bool,
  via the codebase's IsNullOrWhiteSpace + bool.TryParse convention) attributes.
  Both remain optional; omitting them leaves the properties null.
- Documented the supported attributes on the method with remarks + an example.
- Added tests: Root present/absent, Expanded true/false/cased, and
  missing/invalid Expanded left null. Extended the complete-attributes test.

Also pins System.Security.Cryptography.Xml above the transitively-resolved
9.0.0 (high-severity advisories GHSA-37gx-xxp4-5rgx, GHSA-w3x6-4m5h-cxqf) so
restore passes with NuGet audit enabled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@robertmclaws robertmclaws merged commit 2b18190 into dev Jun 8, 2026
2 checks passed
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.

1 participant