Skip to content

Slaif fixes#235

Merged
janezd merged 4 commits into
biolab:masterfrom
janezd:slaif-fixes
Jun 11, 2026
Merged

Slaif fixes#235
janezd merged 4 commits into
biolab:masterfrom
janezd:slaif-fixes

Conversation

@janezd

@janezd janezd commented Jun 11, 2026

Copy link
Copy Markdown
Contributor
  • Limit the width of the content index to prevent it to be mostly to the left of the window in case of long titles.
  • Fix copy to clipboard in Expressive Code elements.
  • Remove Expressive Code terminal frames.
  • Fix sizing of Expressive Code elements (in particular, excluding horizontal scrollbars from calculation)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses several UX and rendering issues related to the Content Index positioning and rehype-expressive-code output in rendered MDX, including copy-to-clipboard behavior and terminal styling.

Changes:

  • Adds a client-side copy-to-clipboard initializer for Expressive Code copy buttons and wires it into the Book page.
  • Removes Expressive Code “terminal frame” styling by stripping the is-terminal class during ingestion.
  • Constrains the header content-index width to prevent it from shifting off-screen with long titles.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
utils/copyToClipboard.ts Adds DOM-based copy button wiring with Clipboard API + fallback.
components/Book/Book.tsx Runs Expressive Code “init” logic on mount and on DOM mutations to support MDX-rendered content.
ingest/plugins.ts Introduces a rehype plugin that removes the is-terminal class from output.
ingest/md-helpers.ts Registers the new rehype plugin in the MDX compilation pipeline.
styles/content-index/content-index.scss Adds a max-width to keep the header content index from becoming too wide.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread utils/copyToClipboard.ts
Comment thread components/Book/Book.tsx
@janezd janezd merged commit 3fad224 into biolab:master Jun 11, 2026
1 check passed
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.

2 participants