jpmorganchase / salt-ds

React UI components built with a focus on accessibility, customisation and ease-of-use
https://www.saltdesignsystem.com
Apache License 2.0
109 stars 78 forks source link

Update site link active state #3619

Open origami-z opened 1 week ago

origami-z commented 1 week ago

Try whether app header highlight would work when in sub routes

Debugged components page, it's not showing as active, due to empty expandedGroupIds and selectedGroupIds, while the same index.mdx + child sidebar: exclude: true combo works in mosaic sample site.

https://github.com/jpmorganchase/mosaic/blob/4883f2f2bc6b148cec2422cbdb16e5b94dfe341f/packages/site-components/src/VerticalNavigation.tsx#L30-L31

{
    "active": false,
    "item": {
        "id": "/salt/components/badge",
        "kind": "group",
        "childNodes": [
            {
                "id": "/salt/components/badge/index",
                "kind": "data",
                "fullPath": "/salt/components/badge/index.mdx",
                "name": "Badge",
                "priority": 999,
                "data": {
                    "level": 3,
                    "link": "/salt/components/badge/index"
                }
            }
        ],
        "name": "Badge"
    },
    "selectedNodeId": "/salt/components/badge/examples",
    "expandedGroupIds": {},
    "selectedGroupIds": {}
}
changeset-bot[bot] commented 1 week ago

⚠️ No Changeset found

Latest commit: 47aaac98fec158f32276f58e0be4c27f6755878f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
saltdesignsystem ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 22, 2024 5:20pm