Skip to content

feat: add collapsible sidebars component#77

Merged
melissahenderson merged 6 commits intomainfrom
chj/add-collapsible-sidebars
May 14, 2025
Merged

feat: add collapsible sidebars component#77
melissahenderson merged 6 commits intomainfrom
chj/add-collapsible-sidebars

Conversation

@huijing
Copy link
Copy Markdown
Contributor

@huijing huijing commented Apr 17, 2025

Changes proposed in this pull request

This PR adds a component that allows users to toggle both the left navigation sidebar or the right ToC side panel to make more space for the main content on wide viewports.

Although the issue was raised in the docs-design-system repo, this implementation is implemented using the Starlight component override approach rather than as an imported component that can be used within Starlight content.

In theory, could we change the docs-design-system to be able to handle component overrides via the Astro configuration like how a plugin would? Yes, of course. Anything is possible. Even rewriting complex COBOL systems in Java in 3 months, but after weighing the amount of effort required, I suggest going with this approach instead.

Context

Closes interledger/docs-design-system#41

Test locally

  1. git pull
  2. git checkout chj/add-collapsible-sidebars
  3. bun run start

@JoblersTune
Copy link
Copy Markdown
Contributor

Thanks so much for tackling this! It's going to make such a big difference, it's been on my radar too.

Am I the only one seeing the style breaks though?

image

Also the icons and their placement look like paging to me rather than full view buttons. I wonder if we could place them differently or maybe just use a simpler, single full view option so we can use a more common full view icon instead of having a directional one?

@huijing
Copy link
Copy Markdown
Contributor Author

huijing commented Apr 25, 2025

eg.mp4

@JoblersTune, @melissahenderson if you pull the latest version of this branch you should be able to see the version in the screenshare.

package.json Outdated
"@interledger/docs-design-system": "^0.6.2",
"astro": "^5.6.1",
"@astrojs/starlight": "^0.34.1",
"@interledger/docs-design-system": "^0.7.0",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sites that need to use FullView need to update to 0.7.0 of dds.

@netlify
Copy link
Copy Markdown

netlify bot commented May 13, 2025

βœ… Deploy Preview for styleguide-preview ready!

Name Link
πŸ”¨ Latest commit 15edfe7
πŸ” Latest deploy log https://app.netlify.com/sites/styleguide-preview/deploys/68240c05e4cdf2000871e5e5
😎 Deploy Preview https://deploy-preview-77--styleguide-preview.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 site configuration.

@melissahenderson melissahenderson merged commit 17d56d6 into main May 14, 2025
5 checks passed
@melissahenderson melissahenderson deleted the chj/add-collapsible-sidebars branch May 14, 2025 11:24
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.

[FEATURE] Add starlight-fullview-mode plugin to doc system

3 participants