Support custom Task Count message in Tasks query [to remove need for an explanatory heading before the Tasks block] #2380
Labels
scope: rendering of tasks
How the plugin displays tasks (except CSS issues)
type: enhancement
New feature or request
🔖 Feature description
Hello! It would be useful to format the task count message displayed at the end of a query.
✔️ Solution
Example syntax for this could be
tasks.query.message("%c task%s created")
. Here,%c
would parse as the count variable and%s
would be_
if%c==1
ands
otherwise (for plural English words).Result:
![Screenshot from 2023-10-29 13-41-13](https://private-user-images.githubusercontent.com/81571013/278874367-822a953a-9aed-4b3d-a1fb-af7bd7bb10b6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg0NjIzMTIsIm5iZiI6MTcxODQ2MjAxMiwicGF0aCI6Ii84MTU3MTAxMy8yNzg4NzQzNjctODIyYTk1M2EtOWFlZC00YjNkLWExZmItYWY3YmQ3YmIxMGI2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE1VDE0MzMzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJjMGFmNjViODVmMjM4YTc2NzA5NzE3MTU4MDllMDg3MDNhMjI1YzZjMzMzZTkwYzM1MWM2ZDU2OGE2MzE3ZmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.N62qG1Aieeri8vrkX2Y6GRSlrHn8W83Op5e9WwgZ9d0)
2 tasks created
or1 task created
This way we don't have to add headers above queries - we can get the context we need from the query message.
❓ Alternatives
No response
📝 Additional Context
No response
The text was updated successfully, but these errors were encountered: