gbdev / pandocs

The single, most comprehensive Game Boy technical reference.
https://gbdev.io/pandocs/
Creative Commons Zero v1.0 Universal
599 stars 92 forks source link

Creating/editing SVG figures #373

Open avivace opened 3 years ago

avivace commented 3 years ago

Creating SVG diagrams and figures the way we are currently doing is tedious, requires hand-writing SVG/XML code and it's generally a very time consuming operation.

I do thing this harms the maintainability of those, I don't think it's realistic to ask people to learn how to do this for editing a single arrow or line in a diagram. This could lead to abandoned figures - as we are bottle necked by the contributors able to go through this process..

We still didn't find a single SVG editor able to export figures the way we need (set custom CSS classes, produce clean SVG code) so either :

ISSOtm commented 3 years ago

There is a fundamental disagreement between our two goals here. (I am reminded of the talk "Cursed Problems In Game Design", as this is pretty much the same situation we're facing. Assuming the same applies, there is no solution to the problem, only workarounds.)

One goal is end user readability, mainly from theming (#322), consistent and clear lines, etc. The other goal is maintainer accessibility, which boils down to the ability to use a graphical SVG editor.

Where these two goals fundamentally clash is that the former requires our SVGs to integrate with the rest of the page, but SVG editors are all (as far as I'm aware, anyway) designed to produce stand-alone, i.e. self-contained, SVGs. Simply put, no editor works for our use case.

The choice I made in my commits so far has been to forgo the latter goal as being the lesser of the two evils. Here is my thought process:

Nonetheless, I recognize that what avivace brings up is a legitimate problem. While I don't think doing a 180 is a good idea, let me borrow from the GDC talk I linked to in the first paragraph and propose an improvement in the form of "s'mores": documenting the editing process.