tu2-atmanand / Task-Board

An Obsidian plugin to view and manage all your task in a much more efficient Kanban Board format. Easily manage your tasks throught your vault.
https://tu2-atmanand.github.io/task-board-docs/
GNU General Public License v3.0
5 stars 0 forks source link

Even if no content in task.body, still there is Description expander #34

Closed tu2-atmanand closed 1 month ago

tu2-atmanand commented 1 month ago

Even if there is nothing inside the task.body, still there is the Show/Hide Description button is shown in the TaskItem card inside board :

image
image

The issue mainly arises because, i guess during scanning or Editing task, an empty line is getting added inside the task.body string array. As can be seen from the json data :

      {
        "id": 2143406379,
        "title": "This is a new task with due date with the format of dataview. Updating",
        "body": [
          ""
        ],
        "time": "",
        "due": "2024-09-28",
        "tag": "#Test",
        "filePath": "Daily_Notes/28-09-2024.md",
        "completed": "",
        "priority": "4"
      }
tu2-atmanand commented 1 month ago

This issue has been resolved. The issue was mainly occurring because of the empty element inside th body array. I have simply added a check while displaying the Clickable Text. But a better solution is to not store the empty element. I think that was mainly occurring, when a user deletes everything from the body and also the Subtaks.

It will be better if that issue of storing an empty element is taken care of. But even after that i think it will be better to keep this check in the frontEnd, as in future due to some missed Case, use might get bad UI experience.

For now closing this issue, but optimize the BackEnd Logic code.