fix: documentation sidebar component to show on mobile
Fixes #664 (There was no way to access the LeftSidebar component in mobile view, which contained links to each hook documentation)
LeftSidebar wasn't able to show on mobile as hidden md:block was applied on the component itself
I changed the component to take in an extra className prop, so that only selected LeftSidebar components will be hidden.
I also removed the Features and Documentation nav links in the MobileNav component - it was weird having the Documentation and Introduction link together, since it led to the same page.
Edited the marketing layout so that LeftSidebar is able to be shown on the home page too
Before:
After:
🦋 Changeset detected
Latest commit: a6f3e37863c509336e7d64e7025afb8c5409ff71
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| www | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Thanks @junnjiee16 for creating that PR. I am new to this project in terms of contributing to it but i would like to challenge the changes you've made because the main navigation on the homepage now differs between mobile and tablet/desktop view.
I would suggest to
- remove the main navigation on the homepage completely because it doesn't add real value
-
DocumentationandExplore the docslink to the same URL and are initially visible even on smaller screens -
Featurescontains an anchor link to a block that is initially visible even on smaller screens
-
- apply your changes to all pages but the root/home page
In https://github.com/juliencrn/usehooks-ts/pull/665 we try to figure out if it makes sense to work on PRs in this repository at all because it seems to be dead. But who knows. Anyway: if you want to make this PR work you have to add a changeset. I went through the same process couple of weeks ago :) Feel free to scroll through https://github.com/juliencrn/usehooks-ts/pull/665 to get some information about it.
Hi @iwan-uschka, thank you for the suggestions. I committed changes to remove the main navigation links from the page as well as include a patch changeset
apply your changes to all pages but the root/home page
For this suggestion, I couldn't find a way to do it. Since LeftSidebar is used in layout.tsx itself, I have to edit this page to add the hidden class so that the LeftSidebar component in desktop view will be hidden.