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

Restore Todoist nested project logic #1224

Merged
merged 3 commits into from
Dec 13, 2018

Conversation

tcrammond
Copy link
Contributor

@tcrammond tcrammond commented Dec 12, 2018

Some useful project logic was mistakenly removed in #1197 . This re-introduces it.

The logic being re-introduced looks for the closest project in the Todoist project hierarchy that matches something in the user's Toggl workspace. This was existing behaviour that shouldn't be removed.

Resolves #1223, partially reverts #1197.

Second commit refactors the module according to eslint/prettier, and tweaks the integration to provide functions to the timer link instead of raw values (so that it can retrieve values at runtime after any changes, not only on load).

Testing points

  • Lowest level project in Todoist project hierarchy, which matches an existing project in your Toggl workspace, is added to the time entry.
  • Tags are added to the timer if the Todoist task has any tags or not.
  • If you open a task and then change the description or the tags, the latest values will be reflected in the popup after you click the timer button.
  • Extension doesn't error out if there isn't a project etc.

A previous release inadvertedly removed functionality from the Todoist integration. Project name is selected from the hierarchy of projects - projects in Todoist can be nested.

This partially reverts commit b3fbf2c.

The new feature for tags/labels is still intact.

Closes #1223.
Lint/format. Lightly refactor selectors to run when button is clicked, rather than only on load.
Copy link
Contributor

@leafi leafi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work pretty well with this Todoist integration, the project autoselect stuff :)

Didn't test tags. yarn xo doesn't even work for me, so I didn't run the linter.

Tested in Chrome.. no console errors.. LGTM 👍

@tcrammond tcrammond merged commit 27f81cb into master Dec 13, 2018
@tcrammond tcrammond deleted the 1223/revert-todoist-project-selection branch December 13, 2018 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect parent project of Todoist
2 participants