-
Notifications
You must be signed in to change notification settings - Fork 36
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
DOP-4967: Contextualize headings in method selector for "On This Page" list #1237
Conversation
❌ Deploy Preview for mongodb-snooty failed. Why did it fail? →
|
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.
Thanks for working on this! Works great
@@ -68,7 +68,8 @@ const Collapsible = ({ nodeData: { children, options }, ...rest }) => { | |||
<Box className={cx('collapsible', collapsibleStyle)}> | |||
<Box className={cx(headerContainerStyle)}> | |||
<Box> | |||
<Heading className={cx(headerStyle)} sectionDepth={2} nodeData={headingNodeData}> | |||
{/* Adding 1 to reflect logic in parser, but want to show up as H2 for SEO reasons */} |
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.
Thank you for this comment! I was a bit confused why we would want to render as an h2 with h3 styling if a writer is placing it under an h2 😕
Stories/Links:
DOP-4967
Update headings to show up when relevant method option is selected. Also, updated collapsible headings to reflect their section depth (i.e. if collapsible is nested it won't have h2 styling)
Current Behavior:
Current method selector behavior
Staging Links:
Staging (content depth 2) - check out collapsible as well
Staging - content depth 1
Non-nested collapsible
Notes:
To test, ensure that the correct headings show up when selecting different methods on the method selector, and also make sure that they reflect where you are on the page (i.e. bolded) and that clicking different headings takes you to the correct spot on the page. Also check out some other pages to ensure their behavior is unchanged.
README updates