Skip to content

feat(home): add Role Manager card + fix ecosystem toggle on /role-manager - #247

Merged
stevep0z merged 2 commits into
mainfrom
docs/role-manager-homepage-card
Oct 7, 2026
Merged

stevep0z merged 2 commits into
mainfrom
docs/role-manager-homepage-card

Conversation

@stevep0z

@stevep0z stevep0z commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator

What

Two related changes around Role Manager:

  1. Adds a Role Manager card as the fourth card in the Open Source Tools section of the docs homepage.
  2. Fixes the ecosystem toggle, which rendered blank on /role-manager.

1. Homepage card

Title Role Manager
Link /role-manager
Description Manage contract permissions from one interface to define role-based access, set multi-level hierarchies, and assign granular admin controls for any team or governance model.

It fills the empty second slot in the two-column Minor Tools grid next to UI Builder.

On the link target: the card points at the docs page rather than rolemanager.openzeppelin.com, matching Relayer, Monitor and UI Builder, which all point at their docs. The Role Manager Quick Start links out to the app in its first section, so the app is one click away — and this keeps readers on the page whose toggle this PR repairs.

On the icon: the supplied SVG hardcoded a #0A0A0A stroke, which would have rendered near-invisible in dark mode. RoleManagerIcon uses currentColor and 1em sizing instead, following the convention of the other icons in src/components/icons/.

2. Ecosystem toggle fix

/role-manager is listed in both stellar.json and ethereum-evm.json, so getEcosystemFromPath() sees two owners, treats the page as ambiguous and returns null — by design.

The problem is that /role-manager was then missing from the shared-path lists that handle exactly this case for /monitor, /relayer, /ui-builder, /ecosystem-adapters and /tools, and from every tab's urls set. So on /role-manager:

  • isTabActive() matched no tab;
  • RootToggle's findLast() returned undefined;
  • the toggle fell back to its empty placeholder and rendered blank.

This adds /role-manager to the shared-path checks in use-navigation-tree.ts and docs-layout-client.tsx, and to the Ethereum and Stellar urls sets — mirroring exactly how /ui-builder is already handled.

Verification

  • biome check on all changed files — clean.
  • tsc --noEmit — clean.
  • Rendered /role-manager on a local dev server with and without the fix:
Toggle renders
Before (nothing — blank placeholder)
After Ethereum & EVM
  • Homepage renders the card with href="/role-manager".

Worth a reviewer's eye: the Stellar-context path (arrive at /role-manager from the Stellar docs → toggle should stay on Stellar) is driven by client-side sessionStorage and wasn't exercised by the SSR check above. The logic is identical to /ui-builder, but a manual click-through would confirm it.

🤖 Generated with Claude Code

stevep0z and others added 2 commits October 6, 2026 16:54
Adds a fourth card to the Open Source Tools section of the docs
homepage, linking to the Role Manager docs at /role-manager (matching
Relayer, Monitor and UI Builder, which all point at their docs rather
than their app).

The supplied SVG hardcoded a #0A0A0A stroke, which would have been
invisible in dark mode. The icon component uses currentColor instead,
following the convention of the other icons in src/components/icons.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
/role-manager appears in both the Stellar and Ethereum & EVM navigation
trees, so getEcosystemFromPath() treats it as ambiguous and returns
null. But unlike the other cross-ecosystem pages (/monitor, /relayer,
/ui-builder, /ecosystem-adapters, /tools) it was missing from the
shared-path lists, and from every tab's `urls` set.

The result: isTabActive() matched no tab on /role-manager, RootToggle's
findLast() returned undefined, and the toggle fell back to its empty
placeholder - the switcher rendered blank instead of showing the
current ecosystem.

Adds /role-manager to the shared-path checks and to the Ethereum and
Stellar url sets, mirroring how /ui-builder is handled. The toggle now
shows Ethereum & EVM by default, and stays on Stellar when the reader
arrived from the Stellar docs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for openzeppelin-docs-v2 ready!

Name Link
🔨 Latest commit 98cf7dc
🔍 Latest deploy log https://app.netlify.com/projects/openzeppelin-docs-v2/deploys/6ac56e28c4aaa00008967bde
😎 Deploy Preview https://deploy-preview-247--openzeppelin-docs-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@stevep0z
stevep0z requested review from pasevin and tirumerla October 6, 2026 22:00
@stevep0z
stevep0z merged commit 0a573b8 into main Oct 7, 2026
12 checks passed
@stevep0z
stevep0z deleted the docs/role-manager-homepage-card branch October 7, 2026 17:01
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants