Closed Shrugsy closed 2 years ago
FYI this is a demo of what this would change on the RTK docs
Before (page jumping/jitteriness) | After (no page jumping) |
---|---|
FYI I've opened https://github.com/facebook/docusaurus/pull/5618 on the docusarus repo, which if accepted, will be a more suitable solution, and this PR can be closed
Closed due to https://github.com/facebook/docusaurus/pull/5618 being merged into docusaurus, which makes this change redundant and subpar
Allow transpilation to pad JS snippet with newlines where it would otherwise be shorter than the corresponding TS snippet
The goal here is to prevent the page height & scroll position from jumping when toggling between TS/JS snippets. I've added it as an opt-in option
maintainSnippetHeights
tocompilerSettings
.