[HTML Comments] Possibility to import an external CSS file

Requests for additional software features

Moderator: abstr

Post Reply
fjeronimo
Posts: 43
Joined: Sat Oct 12, 2019 3:14 pm

[HTML Comments] Possibility to import an external CSS file

Post by fjeronimo » Sun Sep 20, 2020 5:42 pm

Hi Dan,

Now that ToDoList has the great feature of having HTML comments, would it be possible to support the ability to link an external CSS file (normally done at the HEAD level)?

Ideally, it would be great if we could specify this at both as a global setting (CSS imported for all tasks in the tasklist) and on individual tasks (if an override is desired for some reason).

This would allow us to unify HTML formatting across the board and simplify re-usage.

For example, for some of my external HTML items I use CSS to provide customised block quotes, headings and drop caps (i.e. a large initial letter that drops below the first line of a paragraph) as in the example below:
CSS_Example.png
CSS_Example.png (60.87 KiB) Viewed 2450 times

It would be amazing to be able to do the same in ToDoList.

Thanks in advance,

Frederico

fjeronimo
Posts: 43
Joined: Sat Oct 12, 2019 3:14 pm

Re: [HTML Comments] Possibility to import an external CSS file

Post by fjeronimo » Sat Oct 03, 2020 9:42 am

Hi Dan,

Any word on whether this feature request could eventually make into the roadmap or if there are design/technical constraints that make this undesirable/unfeasible?

Thanks,

Frederico

User avatar
abstr
Site Admin
Posts: 370
Joined: Sun Jul 28, 2019 12:22 pm

Re: [HTML Comments] Possibility to import an external CSS file

Post by abstr » Sun Oct 11, 2020 9:37 am

Hi Frederico. I've delayed answering in the hope that I would have a flash of inspiration!

Perhaps if I try to describe the situation I'm facing we can find a solution together:

1. All the different comments types are plugins which the core app has no internal knowledge of. ie. to the core app all the comments plugins look identical from the outside. This can't change and cannot be circumvented.

2. Each comment plugin has two responsibilities:
  • Provide a window within which to edit/render a individual task's comments
  • Convert a task's comments into a block of HTML that can be inserted into a larger document/report
3. Your basic request to be able to assign a stylesheet to an individual task or an entire tasklist in the editor is fairly straightforward, because the editor renders each task's comments as an entire webpage and can easily inject an external stylesheet.

4. However, fulfilling the plugin's second responsibility is much harder because when compiling a report the HTML for each task's comments gets converted to a simple 'blob' of HTML content by stripping out its <HEAD> and <BODY> sections, so that it can be inserted into the rest of the report's HTML. ie. Any stylesheet you might have specified for a task gets lost.

5. The only thing I can think of would be to attempt to convert the CSS from external to inline, but this would have some limitations ie. No <BODY> styles would be possible. I suspect too that this conversion would also have to be done in the editor to ensure consistency. And those limitations will cause no end of support calls!

fjeronimo
Posts: 43
Joined: Sat Oct 12, 2019 3:14 pm

Re: [HTML Comments] Possibility to import an external CSS file

Post by fjeronimo » Wed Oct 14, 2020 10:28 pm

Hi Dan,

Thanks for the detailed explanation and the specifics around the tool's architecture.

I wasn't aware of the comment plugin's second responsibility, but it makes perfect sense.

From a purely selfish perspective, I'm only really impacted by the first responsibility as I make use of the tasklists - for documentation and task tracking - directly in ToDoList and don't really need to export them elsewhere (i.e. they are for personal projects and consequently I don't have a necessity to share their contents with different people).

But others might find it invaluable without a doubt. And I fully understand that having one without the other would probably make the feature incomplete and inconsistent and, as you mentioned, likely to give rise to support requests.

Perhaps you could mark the option to inline the CSS as experimental so that people know that it comes with limitations and a "use at your own risk" clause?

Or maybe just warn the user when an external CSS is injected that it won't be available during export/outside the editor? And with an accompanying visual indication during export?

Cheers,

Frederico

User avatar
abstr
Site Admin
Posts: 370
Joined: Sun Jul 28, 2019 12:22 pm

Re: [HTML Comments] Possibility to import an external CSS file

Post by abstr » Fri Oct 16, 2020 12:49 am

Thx for your understanding Frederico, I wish many others made the same effort you do...

That aside, and accepting that inlining the CSS would appear to be the only option for solving both requirements, I'm fairly comfortable with the idea of analysing the CSS file that the user specifies and warning them of the features that are not supported (eg. body styles).

ps. 8.1 (preview available) comes with a PDF exporter that shows the tasks as a tree on the left, and the task comments (and attributes) on the right. Kind of like the 'old' CHM help format. My point being that it could prove useful even for you to be able at some point to export just the documentation component of your tasks into a more 'readable' format.

fjeronimo
Posts: 43
Joined: Sat Oct 12, 2019 3:14 pm

Re: [HTML Comments] Possibility to import an external CSS file

Post by fjeronimo » Sat Oct 24, 2020 8:57 am

Thanks Dan. Don't mention it. As a developer myself, I'm well aware how taxing external demand can be.

And you've written a really amazing piece of software. Definitely something to be proud of.

That being said, great news that the external CSS support is on the table. Looking forward to it :)

The PDF exporter looks intriguing. I will give it a try.

Kind regards,

Frederico

Post Reply