archimatetool / archi

Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
MIT License
928 stars 267 forks source link

Wrapped Relationship Labels Overlap #1056

Open myriammatwiy opened 2 weeks ago

myriammatwiy commented 2 weeks ago

View Error Log button is disabled (assuming the error log is empty)

Version of Archi

Archi Win64 5.1.0 and 5.3.0

Archi Plug-ins

Collaboration plug-in 0.9.2 installed

Operating System

Windows 11 Enterprise

Expected Behaviour

Relationship labels from existing views should remain as-is without wrapping

Actual Behaviour

Relationship labels from existing views are wrapping which is causing them to overlap onto each other. A configuration setting to shut off automatic wrapping doesn't appear to exist.

Steps to Reproduce the Behaviour

  1. Import existing model created in Archi version 4.9.3
  2. Open a view that contains multiple relationships between two elements, and long relationship label expressions
  3. Notice that the text on these relationships is now wrapped, causing the text to overlap.

Before (in version 4.9.3): BEFORE - relationship text in version 4 9 3

After (in version 5.3.0): AFTER - relationship text in version 5 3 0

Phillipus commented 2 weeks ago

A maximum label width of 300 pixels was set in this commit. This was set to stop excessively long labels and because support for text alignment (left, centre and right) was added to connections. If there is no limit to the width of connection labels then text alignment does not work.

Phillipus commented 2 weeks ago

@myriammatwiy In the first screenshot the text is wrapped on the "Upload and hand-enter..." label. Are you using a label expression to wrap it?

myriammatwiy commented 2 weeks ago

@myriammatwiy In the first screenshot the text is wrapped on the "Upload and hand-enter..." label. Are you using a label expression to wrap it?

Yes for that one the label expression is set to ${wordwrap:60:${name}}, however the existence of that relationship isn't necessary to reproduce the issue.

myriammatwiy commented 2 weeks ago

A maximum label width of 300 pixels was set in this commit. This was set to stop excessively long labels and because support for text alignment (left, centre and right) was added to connections. If there is no limit to the size of connection labels then text alignment does not work.

We have used long relationships a lot in our views, as there was no max length. This leaves us unable to upgrade to Archi 5 because there doesn't appear to be a configuration setting that allows us to shut off the new auto-wrap. Also, I didn't see anything in the release notes regarding this new wrap feature.

Phillipus commented 2 weeks ago

Yes for that one the label expression is set to ${wordwrap:60:${name}}, however the existence of that relationship isn't necessary to reproduce the issue.

I just wanted to check that you were achieving your desired word wrap using a label expression.

We have used long relationships a lot in our views, as there was no max length. This leaves us unable to upgrade to Archi 5 because there doesn't appear to be a configuration setting that allows us to shut off the new auto-wrap. Also, I didn't see anything in the release notes regarding this new wrap feature.

It came as part of support for text alignment on connection labels.

I think that the new maximum width of 300 pixels introduced in Archi 5 is not ideal. Therefore I'll remove that for the next version Archi 5.4.

myriammatwiy commented 2 weeks ago

Yes for that one the label expression is set to ${wordwrap:60:${name}}, however the existence of that relationship isn't necessary to reproduce the issue.

I just wanted to check that you were achieving your desired word wrap using a label expression.

Yes, we use the wordwrap expression a lot and find it very useful. This is partially why I was surprised by the forced wrap feature.

It came as part of support for text alignment on connection labels.

I think that the new maximum length of 300 pixels introduced in Archi 5 is not ideal. Therefore I'll remove that for the next version Archi 5.4.

Very appreciated, thank you!

jbsarrodie commented 2 weeks ago

I think that the new maximum width of 300 pixels introduced in Archi 5 is not ideal. Therefore I'll remove that for the next version Archi 5.4.

I agree this hard-coded width limit is not ideal. Instead of removing it, would it be possible to set it per relationship instance on views (kind of native support for ${wordwrap...}). Maybe a slider of some sort ("0" would mean no width limit, and would be the default) ?

Phillipus commented 2 weeks ago

I agree this hard-coded width limit is not ideal. Instead of removing it, would it be possible to set it per relationship instance on views (kind of native support for ${wordwrap...}). Maybe a slider of some sort ("0" would mean no width limit, and would be the default) ?

I'll look at that for a future version. In the meantime, go back to the old behaviour.