Skip to content

Code annotations button overlapping with toggle line selection & copy to clipboard buttons #71

@georgeRobertson

Description

@georgeRobertson

Context

No response

Bug description

Hi team,

When I have the following features enabled...

  • "content.code.annotate",
  • "content.code.copy",
  • "content.code.select"

...the buttons overlap on long snippets of code making the code annotation button unreachable.

The only workaround I can find is to force newlines into the codeblock to force the code annotation to be underneath the copy to clipboard and toggle line selection buttons.

I thought adding the title to the code might place the copy code and enable line selectors inline with the title but this wasn't the case.

Related links

Reproduction

Here is a visual of the issue.

Image

Here is an example of the code block + code annotation in the markdown file:


[codeblock_rpr.zip](https://github.com/user-attachments/files/25446926/codeblock_rpr.zip)

```sh
pip install git+https://aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.git@vMaj.Min.Pat # (1)!
```

1. Replace Major, Minor, Patch with the version of aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa that you want

A workaround is to add anything that forces new lines such as \n but obviously doesn't look great.

Image

Steps to reproduce

  1. Have code annotations enabled, copy code enabled and toggle line selection enabled
  2. Add fenced codeblock to a markdown file with a rather long piece of code
  3. Render through zensical serve and see how the buttons overlap

Browser

Firefox

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs inputIssue needs further input by the reporter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions