Skip to content

Implement a settings-based approach to customise the text used for group titles, including templating for values like number of tasksΒ #1604

@TomWol

Description

@TomWol

⚠️ Please check that this feature request hasn't been suggested before.

  • I searched previous Ideas in Discussions didn't find any similar feature requests.
  • I searched previous Issues didn't find any similar feature requests.

πŸ”– Feature description

Similar, but different to #1133, also referenced in my comment at #1519:

Tasks-GroupByCSSFormatting

  1. The text shown in the headers when using group by is in a kind of unattractive format: 2023-01-04 Wednesday and Priority 3: None. Particularly the priorities one with the numbering is jarring when not all priorities are used (and thus, not all numbers are shown). The Feat Themeability branch at feat: New CSS classes for "themeability"Β #1519 will probably allow for further css formatting of these headers, however I propose a way to alter the text displayed in order to not have to try and do that in CSS.

Tasks-GroupByEnhancement

In the above screenshot, the first callout contains pure Tasks code. For the second, I used Dataview to query which priorities are in the results. I then create custom headers for these priorities in the DataviewJS code block, and then under each header there is a Tasks query specific to the priority mentioned in the header.
This is inefficient as I am querying my data twice in two separate plugins. But I vastly prefer the look of it.

So just being able to customize the format for a group by would be great.

  1. Adding to this, I would also really love a group by (due date|priority|...) with task count functionality, inserting the task count for that group in the header. As seen in the second screenshot, simulated with DataviewJS.

Thanks for a great plugin!

βœ”οΈ Solution

  1. Maybe in the Settings there could be a Text Formatting Settings category where it displays some of the more fixed (Group By) text formatting?

Like for the different Priorities, it shows:

  • Priority 1: High
  • Priority 2: Medium
  • Priority 3: None
  • Priority 4: Low
    with editing buttons allowing you to replace them with text of your choice, add icons, etc.
    For Dates it allows you to specify the date format, also add icons and more formatting, etc.
  1. group by (due date|priority|...) with task count I think could be clear. Or, if you implement the previous Settings feature, you might allow for certain Tasks variables to be defined such as {{TASKCOUNT}}, which will match the task count for that group.

❓ Alternatives

What is mentioned in #1133 is not bad, I would use it. But with my solution, allowing you to change the default formatting, you don't have to specificy the same formatting every time you use group by, it is defined globally. Thus keeping the Tasks queries simple.

Having both could be ever better, of course.

πŸ“ Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions