8000 Regarding the February update with intermediate namespaces · Issue #1352 · plantuml/plantuml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

Regarding the February update with intermediate namespaces #1352

Closed
michaelraue opened this issue Mar 22, 2023 · 8 comments
Closed

Regarding the February update with intermediate namespaces #1352

michaelraue opened this issue Mar 22, 2023 · 8 comments
Assignees
Labels
documentation Improvements or additions to documentation p:done The issue has been implemented or fixed

Comments

@michaelraue
Copy link

The news from 2 Feb, 2023 says:

The drawing is slightly different, because we now also draw intermediate packages
...
That leaves the drawing part, and let's see how you react here.

So I would like to react 😊
When I understand correctly this means that in the previous version this PUML:

@startuml
class A.B.C.D.Z {
}
@enduml

had printed the diagram

image

whereas in the new version I get

image

If that's right I would highly recommend to make this configurable. I have a project with many namespaces/classes and like to create diagrams with different points of view, e.g. one diagram per namespace. In the new version it I looks very cluttered:

image

@michaelraue michaelraue changed the title Regarding the February update with namespaces Regarding the February update with intermediate namespaces Mar 22, 2023
@arnaudroques arnaudroques self-assigned this Mar 22, 2023
@arnaudroques arnaudroques added documentation Improvements or additions to documentation and removed triage labels Mar 22, 2023
@arnaudroques
Copy link
Contributor

A possible workaround is to use:

@startuml
set separator none
package A.B.C.D {
  class Z {
  }
}
@enduml

Now I understand that this workaround may be too complicated for you.
Tell us what you think about it!

@michaelraue
Copy link
Author

The problem with the workaround is that I don't see easily which class belongs to which namespace. If I take the picture from above and apply the separator none I get:

image

The green arrows point to the classes in the namespace which is in the bottom right in the first picture.

Btw don't get me wrong, I absolutely love PlantUML and this is by no means a show stopper, but if this thing could be configurable it would help a lot.

@arnaudroques
Copy link
Contributor

Btw don't get me wrong, I absolutely love PlantUML and this is by no means a show stopper, but if this thing could be configurable it would help a lot.

Don't worry, no problem!
The real fact is that we are completely out of inspiration about a nice syntax that would rollbacks the drawing to previous versions :-)

What about: !pragma do_not_draw_intermediate_packages true ? It's too long.
Any suggestion is welcome!

@michaelraue
Copy link
Author

Based on the existing pragma useVerticalIf how about something like useIntermediatePackages?

arnaudroques added a commit that referenced this issue Mar 22, 2023
@arnaudroques
Copy link
Contributor

So with last snapshot, you can now have this:

@startuml
!pragma useIntermediatePackages false
class A.B.C.D.Z {
}
@enduml

It has not been widely tested, so any feedback is welcome!
Thanks

@arnaudroques arnaudroques added the p:wip Work in progress. Be patient :-) label Mar 22, 2023
@arnaudroques arnaudroques moved this to WIP in Wor 8000 k Mar 22, 2023
@arnaudroques arnaudroques moved this from WIP to Done in Work Mar 22, 2023
@arnaudroques arnaudroques added p:done The issue has been implemented or fixed and removed p:wip Work in progress. Be patient :-) labels Mar 22, 2023
@michaelraue
Copy link
Author

This is awesome, thanks a lot! First impression, it works flawlessly.

Any chance to push the snapshot as a Docker image tag on Dockerhub plantuml/plantuml? Then I could test it directly in my whole environment.

@evantill
Copy link
Collaborator

Hi,

I'm working on the release workflow of the plantuml-cli docker image.
I have just released a snapshot.

⚠️ It's a work in progress but you can try it .

docker pull ghcr.io/plantuml/docker/plantuml-cli:latest
docker run --rm -it \
                 --volume "$PWD":/wd \
                 --workdir /wd \
      ghcr.io/plantuml/docker/plantuml-cli:latest your_diagram.puml

Note: this command mount the current working directory. You have to execute it in the same directory as your diagrams files

@michaelraue
Copy link
Author
michaelraue commented Mar 23, 2023

Thanks a lot! You guys are incredibly fast and did a superb job, it works very well. Now all my diagrams are nice and clean again, and on top of that I can choose for each one if UseIntermediatePackages should be true or false. Awesome!

The above diagram now looks like this:
image

Again, thanks for the great work you do with PlantUML!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation p:done The issue has been implemented or fixed
Projects
None yet
Development

No branches or pull requests

3 participants
0