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

feat : File Filtering Feature #6

Closed tu2-atmanand closed 1 month ago

tu2-atmanand commented 2 months ago

To implement the FileFiltering Feature, that is giving the user an option to scan only the files, which the user wants to be get scanned, or want to get ignored from scanning. Like the option currently i have in the global setting to take filters from like filename, folder/ or tag. Below that add a drop-down to ask user whether the user wants to scan the above-mentioned files and folder or don't want them to get scanned.

Now how the input will be that i have to figure out.

tu2-atmanand commented 1 month ago

Creating a different issue to be implemented in future for the above-mentioned ideas for filtering.

tu2-atmanand commented 1 month ago

For now, i have created the following design to take the inputs for the filter from user in much efficient way :

Image

For Tag : First, run extractTag and get the tag of the task if ( 'Only Scan' and the tag is in the list || 'Dont Scan' and the tag is not in the list || No Tag ) { Go for scanning rest of the fields... }

tu2-atmanand commented 1 month ago

Now, i think it will be better if i store all the above three in the Filter Array and create subArrays. Because it will be better to scan once and then store them in variables.

But for each of this subArray, say for the subArray of folders, i have to also store the Polarity for this particular filter Type.

tu2-atmanand commented 1 month ago

The input fields have been integrated and successfully tested.

The Logic for filtering tags has been implemented.

The logic for filtering tasks on the basis of tags has been tested and its working.

tu2-atmanand commented 1 month ago

The logic for filtering files on the basis of files and folders filters has been implemented. But while testing i found one logic flaw :

Say if the user has entered a file and the dropdown value is 'only scan this' . In this case, the logic is scanning even the files which are not there in the filters array, so i have to take care of that.

tu2-atmanand commented 1 month ago

The above flaw in the logic has been resolved, and i think its working now.

tu2-atmanand commented 1 month ago

All the above functionalities have been implemented and also has been tested for a good extent, if in future i found any flaw any logic, ill create a new issue. For not, this issue will be moved to Working as expected.