mkdocs-material icon indicating copy to clipboard operation
mkdocs-material copied to clipboard

Overflow on improved tooltips inside content tabs

Open SerTetora opened this issue 2 years ago • 3 comments

Context

No response

Bug description

I'm trying to use improved tooltips within content tabs.

with:

features:
    - content.tooltips

image on scroll image

without: image

mkdocs.yml

site_name: My Docs
docs_dir: docs/

nav: 
  - index.md

theme:
  name: material
  features:
    - content.tooltips

plugins:
  - info

markdown_extensions:
  - abbr
  - attr_list
  - pymdownx.snippets:
      auto_append:
        - docs/includes/abbreviations.md
  - pymdownx.superfences
  - pymdownx.tabbed:
      alternate_style: true
docs/index.md

# Welcome to MkDocs

=== "FEM"
    lorem FEM

=== "CFD"
    ipsum CFD
docs/includes/abbreviations.md

*[FEM]: Finite Element Method
*[CFD]: Computational Fluid Dynamic

Related links

Reproduction

9.5.1-tooltips_reproduction.zip

Steps to reproduce

Use improved tooltips within content tabs.

Browser

Chrome

Before submitting

SerTetora avatar Dec 11 '23 09:12 SerTetora

I am not sure if this is related, but I encounter a position issue with tooltips.

Namely, when I use inline admonition blocks (inline end type) and a text with abbreviation is split up by it (or otherwise moved by it) does the tooltip not recognize it and display it at a completely wrong position.

My minimal reproduction: 9.5.5-tooltips-position-issue.zip

Andre601 avatar Jan 25 '24 16:01 Andre601

@SerTetora thanks for reporting. We've just implemented a new tooltip positioning logic for the brand new footnote tooltips (see demo on Twitter), which does not suffer from the problems reported. We're in the process of replacing the previous tooltip positioning with the new implementation, which should solve this issues as well.

squidfunk avatar Jan 26 '24 07:01 squidfunk

Note that this problem is already fixed in Insiders, as we swapped out the tooltip implementation to implement footnote tooltips and instant previews. Once we've collected a little more feedback on those features, we'll back port the new business logic which we confirmed to also fix this problem ☺️

squidfunk avatar Feb 19 '24 06:02 squidfunk

Fixed in e15518cfa588d3dfb8113c1ba90f2c0bc5c02fce – I backported the new tooltip implementation from Insiders in the refactor/tooltip-positioning branch! If you could spare a few minutes and check whether this fixes your issue, we can release it in the next days ☺️ Install with:

pip install git+https://github.com/squidfunk/mkdocs-material.git@refactor/tooltip-positioning

squidfunk avatar Apr 14 '24 07:04 squidfunk

Hi, @squidfunk, it works for me. Many thanks for fixing this!

SerTetora avatar Apr 15 '24 07:04 SerTetora

Awesome, thanks for testing!

squidfunk avatar Apr 15 '24 07:04 squidfunk

Can also confirm that it seems fixed now.

Andre601 avatar Apr 15 '24 20:04 Andre601

Released as part of 9.5.18.

squidfunk avatar Apr 16 '24 03:04 squidfunk