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: Support custom metadata extractors for tasks #2393

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aigoncharov
Copy link

Draft implementation to support custom metadata extractors for tasks. Should unblock extracting more emoji-based metadata by third-party plugins relying on dataview.

Closes #2391

@@ -87,6 +88,8 @@ export class DataviewApi {
public widget = Widgets;
/** Re-exporting of luxon for people who can't easily require it. Sorry! */
public luxon = Luxon;
/** Programmatic extensions to tweak dataview behavior */
public extensionRegistry = extensionRegistry;
Copy link
Author

Choose a reason for hiding this comment

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

The reason to expose extensionRegistry instead of a direct API call addCustomSpecialTaskFieldExtractor is to have a central place for such overrides. I would anticipate more of them to be added later.

The long-term vision is for dataview to be one and only query engine for any other obsidian plugin. For instance, I would like to completely replace the built-in task querying functionality in obsidian-tasks with dataview.

Copy link
Author

Choose a reason for hiding this comment

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

Another potential use-case for the extension registry is to allow for custom indexers - should resolve #1803 without the need to add the canvas support directly to the core.

Overall, the philosopy is to maintain a robust lean core and let third party extensions to take care of new extra features.

WDYT?

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.

API to add custom emoji-based metadata
1 participant