-
Notifications
You must be signed in to change notification settings - Fork 50
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
Updated remark parsing and added extra code block props #210
Conversation
✅ Deploy Preview for apollo-monodocs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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! Thanks for the bug fixes @BlenderDude 🎉
const bumpScroll = (distance: number) => () => { | ||
if (!outerRef) return; | ||
outerRef.current.scrollBy({ | ||
outerRef.current?.scrollBy({ | ||
left: distance, | ||
behavior: 'smooth' | ||
}); | ||
}; |
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.
Out of scope for this PR, but I'm wondering about the accessibility of the tabs for screen readers? I haven't tried it with my screen reader yet, but perhaps something we can discuss.
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.
I did my best to follow the guidelines laid out here (https://www.w3.org/WAI/ARIA/apg/example-index/tabs/tabs-manual.html). So hitting tab should be able to move between tabs, but one thing I did not consider is the highlighted element might end up "out of view" because of the scrolling. Definitely something we should look into and discuss!
Updated typescript remark parser to fix pattern matching issue found in some imports for TS code blocks. See below (yes there are import statements at the end of a couple hundred comment tokens 😄 )
This update also introduces additional props to the
CodeBlock
component and implements a fallback to "local" tabs if the global context is not available. Useful for things other than the docs!