obsidian-tasks icon indicating copy to clipboard operation
obsidian-tasks copied to clipboard

Visible overflow in short mode tooltip pop-up in case of long backlink text

Open TomWol opened this issue 1 year ago • 5 comments

Please check that this issue hasn't been reported before.

  • [X] I searched previous Bug Reports didn't find any similar reports.

Expected Behavior

In short mode, when the backlink and heading text are quite long, in the tooltip pop-up the text should either wrap or the pop-up should expand.

Current behaviour

In short mode, when the backlink and heading text are quite long, the text will visibly overflow beyond the bounds of the tooltip pop-up that shows up when you hover, as shown here:

Backlink short mode overflow

Steps to reproduce

  • Create a note with a reasonably long name - for example A file with a very long name.
  • Create a heading inside that file that is also not too short, for example A heading with an even longer name
  • Add tasks to that heading.
  • Query the tasks from this page in short mode.
  • Observe how the text overflows from the black tooltip.

Which Operating Systems are you using?

  • [ ] Android
  • [ ] iPhone/iPad
  • [ ] Linux
  • [X] macOS
  • [ ] Windows

Obsidian Version

1.2.2

Tasks Plugin Version

3.1.0

Checks

  • [X] I have tried it with all other plugins disabled and the error still occurs

Possible solution

Here's 2 CSS solutions:

If you want to make the text fit the pop-up

.tasks-list-text .tooltip {
    white-space: normal;
}

If you want to extend the pop-up (not a good solution because in case of really long text - beyond the width of your window - the text will still overflow)

.tasks-list-text .tooltip {
    max-width: max-content;
}

TomWol avatar Apr 11 '23 13:04 TomWol

Steps to reproduce

See screenshot, this is from the Tasks test vault.

Please kindly give actual steps to reproduce, as per https://publish.obsidian.md/tasks/Support+and+Help/Report+a+Bug#Give+steps+to+reproduce+the+bug

Many thanks.

claremacrae avatar Apr 11 '23 13:04 claremacrae

Updated, thanks.

TomWol avatar Apr 11 '23 15:04 TomWol

Updated, thanks.

Great - thank you!

claremacrae avatar Apr 11 '23 15:04 claremacrae

I'm seeing this too. I wonder if the easiest solution might be to make the backdrop the width of the full text area regardless. Not really a big deal but aesthetically not optimal (especially when the task description is long as well in which case they overlap). Clipboard-20231103

aubreyz avatar Nov 03 '23 17:11 aubreyz

Thanks @aubreyz.

claremacrae avatar Nov 03 '23 20:11 claremacrae