Skip to content

Commit

Permalink
Todoist: Adding Complete Task shortcut preference (#16633)
Browse files Browse the repository at this point in the history
* ISSUE-16579 - Todoist: Adding Complete Task shortcut preference

* ISSUE-16579 :Removing completeTaskShortcut interface

Co-authored-by: stelo <[email protected]>

* ISSUE-16579 - Todoist adding cmd + O to default open command

* ISSUE-16579 - Todoist: simplifying task action shortcuts

* ISSUE-16579 - Todoist: running prettier

* Fix readme

---------

Co-authored-by: stelo <[email protected]>
Co-authored-by: Thomas Lombart <[email protected]>
  • Loading branch information
3 people authored Jan 31, 2025
1 parent 996cdbb commit 0162c12
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 22 deletions.
8 changes: 7 additions & 1 deletion extensions/todoist/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Todoist Changelog

## [Add Support for Task Deadlines] - {PR_MERGE_DATE}
## [Add Complete Task Shortcut Preferences] - 2025-01-31

- Adjusting shortcuts for the following task actions:
- Complete Task - Now `` + `Enter` (previously `shift` + `` + `E`)
- Open Task in Todoist - Now `` + `O` (previously `` + `Enter`)

## [Add Support for Task Deadlines] - 2025-01-31

It's now possible to specify a deadline when using the `Create Task` command. Deadlines are displayed in the task list and task details views.

Expand Down
19 changes: 9 additions & 10 deletions extensions/todoist/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# 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.**

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

Expand All @@ -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**.
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**.
5 changes: 3 additions & 2 deletions extensions/todoist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"prince_yadav",
"stelo",
"ridemountainpig",
"kcole93"
"kcole93",
"Rob"
],
"commands": [
{
Expand Down Expand Up @@ -279,4 +280,4 @@
"fix": "ray lint --fix",
"publish": "npx @raycast/api@latest publish"
}
}
}
24 changes: 15 additions & 9 deletions extensions/todoist/src/components/TaskActions.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
import { Action, ActionPanel, Color, Icon, Toast, confirmAlert, showToast, useNavigation } from "@raycast/api";
import {
Action,
ActionPanel,
Color,
Icon,
Keyboard,
Toast,
confirmAlert,
showToast,
useNavigation,
} from "@raycast/api";
import { Fragment } from "react";

import {
Expand Down Expand Up @@ -200,18 +210,21 @@ export default function TaskActions({

return (
<>
<Action title="Complete Task" icon={Icon.Checkmark} onAction={() => completeTask(task)} />

{isTodoistInstalled ? (
<Action.Open
title="Open Task in Todoist"
target={getTaskAppUrl(task.id)}
icon="todoist.png"
application="Todoist"
shortcut={Keyboard.Shortcut.Common.Open}
/>
) : (
<Action.OpenInBrowser
title="Open Task in Browser"
url={getTaskUrl(task.id)}
shortcut={{ modifiers: ["cmd"], key: "o" }}
shortcut={Keyboard.Shortcut.Common.Open}
/>
)}

Expand Down Expand Up @@ -245,13 +258,6 @@ export default function TaskActions({
target={<TaskEdit task={task} />}
/>

<Action
title="Complete Task"
icon={Icon.Checkmark}
shortcut={{ modifiers: ["cmd", "shift"], key: "e" }}
onAction={() => completeTask(task)}
/>

<Action.PickDate
title="Schedule Task"
type={Action.PickDate.Type.DateTime}
Expand Down

0 comments on commit 0162c12

Please sign in to comment.