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

Cannot add new tasks when a project is "Sorted" #183

Closed
llinfeng opened this issue Sep 15, 2021 · 7 comments
Closed

Cannot add new tasks when a project is "Sorted" #183

llinfeng opened this issue Sep 15, 2021 · 7 comments
Labels
bug Something isn't working can't repro

Comments

@llinfeng
Copy link

@mgsloan I am writing to report that sorting tasks in a project may stop the o key to work. In the worst case, I have experienced times when I cannot save a task after trying to create it manually. I don't have a fix. It helps to warn people in the ReadMe, say, in the ## Sorting section about the limitation if we have to live with it :)

Here are a few more detailed notes.


With a fresh account for Todoist and todoist-shortcuts with either Firefox/Chrome, after selecting any of the "Sort" options, the extension/add-on won't allow me to create a new task. It doesn't matter how I sort the tasks, be it manually through the Sort icon on Todoist, or with s, p, r, or n on the keyboard.

Hitting o summons the following view, where neither of the two pop-up boxes are useful/operable. The "Add task" box accepts mouse clicks, but does not pick up any keystrokes from the keyboard. The menu box on the right also accepts mouse clicks, but instead operates on the currently selected task.

image

I am picking up the following logs from the console after hitting Ctrl+Shift+I in Chrome. ```

vendor.1d7cbd5093c12f86c3df.js?WB_REVISION=c870d0af2faa5a2ca5b23239f714e4e8:1 todoist-shortcuts: Couldn't find unique descendant with class menu_item and matching predicate, instead got null
Error
at getStack (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:3806:13)
at warn (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:3789:22)
at withUniqueClass (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:3979:7)
at chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:2594:9
at withUniqueClass (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:3977:14)
at chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:2115:9
at withUnique (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:3868:14)
at chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:2113:7
at withTaskHovered (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:2546:7)
at withTaskMenuImpl (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:2111:5)
at withTaskMenu (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:2102:7)
at addAboveOrBelowTask (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:2593:7)
at addBelowTask (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:2579:5)
at addBelow (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:893:5)
at chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4604:34
at d (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4567:84)
at o.m._handleKey (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4578:248)
at o.handleKey (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4545:1722)
at o.m._handleKeyEvent (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4584:34)
at o.handleKeyEvent (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4545:804)
at HTMLDocument.genericKeyHandler (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4680:24)
(anonymous) @ vendor.1d7cbd5093c12f86c3df.js?WB_REVISION=c870d0af2faa5a2ca5b23239f714e4e8:1
warn @ todoist-shortcuts.js:3791
withUniqueClass @ todoist-shortcuts.js:3979
(anonymous) @ todoist-shortcuts.js:2594
withUniqueClass @ todoist-shortcuts.js:3977
(anonymous) @ todoist-shortcuts.js:2115
withUnique @ todoist-shortcuts.js:3868
(anonymous) @ todoist-shortcuts.js:2113
withTaskHovered @ todoist-shortcuts.js:2546
withTaskMenuImpl @ todoist-shortcuts.js:2111
withTaskMenu @ todoist-shortcuts.js:2102
addAboveOrBelowTask @ todoist-shortcuts.js:2593
addBelowTask @ todoist-shortcuts.js:2579
addBelow @ todoist-shortcuts.js:893
(anonymous) @ todoist-shortcuts.js:4604
d @ todoist-shortcuts.js:4567
m._handleKey @ todoist-shortcuts.js:4578
o.handleKey @ todoist-shortcuts.js:4545
m._handleKeyEvent @ todoist-shortcuts.js:4584
o.handleKeyEvent @ todoist-shortcuts.js:4545
genericKeyHandler @ todoist-shortcuts.js:4680
vendor.1d7cbd5093c12f86c3df.js?WB_REVISION=c870d0af2faa5a2ca5b23239f714e4e8:1 todoist-shortcuts: Clicking quick add task, as filter view has no task adding. (this is fine)


</details>
@llinfeng
Copy link
Author

The same limitation applies to all the Filters. When there is no task, o key works but adds a plain task to the Inbox. When there are tasks in the filter, the same set of two pop-ups shows up after pressing the o key.

@mgsloan mgsloan added the bug Something isn't working label Sep 27, 2021
@mgsloan
Copy link
Owner

mgsloan commented Sep 27, 2021

Hmm, very curious! Thanks for reporting.

I haven't been able to reproduce these issues in my personal account, but have not yet tried with a fresh account. Are these issues still occurring now? Maybe updates to Todoist itself have fixed the problem

@llinfeng
Copy link
Author

With my test account, still, I was able to reproduce the problem as of 2021-09-27, in Chrome, with v1353.

@llinfeng
Copy link
Author

llinfeng commented Nov 3, 2021

Let me close this issue for now. The new Todoist shortcut is in conflict with this repo. O and o are not functioning, and I cannot even perform simple j/k-style navigation at this point.

I will reopen this issue should I get a chance to reproduce it.

@llinfeng llinfeng closed this as completed Nov 3, 2021
@llinfeng
Copy link
Author

llinfeng commented Nov 3, 2021

I find the Version 136 solved the compatibility issue with the new Todoist shortcut. I am reopening this issue as I can still reproduce the same problem. One new caveat is that sorting by priority can be set using p key, but cannot be removed. While the tasks in a project is sorted, I cannot even add a new task with the "Add task" button.

Here are the steps I followed to reproduce the problem:

  1. Clear Cookies and Cache, and log back in;
  2. Go to a project and sort with with p-key
  3. Move around using j/k and press o: still, two menu entries shall pop out.
  4. Subsequently, pressing p does nothing - it won't undo the sorting setting anymore.

When o key fails to work properly, I usually cannot add more tasks - pressing the enter key does nothing, nor does pressing the "Add task" button do anything.


Per my most recent test, to undo the sort-setting, I need to use the Todoist desktop app and check off the sorting option. Also, I need to clear the cookies and the cache for Todoist.com in Firefox to eventually restore normal functionality for o key.

There are also tests where p still can undo the sort-setting, but not all tasks are shown in the project. In a project with 6 tasks, only one is rendered.

@mgsloan
Copy link
Owner

mgsloan commented Nov 9, 2021

@llinfeng Ah, thanks for your detailed description of the problem! I've fixed this in version 137. The sorting keybindings will now also remove sorting if used again.

@llinfeng
Copy link
Author

llinfeng commented Nov 9, 2021

@mgsloan Thanks a lot for getting o / O to work when things are sorted.

One caveat to note is that when there are sections in a project, sorting the list leaves o and O to function similarly - they both add a task to the very top of the task-list within the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working can't repro
Projects
None yet
Development

No branches or pull requests

2 participants