markdown icon indicating copy to clipboard operation
markdown copied to clipboard

Split pinned content in React processor.

Open rafegoldberg opened this issue 4 years ago • 0 comments

Currently, the RDMD engine handles pinned sidebar blocks in a somewhat hacky way: we always render the full doc content (pinned and non-pinned blocks alike), wrapping sidebar blocks in a <div.pin/> as we go. Then we use CSS to conditionally display these blocks depending on a few upper-level selector conditions.

This is a cheap solution and it'll hold quite well for now. But it complicates code block theming, makes React trees heavier, and opens us up to potential UI weirdness if someone decides to override our display styles. To get this working properly I think the steps would look something like:

  • [ ] fork the rdmd.react processor export so it can return:
    • the entire content tree
    • only the main content tree
    • pinned sidebar content only
  • [ ] update various RDMD React integrations
    • across the Explorer
    • in ReadMe

Originally here on readmeio/api-explorer#700

rafegoldberg avatar May 12 '20 17:05 rafegoldberg