canonical / ubuntu-maintainers-handbook

Ubuntu Maintainer's Handbook
58 stars 39 forks source link

DistroSkillTree: init commit #91

Closed mitchdz closed 1 year ago

rpocase commented 1 year ago

Reiterating original top level comment - we should restructure the location to follow diataxis (specifically, this is a Reference). The primary docs aren't currently in that organization, but incremental migration is the only way to get there.

dviererbe commented 1 year ago

I don't know if you are aware, but GitHub does support Mermaid diagrams

Although it probably takes some time to convert a d2 diagram to a mermaid diagram (or may even be attached to some limitations), it removes the steps of running the tool and updating a svg graphic every time the diagram source changes.

e.g. I recently used it for the MIR documentation https://github.com/canonical/ubuntu-mir#process-states

dviererbe commented 1 year ago

I did a quick search and didn't notice a way to have the .svg file preserve links. The preview is mostly just for that, to preview the document. I'll take a look and see if I can mess around and get embedded links to work, but my gut says Github probably doesn't like that.

Using mermaid would also solve your embedded link problem, for example:

graph TD;
    Debian
    click Debian "https://www.debian.org/doc/debian-policy/"
graph TD;
    Debian
    click Debian "https://www.debian.org/doc/debian-policy/"
rpocase commented 1 year ago

Using mermaid would also solve your embedded link problem, for example:

That's really cool. I'm +1 to the conversion if mermaid can generate an equivalent model. The embedded link doesn't seem to be working for me. Clicking results in a blocked link with the text "This content is blocked. Contact the site owner to fix the issue." on hover. Any ideas? image

dviererbe commented 1 year ago

Hmmm... I have a different behavior (using Firefox). Direct clicking does nothing, but right click > "Open Link in new Tab" works

dviererbe commented 1 year ago

Okay I have a workaround; I got this working in Firefox and Chromium:

flowchart
    Debian["<a href=https://www.debian.org/doc/debian-policy/>Debian</a>"]
flowchart
    Debian["<a href=https://www.debian.org/doc/debian-policy/>Debian</a>"]
mitchdz commented 1 year ago

Very nice! I'll migrate the d2 graph to mermaid shortly.

mitchdz commented 1 year ago

I did a quick search and didn't notice a way to have the .svg file preserve links. The preview is mostly just for that, to preview the document. I'll take a look and see if I can mess around and get embedded links to work, but my gut says Github probably doesn't like that.

Using mermaid would also solve your embedded link problem, for example:

graph TD;
    Debian
    click Debian "https://www.debian.org/doc/debian-policy/"
graph TD;
    Debian
    click Debian "https://www.debian.org/doc/debian-policy/"

Also the original link worked for me on chrome.

mitchdz commented 1 year ago

Reiterating original top level comment - we should restructure the location to follow diataxis (specifically, this is a Reference). The primary docs aren't currently in that organization, but incremental migration is the only way to get there.

When the diagram is converted to Mermaid, it will all be a single README.md type of file, therefore we could put it in ./Reference/PathToDistroUploadRights.md (sorry, don't like spaces in my path)

rpocase commented 1 year ago

sorry, don't like spaces in my path

No problem :). I'm less hung up on exact MD naming and more worried about how it ToC indexing/page naming.

rpocase commented 1 year ago

This is a huge improvement over our original visual aids. The only nit I have is "do enough of these" is a bit arbitrary. Some hover text that gives rough guidance would be good (though it doesn't have to be this PR).

mitchdz commented 1 year ago

Sorry for the delay. I got side-tracked with some other work. I spent a little bit messing with styles but ultimately decided to just keep the default styles as it seems structured and is easy to read. I worry a little bit about accessibility which I tried to tackle with styles, but honestly I just made it worse. You can see what I was attempting here - https://github.com/mitchdz/testREADME/tree/e6b4faf48c8712c97346bb8cb4978153591d958e Really only the links are the bad part, but the only good solution to that is to change the hyperlinks to a different color which I don't want to do.

mitchdz commented 1 year ago

I left the class/style modifier in the source code, so if in the future we want to play around with it we can just add something like the following to modify the whole diagram.

Maybe I can add these as comments to play around more easily in the future? Usually not a big fan of holding comments like this.

    %% Classes
    classDef study fill:#99CCFF,color:#000000
    classDef study fill:#fefefe,color:#000000
    classDef task fill:#FFFFFF,color:#000000    
    classDef concept fill:#a7a7a7,color:#000000
    classDef Invisible stroke-width:0,fill:#00000000 

    %% Styles
    style Basics fill:#e6e6e6,color:#000000,stroke:#333
    style InitialStudies fill:#f4f4f4,color:#000000,stroke:#333
    style InitialTasks fill:#f4f4f4,color:#000000,stroke:#333

    style Intermediate fill:#e6e6e6,color:#000000,stroke:#333
    style IntermediateTasks fill:#f4f4f4,color:#000000,stroke:#333

    style Advanced fill:#e6e6e6,color:#000000,stroke:#333
    style AdvancedTasks fill:#f4f4f4,color:#000000,stroke:#333

    style optionalDebian fill:#e6e6e6,color:#000000,stroke:#333

    style Expert fill:#e6e6e6,color:#000000,stroke:#333
    style ExpertTasks fill:#f4f4f4,color:#000000,stroke:#333

    style Duties fill:#e6e6e6,color:#000000,stroke:#333
mitchdz commented 1 year ago

Thanks Robby, I incorporated those changes.

mitchdz commented 1 year ago

Can this be merged please?

cpaelzer commented 1 year ago

I have discussed this with @rpocase when it was v1 and while there could be endless bikeshedding like "is this the right doc to have this in" or any "shouldn't we also mention ...?" I think there is no better place yet and it is helpful as-is.

All of that can be further improved or move later if needed.

Thanks for you all working together ... +1 and merging