From 2e98f0e5ebe9c34a783ce7251b98dd0d5f1533c3 Mon Sep 17 00:00:00 2001 From: Rob Erskine Date: Sun, 26 Jan 2025 20:04:30 -0500 Subject: [PATCH 1/6] ISSUE-16579 - Todoist: Adding Complete Task shortcut preference --- extensions/todoist/CHANGELOG.md | 4 +++ extensions/todoist/README.md | 17 +++++----- extensions/todoist/package.json | 21 +++++++++++- .../todoist/src/components/TaskActions.tsx | 34 ++++++++++++++----- 4 files changed, 58 insertions(+), 18 deletions(-) diff --git a/extensions/todoist/CHANGELOG.md b/extensions/todoist/CHANGELOG.md index d93461a94a5..145c03446c4 100644 --- a/extensions/todoist/CHANGELOG.md +++ b/extensions/todoist/CHANGELOG.md @@ -1,5 +1,9 @@ # Todoist Changelog +## [Add Complete Task Shortcut Preferences] - {PR_MERGE_DATE} + +- Adding in a preference to set a shortcut for completing a task. + ## [Quick Add Task Improvement] - 2024-12-02 Added a pop to the root and cleared the search bar after creating a task for the `close window immediately` preference. diff --git a/extensions/todoist/README.md b/extensions/todoist/README.md index d4d0ab50c28..73b85d645d5 100644 --- a/extensions/todoist/README.md +++ b/extensions/todoist/README.md @@ -6,14 +6,14 @@ Check your Todoist tasks from within Raycast and quickly create new ones. ## Create Tasks View - You can quickly access your `Home` command favorites views using deep-links and quick-links. Here's how: +You can quickly access your `Home` command favorites views using deep-links and quick-links. Here's how: - 1. Open the `Home` command and select your view in the dropdown (e.g `All Tasks` or a specific project) - 2. Search for `Create View Quicklink` in the actions (`⌘` + `K`). - 3. Give the quicklink a custom name (optional) and create it (`⌘` + `⏎`). - 4. Use Raycast root search to find your new quicklink and quickly access your tasks view. +1. Open the `Home` command and select your view in the dropdown (e.g `All Tasks` or a specific project) +2. Search for `Create View Quicklink` in the actions (`⌘` + `K`). +3. Give the quicklink a custom name (optional) and create it (`⌘` + `⏎`). +4. Use Raycast root search to find your new quicklink and quickly access your tasks view. - This makes it easy to access any of your views, including projects and labels! +This makes it easy to access any of your views, including projects and labels! ## Disabled Commands @@ -22,9 +22,8 @@ This extension includes a few commands that are disabled by default. You can ena - `Create Project` - `Unfocus Current Task` - ## Using the Extension With an API Token -In most cases, you can use OAuth to authenticate with Todoist. You'll be prompted to connect your Todoist account when using any of the extension's commands. +In most cases, you can use OAuth to authenticate with Todoist. You'll be prompted to connect your Todoist account when using any of the extension's commands. -However, if you prefer, you can also use an API token. To do so, you need to retrieve your token from the [integration settings view](https://todoist.com/app/settings/integrations) under the section called **API token**. Copy it and paste in the extension's preferences under **Todoist Token**. \ No newline at end of file +However, if you prefer, you can also use an API token. To do so, you need to retrieve your token from the [integration settings view](https://todoist.com/app/settings/integrations) under the section called **API token**. Copy it and paste in the extension's preferences under **Todoist Token**. diff --git a/extensions/todoist/package.json b/extensions/todoist/package.json index 0cb67dfa225..08e933416c8 100644 --- a/extensions/todoist/package.json +++ b/extensions/todoist/package.json @@ -17,7 +17,8 @@ "gerardcs", "prince_yadav", "stelo", - "ridemountainpig" + "ridemountainpig", + "Rob" ], "commands": [ { @@ -245,6 +246,24 @@ "title": "Focus Label", "description": "Shared label name to apply to your focused task. No label will be applied if left empty.", "placeholder": "raycast-focus" + }, + { + "name": "completeTaskShortcut", + "title": "Complete Task Shortcut", + "description": "Shortcut to complete the current task", + "type": "dropdown", + "required": false, + "default": "shiftCmdE", + "data": [ + { + "title": "cmd + enter", + "value": "cmdE" + }, + { + "title": "shift + cmd + e", + "value": "shiftCmdE" + } + ] } ], "dependencies": { diff --git a/extensions/todoist/src/components/TaskActions.tsx b/extensions/todoist/src/components/TaskActions.tsx index 2f72b291d1c..d5f79aeca9e 100644 --- a/extensions/todoist/src/components/TaskActions.tsx +++ b/extensions/todoist/src/components/TaskActions.tsx @@ -1,4 +1,14 @@ -import { Action, ActionPanel, Color, Icon, Toast, confirmAlert, showToast, useNavigation } from "@raycast/api"; +import { + Action, + ActionPanel, + Color, + Icon, + Toast, + confirmAlert, + showToast, + useNavigation, + getPreferenceValues, +} from "@raycast/api"; import { Fragment } from "react"; import { @@ -40,6 +50,12 @@ import TaskCommentForm from "./TaskCommentForm"; import TaskComments from "./TaskComments"; import TaskEdit from "./TaskEdit"; +interface Preferences { + completeTaskShortcut: string; +} + +const preferences = getPreferenceValues(); + type TaskActionsProps = { task: Task; fromDetail?: boolean; @@ -200,6 +216,15 @@ export default function TaskActions({ return ( <> + completeTask(task)} + /> + {isTodoistInstalled ? ( } /> - completeTask(task)} - /> - Date: Sun, 26 Jan 2025 21:32:33 -0500 Subject: [PATCH 2/6] ISSUE-16579 :Removing completeTaskShortcut interface Co-authored-by: stelo <42366677+jfkisafk@users.noreply.github.com> --- extensions/todoist/src/components/TaskActions.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/extensions/todoist/src/components/TaskActions.tsx b/extensions/todoist/src/components/TaskActions.tsx index d5f79aeca9e..6a94c33ae8a 100644 --- a/extensions/todoist/src/components/TaskActions.tsx +++ b/extensions/todoist/src/components/TaskActions.tsx @@ -50,10 +50,6 @@ import TaskCommentForm from "./TaskCommentForm"; import TaskComments from "./TaskComments"; import TaskEdit from "./TaskEdit"; -interface Preferences { - completeTaskShortcut: string; -} - const preferences = getPreferenceValues(); type TaskActionsProps = { From 24086cb65c537e9b455b53dabca9e8309fd5cb52 Mon Sep 17 00:00:00 2001 From: Rob Erskine Date: Sun, 26 Jan 2025 21:45:37 -0500 Subject: [PATCH 3/6] ISSUE-16579 - Todoist adding cmd + O to default open command --- extensions/todoist/src/components/TaskActions.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/todoist/src/components/TaskActions.tsx b/extensions/todoist/src/components/TaskActions.tsx index 6a94c33ae8a..ed65b7bc927 100644 --- a/extensions/todoist/src/components/TaskActions.tsx +++ b/extensions/todoist/src/components/TaskActions.tsx @@ -3,6 +3,7 @@ import { ActionPanel, Color, Icon, + Keyboard, Toast, confirmAlert, showToast, @@ -227,12 +228,13 @@ export default function TaskActions({ target={getTaskAppUrl(task.id)} icon="todoist.png" application="Todoist" + shortcut={Keyboard.Shortcut.Common.Open} /> ) : ( )} From f3ae6252942f7db65b96d5676718b5783efcbd3a Mon Sep 17 00:00:00 2001 From: Rob Erskine Date: Wed, 29 Jan 2025 14:33:41 -0500 Subject: [PATCH 4/6] ISSUE-16579 - Todoist: simplifying task action shortcuts --- extensions/todoist/CHANGELOG.md | 4 +++- extensions/todoist/package.json | 18 ------------------ .../todoist/src/components/TaskActions.tsx | 8 +------- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/extensions/todoist/CHANGELOG.md b/extensions/todoist/CHANGELOG.md index 145c03446c4..c28c7a6c68f 100644 --- a/extensions/todoist/CHANGELOG.md +++ b/extensions/todoist/CHANGELOG.md @@ -2,7 +2,9 @@ ## [Add Complete Task Shortcut Preferences] - {PR_MERGE_DATE} -- Adding in a preference to set a shortcut for completing a task. +- Adjusting shortcuts for the following task actions: + - Complete Task - Now `⌘` + `Enter` (previously `shift` + `⌘` + `E`) + - Open Task in Todoist - Now `⌘` + `O` (previously `⌘` + `Enter`) ## [Quick Add Task Improvement] - 2024-12-02 diff --git a/extensions/todoist/package.json b/extensions/todoist/package.json index 08e933416c8..51b5cfa1f38 100644 --- a/extensions/todoist/package.json +++ b/extensions/todoist/package.json @@ -246,24 +246,6 @@ "title": "Focus Label", "description": "Shared label name to apply to your focused task. No label will be applied if left empty.", "placeholder": "raycast-focus" - }, - { - "name": "completeTaskShortcut", - "title": "Complete Task Shortcut", - "description": "Shortcut to complete the current task", - "type": "dropdown", - "required": false, - "default": "shiftCmdE", - "data": [ - { - "title": "cmd + enter", - "value": "cmdE" - }, - { - "title": "shift + cmd + e", - "value": "shiftCmdE" - } - ] } ], "dependencies": { diff --git a/extensions/todoist/src/components/TaskActions.tsx b/extensions/todoist/src/components/TaskActions.tsx index ed65b7bc927..44cd4e6cade 100644 --- a/extensions/todoist/src/components/TaskActions.tsx +++ b/extensions/todoist/src/components/TaskActions.tsx @@ -7,8 +7,7 @@ import { Toast, confirmAlert, showToast, - useNavigation, - getPreferenceValues, + useNavigation } from "@raycast/api"; import { Fragment } from "react"; @@ -51,8 +50,6 @@ import TaskCommentForm from "./TaskCommentForm"; import TaskComments from "./TaskComments"; import TaskEdit from "./TaskEdit"; -const preferences = getPreferenceValues(); - type TaskActionsProps = { task: Task; fromDetail?: boolean; @@ -216,9 +213,6 @@ export default function TaskActions({ completeTask(task)} /> From d86599461f77a686f90bc85eabadb881045ef2d0 Mon Sep 17 00:00:00 2001 From: Rob Erskine Date: Wed, 29 Jan 2025 14:37:28 -0500 Subject: [PATCH 5/6] ISSUE-16579 - Todoist: running prettier --- extensions/todoist/src/components/TaskActions.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/extensions/todoist/src/components/TaskActions.tsx b/extensions/todoist/src/components/TaskActions.tsx index 44cd4e6cade..e4c9485ba9c 100644 --- a/extensions/todoist/src/components/TaskActions.tsx +++ b/extensions/todoist/src/components/TaskActions.tsx @@ -7,7 +7,7 @@ import { Toast, confirmAlert, showToast, - useNavigation + useNavigation, } from "@raycast/api"; import { Fragment } from "react"; @@ -210,11 +210,7 @@ export default function TaskActions({ return ( <> - completeTask(task)} - /> + completeTask(task)} /> {isTodoistInstalled ? ( Date: Fri, 31 Jan 2025 11:06:40 +0100 Subject: [PATCH 6/6] Fix readme --- extensions/todoist/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/todoist/README.md b/extensions/todoist/README.md index 73b85d645d5..80073b2288c 100644 --- a/extensions/todoist/README.md +++ b/extensions/todoist/README.md @@ -1,4 +1,4 @@ -# Todoist +My understanding is that scheduled means planned for today or tomorrow or even further into the future ?# Todoist **This extension is not created by, affiliated with, or supported by Doist.** @@ -8,10 +8,10 @@ Check your Todoist tasks from within Raycast and quickly create new ones. You can quickly access your `Home` command favorites views using deep-links and quick-links. Here's how: -1. Open the `Home` command and select your view in the dropdown (e.g `All Tasks` or a specific project) -2. Search for `Create View Quicklink` in the actions (`⌘` + `K`). -3. Give the quicklink a custom name (optional) and create it (`⌘` + `⏎`). -4. Use Raycast root search to find your new quicklink and quickly access your tasks view. +1. Open the `Home` command and select your view in the dropdown (e.g `All Tasks` or a specific project) +2. Search for `Create View Quicklink` in the actions (`⌘` + `K`). +3. Give the quicklink a custom name (optional) and create it (`⌘` + `⏎`). +4. Use Raycast root search to find your new quicklink and quickly access your tasks view. This makes it easy to access any of your views, including projects and labels!