Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making repositioning of context tag and project tag optional #68

Closed
Tobida opened this issue Mar 22, 2021 · 72 comments
Closed

making repositioning of context tag and project tag optional #68

Tobida opened this issue Mar 22, 2021 · 72 comments
Assignees
Labels
impediment Something is blocking work on this task

Comments

@Tobida
Copy link

Tobida commented Mar 22, 2021

I love to use todo.txt in a natural way of language:

discuss with @george about +superproject concerning the aspect of unicorns

This is in consensus with the todo.txt rules i read: "Contexts and Projects may appear anywhere in the line after priority/prepended date"

In my sleek this will show up like this, the sentence is destroyed

discuss with about concerning the aspect of unicorns @george +superproject

I fully respect that in your perspective this is not a bug but a feature.

I would like to use it without the feature of putting tags at the and of the line - perhaps there could be an option to switch this behaviour off?

Thanks!

@ransome1
Copy link
Owner

Hi @Tobida . I'm totally with you on this topic and would prefer it the way you describe it too. But this is actually not up to me, as I use a JavaScript library to do the parsing of the text into proper todo.txt objects. And while it does a great job in general, it doesn't persist the position of projects and contexts after generating the object, but sorts these attributes in it's own way.

But in fact there is a feature request for exactly that feature at the project: jmhobbs/jsTodoTxt#5

You can give it a push over there and as soon as they implement it, I will include it into sleek.

@ransome1 ransome1 self-assigned this Mar 24, 2021
@ransome1 ransome1 added impediment Something is blocking work on this task and removed backlog labels May 3, 2021
@9z0
Copy link

9z0 commented Jul 2, 2021

A similar repositioning request: is it possible to have a function to sort the projects/contexts inside the todo alphabetically?
For example,

(A) todo +b +a @context_b @context_a

running the function makes it

(A) todo +a +b @context_a @context_b
         ^     ^

@dnngll
Copy link

dnngll commented Sep 15, 2021

+1, super important imho

@aubreyz
Copy link

aubreyz commented Dec 16, 2021

Agree here - I am never likely to use to use Slick seriously if it messes with the Todo file and changing the order of the words is a serious problem. One if the points if the protocol is to be be able to use natural text.

@ransome1
Copy link
Owner

I'm closing here, the issue will further discussed in #68

@dnngll
Copy link

dnngll commented Sep 29, 2022

I'm closing here, the issue will further discussed in #68

Isn't this #68? 🧐

@dnngll
Copy link

dnngll commented Nov 7, 2022

Hello @ransome1 ,

since jmhobbs/jsTodoTxt#5 has been getting some attention lately, I wondered if the matter could be addressed in Sleek again. You closed #68 in September, but I didn't find an open issue with that problem (#92, #183, #216, #220, #306, #370 and #411 are all closed).

Things have been getting better, since ticking of a box now only changes that very line, and not the whole file any more. But the resorting on the ticked todo is still happening unfortunately.

Sleek is getting better and better every week, I am really hoping to be able to use it to tick off todos as well soon : )

Please let me know what you think.

Thanks!

@ransome1
Copy link
Owner

ransome1 commented Nov 7, 2022

Yes, as soon as jsTodoTxt is finishing the rewrite, sleek will adapt to it and hopefully this will solve these issues.

But for now the latest version of jsTodoTxt is alpha and for almost two weeks there has been no progress. I will start implementing as soon as a stable version has been released and the documentation is complete :)

@ransome1
Copy link
Owner

ransome1 commented Nov 7, 2022

I'm closing here, the issue will further discussed in #68

Isn't this #68? 🧐

Indeed it is. There was no good reason to close here. I'll reopen.

@ransome1 ransome1 reopened this Nov 7, 2022
@dnngll
Copy link

dnngll commented Nov 7, 2022

Wow,

that's a swift response, thanks @ransome1 ! Also thanks for reopening. You have no idea how much I am looking forward to using Sleek as my daily driver.

@dnngll
Copy link

dnngll commented Aug 31, 2023

Hey @ransome1

using the now new sleek-2.0.0-dev7-win.zip [ace17a1a2cf7bd4daa08f12dc24205b9].


From Dev4 on this should not be an issue any longer, because for every new developer preview version the config is freshly created and put into its own versionized folder.

Yeah I saw that. Folder C:\Users\YOURUSERNAME\AppData\Roaming\sleek is deleted by me before every new try below.


If you start sleek.exe from Power Shell, does it give you a new/different error or anything?

This is sleek using file 1 working.md:

PS B:\sleektest> .\sleek.exe
PS B:\sleektest>
config.ts: sleek userdata is located at: C:\Users\d21\AppData\Roaming\sleek\userData2.0.0-dev7
main.ts: Main window has been created successfully
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Set accordionOpenState to true,true,true,false,false,false,false,false,false
ipcEvents.ts: Set drawerWidth to 500
ipcEvents.ts: Set sorting to [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ipcEvents.ts: Set isDrawerOpen to false
ipcEvents.ts: Set isSearchOpen to false
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
File.ts: File watchers created
File.ts: File added, restarting file watchers
ipcEvents.ts: Received config value for files
FileWatcher.ts: New file added: B:\sleektest\1 working.md
FileWatcher.ts: Initial scan complete. Ready for changes
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting

This is sleek using file 2 not working.md:

PS B:\sleektest> .\sleek.exe
PS B:\sleektest>
config.ts: sleek userdata is located at: C:\Users\d21\AppData\Roaming\sleek\userData2.0.0-dev7
main.ts: Main window has been created successfully
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Set accordionOpenState to true,true,true,false,false,false,false,false,false
ipcEvents.ts: Set drawerWidth to 500
ipcEvents.ts: Set sorting to [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ipcEvents.ts: Set isDrawerOpen to false
ipcEvents.ts: Set isSearchOpen to false
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
File.ts: File watchers created
File.ts: File added, restarting file watchers
ipcEvents.ts: Received config value for files
FileWatcher.ts: New file added: B:\sleektest\2 not working.md
FileWatcher.ts: Initial scan complete. Ready for changes
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
(node:12152) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of null (reading '2')
    at t.Item.parse (B:\sleektest\resources\app.asar\dist\main\main.js:14:228532)
    at new t.Item (B:\sleektest\resources\app.asar\dist\main\main.js:14:228338)
    at B:\sleektest\resources\app.asar\dist\main\main.js:14:456602
    at Array.map (<anonymous>)
    at T (B:\sleektest\resources\app.asar\dist\main\main.js:14:456581)
    at R (B:\sleektest\resources\app.asar\dist\main\main.js:14:458683)
    at async IpcMainImpl.ee (B:\sleektest\resources\app.asar\dist\main\main.js:14:466576)
(Use `sleek --trace-warnings ...` to show where the warning was created)
(node:12152) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

And one more question: Is there a way you could create a todo file, which crashes sleek on your side and send it to me? One with just bogus data. You can send it here: ransome@duck.com

Both files [41d7286db70985e7ac05a1a5afa67e3a] are available at https://filetransfer.io/data-package/kLgvrjYA


The difference between 1 working.md and 2 not working.md: "1" only has one line (one ToDo)... 🙄


I hope that helps? Thanks again for your effort!

@dnngll
Copy link

dnngll commented Aug 31, 2023

@dnngll if your issue is related to the filewatcher, which is being used in sleek, we should give this latest developer preview a chance: https://github.com/ransome1/sleek/releases/tag/v2.0.0-dev7

I tweaked the configuration a little bit. I'm still curious about a "broken" text file from you, in order to fully reproduce this.

Funny you just posted this... But I did use dev7 above, phew 😇

@ransome1
Copy link
Owner

Hehe :)

The good news is, I can reproduce the issue with the non working file in my working environment. Let's see if I can find the root cause here.

@dnngll
Copy link

dnngll commented Aug 31, 2023

Hehe :)

The good news is, I can reproduce the issue with the non working file in my working environment. Let's see if I can find the root cause here.

PERFECT!!!

Looking at how you've handled issues in the past, I think it is safe to say that sleek will become my daily driver very soon 😊🥳

You have no idea how long I've been hoping for this to happen! Thank you so much!

@ransome1
Copy link
Owner

ransome1 commented Sep 1, 2023

So then, the issue is being caused by the jstodotxt extension, when it tries to read the 1st line of the 2 not working.md file.

TypeError: Cannot read properties of null (reading '2')
    at Item.parse (/Users/ransome/Development/sleek/node_modules/jstodotxt/src/Item.ts:128:25)
    at new Item (/Users/ransome/Development/sleek/node_modules/jstodotxt/src/Item.ts:106:8)
    at /Users/ransome/Development/sleek/src/main/modules/CreateTodoObjects.ts:77:16
    at Array.map (<anonymous>)
    at createTodoObjects (/Users/ransome/Development/sleek/src/main/modules/CreateTodoObjects.ts:66:6)
    at processDataRequest (/Users/ransome/Development/sleek/src/main/modules/ProcessDataRequest.ts:44:42)
    at async IpcMainImpl.handleDataRequest (/Users/ransome/Development/sleek/src/main/modules/Ipc.ts:11:55)

I cannot find anything in that line, which looks unusual.

What I found though is, that if I manually pass a line break \n (e.g. String contains a line \n break) to the jstodotxt module, if throws exactly the error we see when reading your file.

That's something I will pass on to the jstodotxt project.

As for now I added an error handling, which, will catch errors, when jstodotxt cannot parse a line and will skip that line. This doesn't solve our problem, as it would simply cut out your broken todo line. But at least render the rest.

I don't know if you already mentioned it, but can you tell me what other apps (Todo apps, editors, or anything which manipulates the files) you use to work on your todo files?

@dnngll
Copy link

dnngll commented Sep 1, 2023

Thank you for looking into it! That's so weird, I can't be the only one having this problem...

I cannot find anything in that line, which looks unusual.

That's what I mean... Nothing special to the file :(

That's something I will pass on to the jstodotxt project.

Thanks. So that's nothing you can fix on our side, right?

As for now I added an error handling, which, will catch errors, when jstodotxt cannot parse a line and will skip that line. This doesn't solve our problem, as it would simply cut out your broken todo line. But at least render the rest.

I'll try my "real" todo-file in dev8 and will let you know how many lines are skipped.

I don't know if you already mentioned it, but can you tell me what other apps (Todo apps, editors, or anything which manipulates the files) you use to work on your todo files?

On Windows I am using todotxt.net (https://github.com/jdckr/todotxt.net), Sublime Text portable, a self-made batch to add todos, a self-made ahk-script to add todos, Obsidian and Windows notepad.exe.

On Android I am using Simpletask and Obsidian

@ransome1
Copy link
Owner

ransome1 commented Sep 1, 2023

I think if I find out what exactly it is, that is making jsTodoTxt throw the error, I can intercept it. If it's some hidden character, I can cut it out. I will investigate it.

@dnngll
Copy link

dnngll commented Sep 1, 2023

Okay, thanks!

@ransome1
Copy link
Owner

ransome1 commented Sep 1, 2023

I havn't found a solution yet, but I think I can say with some certainty, that the problem lies in the last character of the 1st line in 2 not working.md
Bildschirmfoto 2023-09-01 um 20 38 39

It is something read by JavaScript as a whitespace character. If I simply cut the last character out of the string, this does not cut out the z, which should be the last character. And if I then send it to the jstodotxt module, the todo is being parsed.

I tried to find out what this character is, but were not successful yet. It is not a new line \n neither is it an empty space.

Could you check, if your custom script does add some unique character at the end of the line? Maybe it tries to enforce a new line or something like that.

@ransome1
Copy link
Owner

ransome1 commented Sep 3, 2023

@dnngll although it won't really help you, you can try out the latest developer preview: https://github.com/ransome1/sleek/releases/tag/v2.0.0-dev8

If a line in the file contains something, which jstodotxt cannot 'digest', sleek will skip it.

But I assume, that all the lines in your file will contain this mysterious character and it might cut out all your todos :/

@dnngll
Copy link

dnngll commented Sep 13, 2023

Hey @ransome1 ,

thank you for your reply. I just got back and tried something new, which will address your point in #68 (comment) .


I created a new file through the Windows context menu "New | Text Document" and named it 3 working notepad.md. I used Windows Notepad and typed the content by hand. This is the content of file 3 working notepad.md:

2121-09-13 +dede +frfr gtgt @hzhz

Or as a screenshot, cursor on end:

2023 09 13, 17 06 42


Then I duplicated that file, renamed it into 4 not working notepad.md, opened it with Notepad again and added a new line at the end (just by pressing enter). This is the content of file 4 not working notepad.md:

2121-09-13 +dede +frfr gtgt @hzhz

Or again as a screenshot, cursor on end:

2023 09 13, 17 06 51


These are the results of Powershell on 3 working notepad.md:

PS B:\sleektest> .\sleek.exe
PS B:\sleektest>
config.ts: sleek userdata is located at: C:\Users\d21\AppData\Roaming\sleek\userData2.0.0-dev7
main.ts: Main window has been created successfully
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Set accordionOpenState to true,true,true,false,false,false,false,false,false
ipcEvents.ts: Set drawerWidth to 500
ipcEvents.ts: Set sorting to [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ipcEvents.ts: Set isDrawerOpen to false
ipcEvents.ts: Set isSearchOpen to false
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
File.ts: File watchers created
File.ts: File added, restarting file watchers
ipcEvents.ts: Received config value for files
FileWatcher.ts: New file added: B:\sleektest\3 working notepad.md
FileWatcher.ts: Initial scan complete. Ready for changes
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting

These are the results of Powershell on 4 not working notepad.md:

PS B:\sleektest> .\sleek.exe
PS B:\sleektest>
config.ts: sleek userdata is located at: C:\Users\d21\AppData\Roaming\sleek\userData2.0.0-dev7
main.ts: Main window has been created successfully
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Set accordionOpenState to true,true,true,false,false,false,false,false,false
ipcEvents.ts: Set drawerWidth to 500
ipcEvents.ts: Set sorting to [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ipcEvents.ts: Set isDrawerOpen to false
ipcEvents.ts: Set isSearchOpen to false
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
File.ts: File watchers created
File.ts: File added, restarting file watchers
ipcEvents.ts: Received config value for files
FileWatcher.ts: New file added: B:\sleektest\4 not working notepad.md
FileWatcher.ts: Initial scan complete. Ready for changes
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
(node:14588) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of null (reading '2')
    at t.Item.parse (B:\sleektest\resources\app.asar\dist\main\main.js:14:228532)
    at new t.Item (B:\sleektest\resources\app.asar\dist\main\main.js:14:228338)
    at B:\sleektest\resources\app.asar\dist\main\main.js:14:456602
    at Array.map (<anonymous>)
    at T (B:\sleektest\resources\app.asar\dist\main\main.js:14:456581)
    at R (B:\sleektest\resources\app.asar\dist\main\main.js:14:458683)
    at async IpcMainImpl.ee (B:\sleektest\resources\app.asar\dist\main\main.js:14:466576)
(Use `sleek --trace-warnings ...` to show where the warning was created)
(node:14588) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

That's so weird, isn't it? You could simply create these files yourself, however I uploaded then just in case you want to check them out: https://filetransfer.io/data-package/EjleeshY


I used dev7 (sleek-2.0.0-dev7-win.zip [ace17a1a2cf7bd4daa08f12dc24205b9]), because I didn't want the errors to be cut out.

Also, I always deleted the userfolder before.


I hope you can make any sense of this? I will try the same with the current dev now - just in case! Will get back to you asap...

@dnngll
Copy link

dnngll commented Sep 13, 2023

That took forever, since I'm on a very slow connection currently :(


Using dev9 (sleek-2.0.0-dev9-win.zip [214ead1e2e776184a55da23d1812a5a9]), always deleting userfolder, using the files from above (#68 (comment)):


These are the results of Powershell on 3 working notepad.md:

PS B:\sleektest> .\sleek.exe
PS B:\sleektest>
config.ts: sleek userdata is located at: C:\Users\d21\AppData\Roaming\sleek\userData2.0.0-dev9
main.ts: Main window has been created successfully
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationHidden
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Set accordionOpenState to true,true,true,false,false,false,false,false,false
ipcEvents.ts: Set drawerWidth to 500
ipcEvents.ts: Set isNavigationHidden to false
ipcEvents.ts: Set sorting to [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ipcEvents.ts: Set isDrawerOpen to false
ipcEvents.ts: Set isSearchOpen to false
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationHidden
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
File.ts: File watchers created
File.ts: File added, restarting file watchers
ipcEvents.ts: Received config value for files
FileWatcher.ts: New file added: B:\sleektest\3 working notepad.md
FileWatcher.ts: Initial scan complete. Ready for changes
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationHidden
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationHidden
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationHidden
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs

Plus, a screenshot:

2023 09 13, 17 39 08


These are the results of Powershell on 4 not working notepad.md:

PS B:\sleektest> .\sleek.exe
PS B:\sleektest>
config.ts: sleek userdata is located at: C:\Users\d21\AppData\Roaming\sleek\userData2.0.0-dev9
main.ts: Main window has been created successfully
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationHidden
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Set accordionOpenState to true,true,true,false,false,false,false,false,false
ipcEvents.ts: Set drawerWidth to 500
ipcEvents.ts: Set isNavigationHidden to false
ipcEvents.ts: Set sorting to [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ipcEvents.ts: Set isDrawerOpen to false
ipcEvents.ts: Set isSearchOpen to false
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationHidden
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
File.ts: File watchers created
File.ts: File added, restarting file watchers
ipcEvents.ts: Received config value for files
FileWatcher.ts: New file added: B:\sleektest\4 not working notepad.md
FileWatcher.ts: Initial scan complete. Ready for changes
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationHidden
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
TypeError: Cannot read properties of null (reading '2')
    at t.Item.parse (B:\sleektest\resources\app.asar\dist\main\main.js:14:228532)
    at new t.Item (B:\sleektest\resources\app.asar\dist\main\main.js:14:228338)
    at B:\sleektest\resources\app.asar\dist\main\main.js:14:457396
    at Array.map (<anonymous>)
    at D (B:\sleektest\resources\app.asar\dist\main\main.js:14:457371)
    at j (B:\sleektest\resources\app.asar\dist\main\main.js:14:459144)
    at async IpcMainImpl.ne (B:\sleektest\resources\app.asar\dist\main\main.js:14:468003)
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationHidden
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationHidden
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState

Plus, a screenshot again:

2023 09 13, 17 40 04


Does that help?

@dnngll
Copy link

dnngll commented Sep 13, 2023

Uh and just for shits and giggles I opened my real todo.txt in dev9 (sleek-2.0.0-dev9-win.zip [214ead1e2e776184a55da23d1812a5a9]).

Here's the file in Sublime (obfuscated):

2023 09 13, 17 48 31

And here's the file in Sleek:

2023 09 13, 17 48 10

Like you said, everything is filtered out... 😢

@dnngll
Copy link

dnngll commented Sep 13, 2023

TLDR: IT'S WORKING!!! 🎉


I see you just released dev10 - wow! Here are the results using dev10 (sleek-2.0.0-dev10-win.zip [2c5a9b8e21d8472e5021e36cd0df1950]), always deleting userfolder, using the files from above (#68 (comment)):


These are the results of Powershell on 3 working notepad.md:

PS B:\sleektest> .\sleek.exe
PS B:\sleektest>
config.ts: sleek userdata is located at: C:\Users\d21\AppData\Roaming\sleek\userData2.0.0-dev10
main.ts: Main window has been created successfully
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationOpen
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Set accordionOpenState to true,true,true,false,false,false,false,false,false
ipcEvents.ts: Set drawerWidth to 500
ipcEvents.ts: Set sorting to [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ipcEvents.ts: Set isDrawerOpen to false
ipcEvents.ts: Set isSearchOpen to false
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationOpen
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
File.ts: File watchers created
File.ts: File added, restarting file watchers
ipcEvents.ts: Received config value for files
FileWatcher.ts: New file added: B:\sleektest\3 working notepad.md
FileWatcher.ts: Initial scan complete. Ready for changes
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationOpen
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationOpen
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationOpen
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs

These are the results of Powershell on 4 not working notepad.md:

PS B:\sleektest> .\sleek.exe
PS B:\sleektest>
config.ts: sleek userdata is located at: C:\Users\d21\AppData\Roaming\sleek\userData2.0.0-dev10
main.ts: Main window has been created successfully
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationOpen
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Set accordionOpenState to true,true,true,false,false,false,false,false,false
ipcEvents.ts: Set drawerWidth to 500
ipcEvents.ts: Set sorting to [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
ipcEvents.ts: Set isDrawerOpen to false
ipcEvents.ts: Set isSearchOpen to false
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationOpen
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
File.ts: File watchers created
File.ts: File added, restarting file watchers
ipcEvents.ts: Received config value for files
FileWatcher.ts: New file added: B:\sleektest\4 not working notepad.md
FileWatcher.ts: Initial scan complete. Ready for changes
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationOpen
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationOpen
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs
ipcEvents.ts: Received config value for appendCreationDate
ipcEvents.ts: Received config value for convertRelativeToAbsoluteDates
ipcEvents.ts: Received config value for notificationsAllowed
ipcEvents.ts: Received config value for drawerWidth
ipcEvents.ts: Received config value for accordionOpenState
ipcEvents.ts: Received config value for files
ipcEvents.ts: Received config value for isDrawerOpen
ipcEvents.ts: Received config value for isSearchOpen
ipcEvents.ts: Received config value for sorting
ipcEvents.ts: Received config value for isNavigationOpen
ipcEvents.ts: Received config value for colorTheme
ipcEvents.ts: Received config value for shouldUseDarkColors
ipcEvents.ts: Received config value for showFileTabs

I'm really curious - what was the issue?

Again, thank you so much. I am really looking forward to using Sleek now 😁

@ransome1
Copy link
Owner

I just deleted the Dev10 again, because it wasn't working as expected.

But thanks to your input here I now found the root cause: In Windows a line break is being represented as \r\n (Carriage return + Line Feed). Since I work on Unix based systems, I used \n to detect a line break in the files. So my implementation simply used \n to understand, that the todo ends and the next one start. But it left \r at the end of the line. And sending this character to the parser (jsTodoTxt) wasn't handled by it and simply through the error.

I will implement a multi platform compatible solution and push this into the new Dev10.

@dnngll
Copy link

dnngll commented Sep 13, 2023

I see! I find it really weird that I am the only one who was complaining about this. Seems no one else is on Windows... Or trying out the dev-versions...

I am just playing around with the (broken) dev10 (sleek-2.0.0-dev10-win.zip [2c5a9b8e21d8472e5021e36cd0df1950]) that I downloaded before, but will update to the newer version later as soon as you release it.

@dnngll
Copy link

dnngll commented Sep 13, 2023

You're doing something with the settings, right? Hardly anything there until dev7 (I didn't test dev8)

2023 09 13, 18 46 30
(dev7)

and not much more there in dev9 or the defective dev10...

2023 09 13, 18 47 24
(dev9)

@dnngll
Copy link

dnngll commented Sep 13, 2023

Totally disregard my last message. After playing around with that version for a bit, I realized that hardly anything is working yet.

I should have considered your info about the nightlies: "This is an early developer preview with some basic functionality implemented, although many features are still missing."

Looking forward to all the new features making it into the stable 👐 and will of course keep on testing future dev-versions.

Thanks

@ransome1
Copy link
Owner

Totally disregard my last message. After playing around with that version for a bit, I realized that hardly anything is working yet.

We are at a point where a lot of stuff is working already. What do you mean with hardly anything?

@dnngll
Copy link

dnngll commented Sep 13, 2023

I hope I didn't offend you by saying this, sorry if I did, didn't mean to. Here's what did not work:

  • After ticking off a ToDo, all other ToDos are not shown anymore (yet are still in the file). Maybe that has to do with the fact, that the ToDo was saved using CRLF before. After Sleek touches the file, it is saved using LF. When manually saving the file using CRLF again in another editor, all ToDos are displayed again in Sleek
  • Only 4 options available in Settings
  • Dark Theme will only apply to the title bar
  • Applying Dark Theme is not saved, it will only work the first time. After restarting Sleek it will not show and cannot be set again. To set again one has to cheat: Sleek-Folder and User-Folder have to be deleted
  • Can't filter by "has no" Project- or Context (or I can't find it)

So it was not really usable for me right now, which is why I thought that not everything has been implemented in these builds...

Hope I could help!

@ransome1
Copy link
Owner

So it was not really usable for me right now, which is why I thought that not everything has been implemented in these builds...

It is not suppose to be usable for production use: #501

I updated the release description texts to further clear up, what is happening in this project right now.

Also let me close this thread for now, since we more or less hijacked it a little bit for something not related to the initial requirement. The line break issue should be resolved in the upcoming developer preview 10 and if it is not we should rather open a separate bug task.

@ransome1 ransome1 unpinned this issue Sep 14, 2023
@dnngll
Copy link

dnngll commented Sep 14, 2023

It is not suppose to be usable for production use: #501

I updated the release description texts to further clear up, what is happening in this project right now.

Yeah, my bad. I was so excited that you fixed #68 and wanted to use Sleek as my daily driver right away. So in my fantasy it was more of a "test new features in an upcoming version", than a complete rewrite. I know better now 😊

Really looking forward to "Once this foundational work is complete, there is room for new features. Hopefully developed not just by me. I sincerely hope that this endeavor will attract a broader range of contributors who will support me in achieving these goals." from your #501

Also let me close this thread for now, since we more or less hijacked it a little bit for something not related to the initial requirement.

Definitely, thanks

The line break issue should be resolved in the upcoming developer preview 10 and if it is not we should rather open a separate bug task.

Yes, it was already resolved in the defective dev10 that I was able to download before you deleted it. I think however, the CRLF / LF problem after Sleek touches the file (first point from my #68 (comment) ) might be related, but I'm sure you've got it covered. Which brings me to my last point:

I suppose I will not create new issues about what I mentioned in #68 (comment) (using the defective dev10), until the new dev10 comes out? To save you some time and to not hijack this thread any more, please only reply, if you want me to create new issues right away. If I don't hear anything from you here, I would wait for the final dev10.

Thanks again @ransome1 !

@ransome1
Copy link
Owner

I suppose I will not create new issues about what I mentioned in #68 (comment) (using the defective dev10), until the new dev10 comes out? To save you some time and to not hijack this thread any more, please only reply, if you want me to create new issues right away. If I don't hear anything from you here, I would wait for the final dev10.

I hadn't seen this particular issue on my side, but I would propose once the Dev 10 uploaded, you give it another try on your system. And if anything weird happens, I would appreciate a separate bug report.

@ransome1
Copy link
Owner

@dnngll I tested the latest implementation on a Windows machine and couldn't reproduce the error any more. So please feel free to test it out yourself and if it still throws the error or shows some other unwanted behavior, let's open a dedicated bug report for it.

https://github.com/ransome1/sleek/releases/tag/v2.0.0-dev10

@dnngll
Copy link

dnngll commented Oct 4, 2023

Hey @ransome1

last week I did test all 4 files from above plus my 3 main todo-files, using sleek-2.0.0-dev13-win.zip [87e66bcb3f29fdd7c7bd776d30221fa6]. Every file worked flawlessly, and I did a lot of testing (check todo, new todo, delete todo, archive ticked todos, change todo-file from somewhere else) with all 7 files. Thank you so much!

I am on dev-13 still, but will test dev-14 (sleek-2.0.0-dev14-win.zip [146e01e975161180a4064256c459c672], which somehow can't be found on https://github.com/ransome1/sleek/releases) from now on.

@ransome1
Copy link
Owner

ransome1 commented Oct 8, 2023

@dnngll the win.zip should be there, here is the direct link: https://github.com/ransome1/sleek/releases/download/v2.0.0-dev14/sleek-2.0.0-dev14-win.zip

@dnngll
Copy link

dnngll commented Oct 9, 2023

Yeah I know, thanks. I've been using it since last week. I got the link through the email GitHub sends automatically when subscribed.

I just wanted to point out that dev-14 (still) can't be found on the official release-page https://github.com/ransome1/sleek/releases for some reason.

Very much looking forward for the final 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impediment Something is blocking work on this task
Projects
Status: Done
Development

No branches or pull requests

6 participants