Giter Club home page Giter Club logo

Comments (6)

jfeliu007 avatar jfeliu007 commented on August 17, 2024

This is an interesting proposition. I will make it so that you can pass Notes and a title to the parser as options. However, it will be up to the CLI to properly construct the notes (in this case the legend and the title. As for the git branch. I believe this goes beyond the intended functionality of this library since git is one of the source control available. Now with the implementation of notes, there is nothing stopping you from passing the git branch name as one of the notes. :)

from goplantuml.

jfeliu007 avatar jfeliu007 commented on August 17, 2024

I am finding that notes are a little irresponsible when not attached to certain elements. That means we do not know where they render. Therefore, I am implementing this for now with a Legend tag. Unfortunately Plantuml only accepts one legend per diagram. It will be placed at the bottom center, though, so I think it would be nice to combine any notes you pass with the legend in one legend note.

from goplantuml.

Justin-W avatar Justin-W commented on August 17, 2024

Now with the implementation of notes, there is nothing stopping you from passing the git branch name as one of the notes

A very reasonable decision.

from goplantuml.

Justin-W avatar Justin-W commented on August 17, 2024

I am finding that notes are a little irresponsible when not attached to certain elements. That means we do not know where they render.

IIRC, that is partly true. However, it can be mitigated in certain types of PlantUML diagrams by placing the note before or after certain graph-level elements. E.g. A Title, Legend, and certain keywords (e.g. next to astart or end keyword in activity diagrams).

So the location where you render the note(s) can affect the note position and graph layout.

That might be useful info in case you do decide to use notes (for this issue or for anything else).

from goplantuml.

Justin-W avatar Justin-W commented on August 17, 2024

One other idea: If you were to render some additional, static comments in the output, such as ''' --- CLASSES --- ''', ''' --- ALIASES --- ''', etc. (or some similar, predictably-unique variant), they could act as landmarks or markers that could be used to perform additional post-rendering processing of the output. E.g. To inject a section of PUML code just before a certain subsection of the output, or to do a global regex replace on only 1 'section' of the output.

Without such 'landmark' comments in the output, any post-processing of the output would have to rely on either internal goplantuml implementation details (bad idea) and/or use of target-specific output (e.g. use of target-specific keywords).

But with landmarks included, a variety of additional post-processing options become feasible (e.g. via grep, sed, etc.). Possibly including post-rendering injection of additional notes, etc. independent of the goplantuml CLI (although I think CLI flags for certain basic things are still a good idea).

from goplantuml.

jfeliu007 avatar jfeliu007 commented on August 17, 2024

One other idea: If you were to render some additional, static comments in the output, such as ''' --- CLASSES --- ''', ''' --- ALIASES --- ''', etc. (or some similar, predictably-unique variant), they could act as landmarks or markers that could be used to perform additional post-rendering processing of the output. E.g. To inject a section of PUML code just before a certain subsection of the output, or to do a global regex replace on only 1 'section' of the output.

Without such 'landmark' comments in the output, any post-processing of the output would have to rely on either internal goplantuml implementation details (bad idea) and/or use of target-specific output (e.g. use of target-specific keywords).

But with landmarks included, a variety of additional post-processing options become feasible (e.g. via grep, sed, etc.). Possibly including post-rendering injection of additional notes, etc. independent of the goplantuml CLI (although I think CLI flags for certain basic things are still a good idea).

I will consider this as a separate issue.

from goplantuml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.