Skip to content

[Extension Feature Request] Add Todoist defaults values in preferences #714

Closed

Description

@emileaublet

Extension – Todoist.

Author: @thomaslombart @thomaspaulmann

Add default values in Todoist preferences (e.g. default priority, project, due date etc.) to make task creation faster.

Describe the feature and the current behavior/state.

Right now it defaults to the first item in the option list. If you create one and then a second one, the UI will keep the previous values but that will not be saved .

Activity

  1. added
    extension
    feature request
    on Jan 20, 2022
  2. thomaslombart commented on Jan 21, 2022

    @thomaslombart
    Contributor

    It's not possible to add certain values in the preferences of the Todoist's extension because they can be dynamic, like the projects or the labels. While it's still possible to do it for the due dates and priorities, I would find it to be confusing to have my creation task form with certain values filled and not the others. What do you think?

  3. thomaspaulmann commented on Jan 21, 2022

    @thomaspaulmann
    Member

    @thomaslombart not sure if you already use the storeValue prop on the Form components. It allows you to smartly remember the last selected value, which is handy for some fields like projects. This way you can create a few todos for the same project faster. Maybe worth experimenting with?

  4. emileaublet commented on Jan 21, 2022

    @emileaublet
    Author

    In any case, there's currently a bug where the previous value still look selected (e.g. due date) after creating a task, but is actually not selected.

  5. thomaslombart commented on Jan 24, 2022

    @thomaslombart
    Contributor

    That's an interesting one @thomaspaulmann. I'm not sure it should be used for every field, but projects sound like a good use-case.

    @emileaublet I think that's one is due to an internal bug on Raycast where it's not possible to properly reset the date. I'm not sure of that, so I'll investigate it this week.

  6. thomaslombart commented on Jan 28, 2022

    @thomaslombart
    Contributor

    I did some investigations:

    • I can't really use storeValue because I'm making use of controlled form elements to properly reset the values afterward. I could go with a mix of uncontrolled and controlled form elements though. I'm wondering if using the storage API makes more sense here.
    • It seems the bug for resetting the due date is still a thing. I'm setting it to undefined after creating a task but for some reason, the due date isn't reset.
    • On the use case itself, I checked Todoist's quick-add feature and they don't seem to save any kind of values. I, myself for my workflow wouldn't like to save values because I'm quick-adding any kind of tasks for any kind of project. While the feature request makes sense for preferences (because the user has decided to do so), I don't think it's the same to automatically save it for him given the number of possible workflows.

    The only way to implement this feature would be to be able to sync Todoist's user data in the background with the Raycast extension + be able to dynamically change the user preferences but I don't think that's feasible for the time being.

    I'd suggest putting this issue on hold or closing it pending the improvements needed to make it work 🙂

  7. thomaspaulmann commented on Jan 28, 2022

    @thomaspaulmann
    Member

    @thomaslombart how does storeValue behave with controlled form elements? They should still work and set the value properly. You just need to make sure to not pass in undefined. If that doesn't work, we should take a look. It would be a shame when storeValue doesn't work with your setup.

  8. thomaslombart commented on Feb 1, 2022

    @thomaslombart
    Contributor

    @thomaspaulmann It seems that storeValue works properly when using a SubmitFormAction which is not the case in the "Create Task" command. The reason why SubmitFormAction is not used here is that there are two possible actions for the form:

    • Create a task
    • Create a task and go to project

    I guess it's possible to do so by replacing the "Create a task and go to project" action with a Toast with action though I didn't look at it yet.

  9. thomaspaulmann commented on Feb 1, 2022

    @thomaspaulmann
    Member

    You should be able to use the SubmitFormAction regardless. It has an onSubmit callback that gives you the form values but you can ignore it. It's just a thin wrapper to get the values. But this would make sure that we store the submitted value. Though, is this clearly communicated in our documentation?

  10. thomaslombart commented on Feb 3, 2022

    @thomaslombart
    Contributor

    The problem is that it seems we can use SubmitFormAction only once in the ActionPanel. However, the "Create Task" command has two action items which is a problem since only one is rendered under the hood. I took two screenshots to make this point clearer:

    CleanShot 2022-02-03 at 17 14 20@2x

    CleanShot 2022-02-03 at 17 14 39@2x

  11. thomaspaulmann commented on Feb 3, 2022

    @thomaspaulmann
    Member

    Oh interesting... This smells like a bug! Could you create a GH issue for it?

  12. thomaslombart commented on Feb 4, 2022

    @thomaslombart
    Contributor

    Oh, I thought it was designed that way and it wasn't actually a bug! Thanks for creating the GitHub issue.

  13. thomaslombart commented on Feb 7, 2022

    @thomaslombart
    Contributor

    @emileaublet I worked a bit on the extension this weekend. I added various improvements including the one you requested. Now creating a task saves the project and the labels for future usage. I didn't include the priority and the due date because I think they can vary a lot depending on the task.

    I did the same when creating a project with the color.

  14. added a commit that references this issue on Apr 23, 2024
  15. added a commit that references this issue on Nov 6, 2024
  16. added a commit that references this issue on Nov 12, 2024
  17. added a commit that references this issue on Sep 20, 2026
  18. added a commit that references this issue on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensionfeature request

    Type

    No type

    Fields

    Priority

    None yet

    Severity

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions