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

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

Closed
2 tasks done
TomWol opened this issue Jan 29, 2023 · 8 comments
Labels
scope: grouping Changes to the grouping capabilities status: not planned type: enhancement New feature or request

Comments

@TomWol
Copy link

TomWol commented Jan 29, 2023

⚠️ 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

@TomWol TomWol added the type: enhancement New feature or request label Jan 29, 2023
@claremacrae
Copy link
Collaborator

Hi @TomWol, thank you for logging this. I am deep in continuing work on the custom statuses at the moment, so haven't much time to be thinking about other stuff.

In the meantime, is there any chance of a bullet-point summary of this please? It would be good to understand if it is one feature or several... Thanks!

@TomWol
Copy link
Author

TomWol commented Jan 29, 2023

Hi @claremacrae, thank you for your response and hard work. Good luck with the custom statuses!

To summarize, I propose 2 features:

  1. Allow global editing of the text format inside the h4-h6 headers created by group by.
    For example, being able to change Priority 3: None into No Priority, with a custom icon, etc.
  2. group by (due date|priority|...) with task count - allows including a group task count in the group by header.

@claremacrae
Copy link
Collaborator

claremacrae commented Jan 29, 2023

Hi @TomWol, thank you for the summary. I understand now.

I am a bit stuck about what to do with this...

I hate to ask you to create two separate tickets - but really, they are two separate features, and would be much easier to track, and more likely to get acted on, if they were two separate requests - each with a clear, actionable title.

For example, an unspecific title like 'other UI enhancements' is a clue that the request is covering multiple things - and is less likely to get attention partly because of the time needed to interpret it, when the list of open issues is skimmed for deciding what to work on next.

@claremacrae
Copy link
Collaborator

claremacrae commented Jan 30, 2023

Related, I have comments about both halves, and it will get a bit confusing with two strands of conversation mixed in.

@claremacrae
Copy link
Collaborator

Ok I see that your proposed implementation - settings to edit how different group headings are displayed, with a replaying facility for things like number of tasks, is effectively one thing which will solve both feature requests.

I will rename the feature title to make it consistent with what is being requested.

It is a lot of work, though.

@claremacrae claremacrae changed the title Group by text formatting and other UI enhancements Implement a settings-based approach to customise the text used for group titles, including templating for values like number of tasks Jan 30, 2023
@claremacrae claremacrae added the scope: grouping Changes to the grouping capabilities label Jan 30, 2023
@claremacrae
Copy link
Collaborator

claremacrae commented Jan 30, 2023

Some ideas for alternative implementations to get the same, or similar, benefits for a lot less work. Separate feature requests would be welcome/appreciated, if you feel they would help you.

Numbers before priority names

The reason for the numbers before the names of priorities is #920.. Which is going to be worked on soon.

Currently all group names are sorted alphanumerically - which doesn't give a good order for priority names.

Once that is fixed, it will be easy for us to remove the numbers before the priority names, but still have High appear first, and Low appear last.

So yes, a separate feature request proposing your preferred new names for the priority fields would soon be very easy to do.

Showing task counts in groups

It's a nice idea to show the number of tasks in each group. It has been requested before, but I cannot find it.
So again, a separate feature request for the ability to show or hide the numbers of tasks in each group would be welcome. It would be helpful if it could state the preferred behaviour if there are multiple group by instructions.

@claremacrae
Copy link
Collaborator

Hi @claremacrae, thank you for your response and hard work. Good luck with the custom statuses!

To summarize, I propose 2 features:

Many thanks for writing up your proposals.

I have mulled them over, and feel that the specific examples given can be more easily implemented as separate features.

What you propose would be more flexible, I agree, but a lot more work. So I would rather make the improvements to the underlying features, partly so that users did not have to learn to customise the settings, but mainly to use volunteer developer time as effectively as possible, to benefit the widest number of users.

  1. Allow global editing of the text format inside the h4-h6 headers created by group by.
    For example, being able to change Priority 3: None into No Priority, with a custom icon, etc.

I think the initial solution to this particular example is to improve the titles used by default for priority, to remove the need for the numbers to enforce the desired sort order. I have written that up in #1628.

A more flexible approach to this may come out of the #1421 pull request.

  1. group by (due date|priority|...) with task count - allows including a group task count in the group by header.

Good idea to show the task count on groups.

I have written this up as a separate feature request in #1627.

@claremacrae
Copy link
Collaborator

In view of my comments above, and the proposed simpler implementations, I am closing this as 'not planned'. This doesn't mean 'will never be implemented', but does mean 'unlikely to ever be implemented...'

@claremacrae claremacrae closed this as not planned Won't fix, can't repro, duplicate, stale Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: grouping Changes to the grouping capabilities status: not planned type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants