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

Updated remark parsing and added extra code block props #210

Merged
merged 2 commits into from
Sep 7, 2022

Conversation

BlenderDude
Copy link
Member

@BlenderDude BlenderDude commented Sep 1, 2022

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 😄 )

Screen Shot 2022-09-01 at 5 22 01 PM

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!

@netlify
Copy link

netlify bot commented Sep 1, 2022

Deploy Preview for apollo-monodocs ready!

Name Link
🔨 Latest commit 464b084
🔍 Latest deploy log https://app.netlify.com/sites/apollo-monodocs/deploys/63112378ba413c000829ec95
😎 Deploy Preview https://deploy-preview-210--apollo-monodocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@jgarrow jgarrow left a 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 🎉

Comment on lines 80 to 86
const bumpScroll = (distance: number) => () => {
if (!outerRef) return;
outerRef.current.scrollBy({
outerRef.current?.scrollBy({
left: distance,
behavior: 'smooth'
});
};
Copy link
Contributor

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.

Copy link
Member Author

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!

@BlenderDude BlenderDude merged commit 89560af into main Sep 7, 2022
@jgarrow jgarrow deleted the da/fix-remark-ts-parse branch September 7, 2022 19:57
@github-actions github-actions bot mentioned this pull request Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants