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

feat: Implement Task Dependencies #2568

Conversation

DanielTMolloy919
Copy link
Contributor

@DanielTMolloy919 DanielTMolloy919 commented Jan 10, 2024

Description

In This PR

Representing dependencies:

  • Add new field id
    • with emoji 🆔
    • dataview: [id:: dcf64c]
  • Add new field blockedBy
    • with emoji ⛔️
    • dataview: [blockedBy:: dcf64c,0h17ye]

New Instructions

  • is blocking
  • is not blocked
  • hide id
  • hide depends on
  • show id
  • show depends on

Note: the depends on ones will likely change to blocked by.

Other areas

  • UI in Edit Task modal for visualising and editing ids and dependencies
  • Add CSS for the new fields

Documentation

  • Add Task Dependencies.md

Remaining work

  • Rename the show/hide instructions to refer to blocked by. Already done
  • Add the new fields and instructions to docs:
    • Filters.md
    • Sorting.md
    • Grouping.md
    • Quick Reference.md
  • Render the fields in order id, blockedBy, other pre-existing fields
  • Try it out in large-scale vault and review queries needed
  • Edit Task Modal
    • Figure out how the new Edit Modal code will work in the Tasks API, which does not have access to all the tasks in the vault
    • Review the wording in the modal
  • Update screenshots in docs
  • Make the searches handle transitive/indirect dependencies - won't do, at least for this first release
  • Figure out how the searches relate to task status - I think DONE, CANCELLED and NON_TASK should never cause a task to be blocked
  • Add way of visualising dependencies
  • Add graphical way of adding and removing dependencies
  • Review new class names in styles.css - are they global?

Internal changes:

  • Consistent order of the new fields in the code
  • Tidy up the code in TaskDependency.ts
    • Look for abstractions
  • Divide new code in Edit Task model into Svelte Components

Motivation and Context

Partial implementation of #463.

How has this been tested?

  • Add new tests
  • Exploratory testing

Screenshots (if appropriate)

Types of changes

Changes visible to users:

  • Bug fix (prefix: fix - non-breaking change which fixes an issue)
  • New feature (prefix: feat - non-breaking change which adds functionality)
  • Breaking change (prefix: feat!! or fix!! - fix or feature that would cause existing functionality to not work as expected)
  • Documentation (prefix: docs - improvements to any documentation content for users)
  • Sample vault (prefix: vault - improvements to the Tasks-Demo sample vault)
  • Contributing Guidelines (prefix: contrib - any improvements to documentation content for contributors - see Contributing to Tasks)

Internal changes:

  • Refactor (prefix: refactor - non-breaking change which only improves the design or structure of existing code, and making no changes to its external behaviour)
  • Tests (prefix: test - additions and improvements to unit tests and the smoke tests)
  • Infrastructure (prefix: chore - examples include GitHub Actions, issue templates)

Checklist

Terms

…n_take_3

Commited with LEFTHOOK disabled, as several of my updates to test results
and code have been reverted multiple times.
Their CSS classes needed updating, when they were merged in from main.
@claremacrae claremacrae added the scope: task dependencies Anything to do with making tasks aware of other tasks label Jan 10, 2024
@claremacrae
Copy link
Collaborator

Just to say that I haven't forgotten about this... Getting sort by function good enough for release is taking much longer than I naively expected...

@claremacrae
Copy link
Collaborator

claremacrae commented Jan 20, 2024

Having asked for this to be created with only a minimal description, I've now added some info to the PR description.

Copy link
Collaborator

@claremacrae claremacrae left a comment

Choose a reason for hiding this comment

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

I've reviewed this code during its development - nothing to add, I'm very happy to merge it!

@claremacrae claremacrae merged commit 3c9383b into obsidian-tasks-group:main Jan 20, 2024
1 check passed
@claremacrae
Copy link
Collaborator

Awesome work @DanielTMolloy919 - huge thanks!

❤️ 🙏 🎉

@DanielTMolloy919
Copy link
Contributor Author

Thank you so much @claremacrae!. If there's anything I can help with in the remaining work checklist, just let me know 🙂

@claremacrae
Copy link
Collaborator

Thank you so much @claremacrae!. If there's anything I can help with in the remaining work checklist, just let me know 🙂

Hi Danny, thank you. Two specific things that would help a lot:

  1. if you could separate out the two new modal widgets in to a component or components. It would make the code a lot easier to maintain.
  2. If you could review the modal-related CSS classes added to styles.css for consistency with existing class names. Like, was there a prefix for the modal?

Those are areas outside my comfort zone, which will make it easier for me to maintain the code going forward - and I can then concentrate on the other things needed for the next release.

@DanielTMolloy919
Copy link
Contributor Author

Yes absolutely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: task dependencies Anything to do with making tasks aware of other tasks
Projects
Status: 🎉 Released
Development

Successfully merging this pull request may close these issues.

None yet

2 participants