-
Notifications
You must be signed in to change notification settings - Fork 5
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
NciDsJsInit component outputs escaped html instead of script when publishing to doc site. #1497
Comments
This maybe related, but the error:
Appears in the build logs. Additionally there are 3 mdx pages under docs/content/components that have Is appearing in the build output. |
The fix only stopped errors. The NCI Header with Mega Menu example does not initialize.
We never actually add the created handlers to window.ncidsPreviewHandlers. This should probably change to:
|
This issue remains open / on hold. There is a PR raised that worked to address this, but it ran into problems related to Gatsby. The Javascript required by the components' Previews is not called on first page load due to how Gatsby handles the page rendering. This also includes navigating to the page via our Side Navigation or other link on the site due to how Gatsby's Link component preload's the destination page's resources. Refreshing the page allows the javascript to fire and therefore the Javascript needed by the Preview is able to work appropriately (for example, the initialization of the Header Mega Menu or Site Alert). This is consistent across pages with Javascript required by their component previews. Without a refresh, the first visit to these documentation pages will display the previewed components without working javascript. |
So TL;DR; Gatsby v3 does not make a static HTML site. It makes some sort of Static/React mess. Add pre-fetching on top of this and we start running into issues with components that need to get added to the DOM happening randomly. This hopefully resolves some of our current issues. Closes #1497
So TL;DR; Gatsby v3 does not make a static HTML site. It makes some sort of Static/React mess. Add pre-fetching on top of this and we start running into issues with components that need to get added to the DOM happening randomly. This hopefully resolves some of our current issues. See https://github.com/NCIOCPL/ncids/wiki/Technical:-NCIDS-Initialization-in-Gatsby Closes #1497 .
So TL;DR; Gatsby v3 does not make a static HTML site. It makes some sort of Static/React mess. Add pre-fetching on top of this and we start running into issues with components that need to get added to the DOM happening randomly. This hopefully resolves some of our current issues. See https://github.com/NCIOCPL/ncids/wiki/Technical:-NCIDS-Initialization-in-Gatsby Closes #1497 .
So TL;DR; Gatsby v3 does not make a static HTML site. It makes some sort of Static/React mess. Add pre-fetching on top of this and we start running into issues with components that need to get added to the DOM happening randomly. This hopefully resolves some of our current issues. See https://github.com/NCIOCPL/ncids/wiki/Technical:-NCIDS-Initialization-in-Gatsby Closes #1497 .
So TL;DR; Gatsby v3 does not make a static HTML site. It makes some sort of Static/React mess. Add pre-fetching on top of this and we start running into issues with components that need to get added to the DOM happening randomly. This hopefully resolves some of our current issues. See https://github.com/NCIOCPL/ncids/wiki/Technical:-NCIDS-Initialization-in-Gatsby Closes #1497
So TL;DR; Gatsby v3 does not make a static HTML site. It makes some sort of Static/React mess. Add pre-fetching on top of this and we start running into issues with components that need to get added to the DOM happening randomly. This hopefully resolves some of our current issues. See https://github.com/NCIOCPL/ncids/wiki/Technical:-NCIDS-Initialization-in-Gatsby Closes #1497
So TL;DR; Gatsby v3 does not make a static HTML site. It makes some sort of Static/React mess. Add pre-fetching on top of this and we start running into issues with components that need to get added to the DOM happening randomly. This hopefully resolves some of our current issues. See https://github.com/NCIOCPL/ncids/wiki/Technical:-NCIDS-Initialization-in-Gatsby Closes #1497
So TL;DR; Gatsby v3 does not make a static HTML site. It makes some sort of Static/React mess. Add pre-fetching on top of this and we start running into issues with components that need to get added to the DOM happening randomly. This hopefully resolves some of our current issues. See https://github.com/NCIOCPL/ncids/wiki/Technical:-NCIDS-Initialization-in-Gatsby Closes #1497
So TL;DR; Gatsby v3 does not make a static HTML site. It makes some sort of Static/React mess. Add pre-fetching on top of this and we start running into issues with components that need to get added to the DOM happening randomly. This hopefully resolves some of our current issues. See https://github.com/NCIOCPL/ncids/wiki/Technical:-NCIDS-Initialization-in-Gatsby Closes #1497
Issue description
Using the Header component page as an example of this not working correctly, but:
Is being generated as:
It should be:
The text was updated successfully, but these errors were encountered: