mcndt / obsidian-toggl-integration

A Toggl integration plugin for the popular knowledge base application Obsidian.
GNU General Public License v3.0
267 stars 19 forks source link

Description of item in list reports overflows obsidian page width when longer than 2 lines #43

Closed aventuraviper closed 2 years ago

aventuraviper commented 2 years ago

I have some very long Toggl entries due to tracking Todoist Tasks that are themselves generated using the Todoist Outlook add-on.

When these are pulled into a list style report by this obsidian plugin, they overflow the space given and produce a horizontal scroll bar (see attached image).

The task duration is also pushed off.

I think there should be some sort of max length before an item is trimmed to prevent this if possible.

image

mcndt commented 2 years ago

Hey thanks for letting me know about this problem! A few points:

  1. Of course this overflow is unintentional. I will look into fixing that either by trimming the description or by letting it continue on additional lines before it pushes out the task duration.

  2. I notice your task description is a markdown-style link. Should this be parsed so that the list only shows the link's description and not the URL?

PS: I edited your original comment to blur the URL just out of caution if it contained any sensitive information.

aventuraviper commented 2 years ago

Awesome, thank you!

In regards to 2) yes, if possible that would be ideal (and help negate the issue in the first place).

Thanks for editing, I should have done that myself!

mcndt commented 2 years ago

It looks like the production version of the plugin already wraps descriptions correctly. I think the issue was that your description contained a very long link without spaces, and CSS only breaks at whitespace characters by default. Either way I'll ensure it doesn't overflow

mcndt commented 2 years ago

Merged fixes for both issues to master, will be available in release 0.5.1 soon.

aventuraviper commented 2 years ago

Amazing - reports look great again!

Thank you for such a swift fix