Skip to content

Conversation

@renejules
Copy link

@renejules renejules commented Dec 28, 2025

Types of changes

Changes visible to users:

  • New feature (prefix: feat - non-breaking change which adds functionality)
    • Issue/discussion: na
  • Breaking change (prefix: feat!! or fix!! - fix or feature that would cause existing functionality to not work as expected)
    • Issue/discussion:
  • Bug fix (prefix: fix - non-breaking change which fixes an issue)
    • Issue/discussion:
  • Translation (prefix: i18n - additions or improvements to the translations - see Support a new language)
  • 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)

Description

Added the Task Format "Custom" which allows users to configure the date format and custom text patterns used for the various task components/states, such as completed, priorities, etc. This is useful if the user wants to have a specific syntax in the raw md files or in edit mode that is not covered by the standard.

Motivation and Context

Originally, I only used the plugin to have the completion date added to my tasks. I used the Dataview Task Format, but found that it quickly became cluttered on the small mobile device screen, so i was looking into how to make the completion text/date shorter but found no configuration option for this. I also wanted a more human-readable/less technical format in the raw Markdown files. And the [completion::...] syntax was sometimes misinterpreted as a link. Additionally, I wanted the ability to customize the date format.

How has this been tested?

Limited tests simply using my private tasks lists.

Checklist

  • My code follows the code style of this project and passes yarn run lint.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • My change has adequate Unit Test coverage. -> I reviewed and added the result files generated by DocsSamplesForTaskFormats.test.ts

Terms

Note

  • I’m happy to contribute these changes from my fork if they are useful to others, but I’m also ok if the PR is declined.
  • Feel free to change my short default strings I included for the configuration if you prefer different values.

google-labs-jules bot and others added 5 commits December 28, 2025 22:41
* New Task Format to make Date and Status String configurable

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@claremacrae
Copy link
Collaborator

I see that the new code is actually tested by the existing parameterised tests, but it only tests the behaviour with the default custom settings format.

The problem with that is that it means that there are no tests for any other custom formats that the default one provided in the settings.

I will have a go at writing a first test for the custom formats, to demonstrate how to write tests, and to demonstrate a bug that I have found...

@claremacrae
Copy link
Collaborator

(This means that I will be pushing a commit to your branch...)

…erializer tests

I was able to get most tests passing, but ran out of time to
get them all working. So some tests are marked with '.failing' - and
some parameterised tests have a '.not' for now, as they do not support '.failing'.
@sonarqubecloud
Copy link

@claremacrae
Copy link
Collaborator

OK, I've pushed a first attempt at automated tests for the new code, by making a duplicate of the Dataview serializer tests.

There are TODO comments with the outstanding problems in the tests that need to be fixed.

Once these are fixed, there will need to be tests of the code with things like a modified date format - but first let's get the tests of the default custom settings working correctly....

Can I hand this over to you for now, to see if you can fix any of the problem tests, with what you know about the code that you have added?

@claremacrae claremacrae added the question Further information is requested label Jan 2, 2026
@claremacrae claremacrae changed the title New Task Format "Custom" that allows user to configure date format and custom status strings feat: New Task Format "Custom" that allows user to configure date format and custom status strings Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is requested scope: parsing markdown See also 'scope: global filter'

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants