Skip to content

sequence diagram: allow message to span beyond the involved participants #2386

Description

@kplatt1

In a sequence diagram, if you have a long message between 2 participants, PlantUML tries to fit the message in the horizontal space between the 2 participants, and this can cause a big and unnecessary gap that wastes horizontal space, for example:

Image

Instead, it would be much better to allow the message to span beyond the 2 involved participants and save horizontal space. There's plenty of horizontal space to put the message text above the arrow and going all the way across as far as it needs to, like so:

Image

Not only does it save space, but it is common practice when drawing UML sequence diagrams to extend the message text outside of the region between the 2 participants.

PlantUML doesn't support this that I'm aware of. If this feature were supported, you could set up a diagram without having to worry about either (a) artificially adding a newline character \n somewhere in the message text, or (b) setting an artificial wrap limit on the text width via skinparam maxMessageSize 100 as in Issue #35. One of the big conveniences of PlantUML, especially for sequence diagrams, is that it drastically reduces the need for people to worry about layout and format. But without this feature, people have to hand-tune the layout.

I think the proposed behavior should be the default, but if someone wants to force the old behavior, they can specify a parameter to let them do so.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions