Skip to content

Conversation

@pwizla
Copy link
Collaborator

@pwizla pwizla commented Oct 21, 2025

This PR fixes all use cases where the Copy, Wrap, and Ask AI buttons were overlapping the content of code blocks, preventing users from reading the code.

Here's the new behavior:

  • on mobile, buttons are always visible, and a top padding is added to any code block, so we can place the buttons on top of the code, aligned on left
  • on larger viewports, buttons only appear when hovering the code block, plus:
    • either the code block has a title, and buttons are moved to the title bar
    • or the code block does not have a title, and buttons appear at the top right of the code block content

Demo 👇

Screen.Recording.2025-10-21.at.17.31.53.mov

@pwizla pwizla self-assigned this Oct 21, 2025
@vercel
Copy link

vercel bot commented Oct 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
documentation Ready Ready Preview Comment Oct 21, 2025 3:33pm

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

@pwizla pwizla added this to the 6.9.5 milestone Oct 21, 2025
@github-actions github-actions bot added internal PRs created by the Strapi core team pr: updated content PRs updating existing documentation content source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo labels Oct 21, 2025
@pwizla pwizla merged commit be65437 into main Oct 21, 2025
6 checks passed
@pwizla pwizla deleted the repo/fix-code-block-buttons-overlapping-content branch October 21, 2025 15:34
@pwizla pwizla added pr: chore and removed pr: updated content PRs updating existing documentation content labels Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal PRs created by the Strapi core team pr: chore source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant