mgsloan / todoist-shortcuts

Browser extension which adds comprehensive keyboard shortcuts to Todoist, beyond what is offered by Todoist itself
MIT License
313 stars 23 forks source link

Date sort functionality not working #228

Closed joshdcurry closed 1 year ago

joshdcurry commented 1 year ago

Great extension! Thanks for working on it!

The "sort" hotkey is not working for due date, priority, assignee, and name on Chrome v106.0.5249.119 and Todoist v2611 (beta). Here's the warning shown in the log and what changes in the Todoist HTML source when I manually change "default" sort to "due date" sort.

Do you need more than this to diagnose?

Error message when due date sort attempted

todoist-shortcuts: Couldn't find unique descendant matching query li[aria-label="DUE_DATE"] , instead got null 
Error
    at getStack (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4168:13)
    at warn (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4151:22)
    at withUnique (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4232:7)
    at sortByDate (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:1177:5)
    at chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:4934:34
    at _fireCallback (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/mousetrap.js:634:17)
    at Mousetrap.self._handleKey (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/mousetrap.js:703:21)
    at Mousetrap.handleKey (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/mousetrap.js:1056:32)
    at Mousetrap.self._handleKeyEvent (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/mousetrap.js:763:18)
    at Mousetrap.handleKeyEvent (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/mousetrap.js:930:19)
    at HTMLDocument.genericKeyHandler (chrome-extension://dehmghpdcahlffompjagejmgbcfahndp/todoist-shortcuts.js:5010:24)
    at HTMLDocument.i (https://d3ptyyxy2at9ui.cloudfront.net/assets/vendor~add~app~authentication~electron-login~253ae210.4d64835a5ffd4b63bc9cbc1c31fb4c8f.js?l=src:78:6582)

Todoist HTML when "default" sort is selected

note <span class="fo6JWyT0wjybDRNRo7zSGw==">**Default**</span>

<div class="icon_menu_item__content">
  <span id="view_menu__sort_by" class="view_menu__label">Sort by</span>
  <span aria-labelledby="view_menu__sort_by" class="_64hRsOn+Tni3ar2PP8TK5g== form_field_control ztDrZ1s8iwYgPA5xjTDXCA==" aria-owns="dropdown-select-23-popup" aria-controls="dropdown-select-23-popup" aria-expanded="true" aria-haspopup="listbox">
    <span class="fo6JWyT0wjybDRNRo7zSGw==">Default</span>
    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
      <g fill="none" fill-rule="evenodd">
        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M16 10l-4 4-4-4"></path>
      </g>
    </svg>
  </span>
</div>

Todoist HTML when "due date" sort is selected

note <span class="fo6JWyT0wjybDRNRo7zSGw==">**Due date**</span>

<div class="icon_menu_item__content">
  <span id="view_menu__sort_by" class="view_menu__label">Sort by</span>
  <span aria-labelledby="view_menu__sort_by" class="_64hRsOn+Tni3ar2PP8TK5g== form_field_control ztDrZ1s8iwYgPA5xjTDXCA==" aria-owns="dropdown-select-23-popup" aria-controls="dropdown-select-23-popup" aria-expanded="false" aria-haspopup="listbox">
    <span class="fo6JWyT0wjybDRNRo7zSGw==">Due date</span>
    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">
      <g fill="none" fill-rule="evenodd">
        <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M16 10l-4 4-4-4"></path>
      </g>
    </svg>
  </span>
</div>
mgsloan commented 1 year ago

Thanks for the detailed report! Fixed in version 168