Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: add sidebar alphabetization toggle #1154

Merged
merged 4 commits into from Aug 21, 2020

Conversation

christianvuerings
Copy link
Contributor

@christianvuerings christianvuerings commented Aug 20, 2020

Based on #1128 from @mminute with the following changes:

  • Move toggle to the header (where have have all the other toggles)
  • Save sort preference in localStorage (so it stays consistent between refreshes)
  • Don't exclude Getting Started (more scalable but does mean we don't only sort components / hooks)

gestalt-docs-sort-sidebar

Test Plan

Test on netlify:

  • Toggle the sort preference in the header
  • Refresh the site + see that sort preference stays the same

@christianvuerings
Copy link
Contributor Author

@mminute could you take a look and see if this also meets your use case?

@netlify
Copy link

netlify bot commented Aug 20, 2020

Deploy preview for gestalt ready!

Built with commit 57554c0

https://deploy-preview-1154--gestalt.netlify.app

export default function App(props: Props) {
const { children } = props;
const [isSidebarOpen, setIsSidebarOpen] = useState(false);
const [colorScheme, setColorScheme] = useState('light');

useTracking('UA-12967896-44');

const [sidebarOrganisedBy, setSitebarOrganizedBy] = useState<
Copy link
Contributor

Choose a reason for hiding this comment

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

typo? setSidebarOrganizedBy

docs/src/components/Header.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch release Patch release
Projects
None yet
3 participants