-
Notifications
You must be signed in to change notification settings - Fork 120
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
Add "On this page" TOC #628
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for storybook-frontpage ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
kylegach
force-pushed
the
refresh/on-this-page
branch
from
November 16, 2023 05:10
bf66726
to
fc7848f
Compare
@kylegach I think you could remove the TOC if the main content in the middle is below 600px. TOC is mostly useful when there's space. Otherwise we just hide it. |
- Add InPageTOC component - Can be rendered as a `details` (for narrow contexts) - Query `tableOfContents` in DocsScreen - Add right rail to DocsScreen when wide enough to accommodate it
kylegach
force-pushed
the
refresh/on-this-page
branch
from
November 16, 2023 18:11
fc7848f
to
92d08e8
Compare
- Remove collapsed functionality from InPageTOC - Dramatically simplify DocsScreen layout - No longer need to shift InPageTOC from between title & content to right rail
kylegach
force-pushed
the
refresh/on-this-page
branch
from
November 16, 2023 18:18
92d08e8
to
5411a51
Compare
cdedreuille
approved these changes
Nov 16, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
code
in content doesn't overflow columntableOfContents
in DocsScreenWide viewports
Note
Currently, this has to be quite wide (1548px) for the main content to be wide enough to be legible. (The screenshot was taken at 1800px wide.) We need to discuss the overall page layout to improve this. See related code comment..
How to test
Note
The broken sidebar links are a known, unrelated issue.
argTypes
API referenceargTypes
API reference is a good one)