Skip to content

Conversation

josefaidt
Copy link
Contributor

Description of changes:

This PR aims to enable the usage of raw HTML strings inside directory.js in order to render inline code blocks inside sidenav link items.

It introduces a use of dangerouslySetInnerHTML in the DirectoryGroup class component, however it first validates whether the supplied string contains an inline code block.

image

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@nearestnabors
Copy link
Contributor

I. Love. It.

@timngyn timngyn added the amplify/docs-engineering Issues with the docs site itself, NOT its content label Dec 8, 2022
Copy link
Contributor

@timngyn timngyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @josefaidt, thank you for this! I think some of the tests are failing because you updated directory.js. I think the tests might need to be updated to handle the new require() statement you added.

Copy link
Contributor

@timngyn timngyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@timngyn timngyn merged commit aad0429 into main Dec 14, 2022
@timngyn timngyn deleted the feat/sidenav-inline-code-blocks branch December 14, 2022 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amplify/docs-engineering Issues with the docs site itself, NOT its content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants