-
-
Notifications
You must be signed in to change notification settings - Fork 317
feat: New Task Format "Custom" that allows user to configure date format and custom status strings #3718
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
base: main
Are you sure you want to change the base?
feat: New Task Format "Custom" that allows user to configure date format and custom status strings #3718
Conversation
* 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: renejules <[email protected]>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: renejules <[email protected]>
|
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... |
|
(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'.
|
|
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? |



Types of changes
Changes visible to users:
feat- non-breaking change which adds functionality)feat!!orfix!!- fix or feature that would cause existing functionality to not work as expected)fix- non-breaking change which fixes an issue)i18n- additions or improvements to the translations - see Support a new language)docs- improvements to any documentation content for users)vault- improvements to the Tasks-Demo sample vault)contrib- any improvements to documentation content for contributors - see Contributing to Tasks)Internal changes:
refactor- non-breaking change which only improves the design or structure of existing code, and making no changes to its external behaviour)test- additions and improvements to unit tests and the smoke tests)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
yarn run lint.Terms
Note