Skip to content

Rearrange sidenotes to avoid overlapping - #67

Merged
janezd merged 1 commit into
biolab:masterfrom
janezd:relayout-sidenotes
Sep 16, 2025
Merged

janezd merged 1 commit into
biolab:masterfrom
janezd:relayout-sidenotes

Conversation

@janezd

@janezd janezd commented Sep 14, 2025 •

Copy link
Copy Markdown
Contributor

Ref #62.

If a side note overlaps with a previous one, it is pushed down.

I tried a number of approaches, but contexts seem to be the easiest way to register all sidenote components within mdx. Not only because it is easier to share it down the hierarchy of the book: approaches with reporting refs were a nightmare.

This works for <Sidenote> and <ExpandingSideImg>, not for <!!! float-aside !!!>, which are not React components and can't be controlled in a similar way. The easiest way to include float-aside would be to simply replace them with ` when parsing the mdx. This is done in #68.

@janezd janezd changed the title Sidenote: Rearrange them to avoid overlapping Rearrange sidenotes to avoid overlapping Sep 14, 2025
@janezd janezd mentioned this pull request Sep 14, 2025
@janezd
janezd force-pushed the relayout-sidenotes branch 3 times, most recently from d44abde to 7b9d7db Compare September 15, 2025 19:50
@janezd
janezd marked this pull request as ready for review September 16, 2025 13:54
@janezd
janezd merged commit ff25969 into biolab:master Sep 16, 2025
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.

1 participant