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

[Feature Request] Line style for elements (dotted, dashed) #702

Open
johmut65 opened this issue Jan 8, 2021 · 24 comments
Open

[Feature Request] Line style for elements (dotted, dashed) #702

johmut65 opened this issue Jan 8, 2021 · 24 comments

Comments

@johmut65
Copy link

johmut65 commented Jan 8, 2021

Our company uses the outline style of EA concepts to visualize validation status: Draft = Dotted Line, Proposed = Small Dashes, Confident = Large Dashes, Validated = Solid Line. I believe this would be a great feature to add to Archi ...
I can imagine "Outline Style" to be configurable by a manual selection out of a dropdown box, as it is in Visio, PowerPoint, ...
Even better would be to add the ability to link the Outline Style to a custom Property that can be named "Validation Status" and assign an Outline Style to the different values for that property: Draft = Dotted Line, Proposed ...., Confident ...., Validated ......

@Phillipus
Copy link
Member

Outline styles might be something for a future update but, like colours, won't be tied to a particular status or meaning. However, if outlines are implemented in a future update, it should be possible to set them according to some criteria using a jArchi script.

@jbsarrodie
Copy link
Member

+1 on being able to customize outline. Agree with Phil that implementation should be kept as simple as possible and not include dynamic changes based on properties.

FWIW, I do have the same need though and I'm thinking about a potential implementation of such "dynamic" feature in jArchi. My idea is to define some standard behavior and some pseudo-language (based on jArchi API) to define them, e.g. el.fillColor = el.prop("Some Prop") ? "Critical" : red. Then a very generic script could be used to update the view.

@johmut
Copy link

johmut commented Feb 2, 2024

Hi Guys, it's been a while.... Happy to see that element Line Colour, -Width and -Opacity made it into Archi. Would it now be possible to also add Line Style please? I could very well use: solid, dotted and dashed (short & long), the standard bunch really.
Can I have your thoughts?

@Phillipus
Copy link
Member

As I'm tied up with so many other developments on Archi (coArchi 2, profiles, important maintenance and build issues, etc.) and there's only one of me ;-) , this one will have to wait a bit longer.

@johmut
Copy link

johmut commented Oct 4, 2024

Hello Guys,

It's been a few years ...
I see that #1044 is marked as duplicate of this one and closed.
Can you take this under consideration please? Being able to set the border line style of elements is something I dearly miss and does not conflict AFAIK with Archimate specifications. Shouldn't be too complicated, I fully agree.

Thx & BR,
Johan

@Phillipus
Copy link
Member

Phillipus commented Oct 5, 2024

Shouldn't be too complicated, I fully agree.

Well, actually things are never simple.

In order to implement the feature request of "support different line styles in figures" there has to be a wider consensus on the requirements and what is needed for implementation.

  1. How many and what line styles should be supported? Dashed? Dotted? Dashed and dotted? What spacing between dashes and dots?
  2. Should the line styles apply to all figures? What about the ArchiMate icon-type figures?
  3. In the case of the icon-type figures, should the line styles apply to just the outline of a figure or the inside lines as well? Many of the figures will have to be re-coded. Look at the code here. This takes a lot of time.
  4. What to do about the Grouping figure? This is already using dashed lines. How do we support a default setting?
  5. What is the UI to select line styles? Is it something like this? Then we need some new controls, PNG images of the different styles to display in the drop-down.
  6. Format Painter support
  7. Help files need to be updated with text and new screen-shots
  8. Unit tests needed
  9. jArchi - this has to be supported there too. This requires agreement on the API. Then implementation and unit tests.

In order to proceed we need a broader agreement on (1), (2), (3) and (4) to start with.

@Phillipus Phillipus changed the title [Feature Request] Concept Validation Status through Outline Style ? [Feature Request] Line style for elements (dotted, dashed) Oct 9, 2024
@Phillipus
Copy link
Member

I've renamed the issue title to make it clearer what this is about.

There's a branch here with the initial code.

We need consensus on the points made above.

@johmut
Copy link

johmut commented Oct 9, 2024

Hi Phil,
Thanks for picking this up. In search of consensus on the points made above, please find here my opening move:

  1. I propose the following border line styles: dotted, dashed and solid as Must Have; dash-dot and large-dash as Should Have, anything else as Could Have or Won't Have
  2. Setting Line Style on 'boxes' I see as Must Have. On 'Icons' is Could Have for me and on Connectors Won't Have. If on 'Icons', then only on the outline of the figure.
  3. I have no requirements on the Grouping figure line style.
  4. I propose 'solid' as a default line style setting, unless Archimate specifies differently, e.g. Grouping element
  5. As a UI, I propose a simple drop-down list box with a single selection of line styles represented by their names: solid, dotted ...
  6. Format Painter support is a Must Have I believe
  7. Help files need to be updated with text and new screen-shots, Sure
  8. Unit tests needed, Sure
  9. jArchi support, agreement on the API, implementation and unit tests, Sure, could be done in a later stage I suppose.

Does this help?
Kind Regards,
Johan

@Phillipus Phillipus pinned this issue Oct 11, 2024
@Phillipus
Copy link
Member

@johmut Thanks for your feedback.

The main issue now is what to do about the Grouping figure which is already using dashed lines. Let me explain...

  1. We add line styles - "solid", "dashed", "dotted".
  2. Internally in the .archimate file these are stored as 0, 1 and 2. For example: lineStyle=1
  3. The default is 0 (solid). This means that if this value is not present in the .archimate file we use the solid line style. And that works for existing models where this value is not present.
  4. But loading a model where the value is not set for the Grouping figure would mean it has a solid line and that would change the look of existing models. It needs to have lineStyle=1

When this type of situation has occurred before we had to write a special backward compatibility loader which, in this case, would work like this:

  1. When an .archimate file is loaded check its internal model version.
  2. If the model version is less than x.x.x (i.e before line styles were supported) iterate through the model contents and for each Grouping figure set lineStyle=1

Then this creates an issue for coArchi users who are now alerted to the fact that something has changed and a new commit is required, but they don't know what changed.

So we have to think about this impact. @jbsarrodie Do you have any thoughts on this?

@Phillipus
Copy link
Member

If on 'Icons', then only on the outline of the figure.

Some might look a bit strange:
Screenshot 2024-10-11 at 11 39 25

@johmut
Copy link

johmut commented Oct 16, 2024

Hi Guys,

My view on
1/ Outline for the Grouping object: Keep the current dashed line-style and do not offer a change of line-style for this element, as this is pre-defined by Archimate. In other words, hard-code line style to dashed for Grouping elements.
2/ Icon outlines: I can do without the ability to change the outline line style on Icon representations of elements. I need it for the boxed representations.

KR,
Johan

@Phillipus
Copy link
Member

1/ Outline for the Grouping object: Keep the current dashed line-style and do not offer a change of line-style for this element, as this is pre-defined by Archimate. In other words, hard-code line style to dashed for Grouping elements.

That's possible, but I wonder if other users will want to style the Grouping object with a solid or dotted line as well?

2/ Icon outlines: I can do without the ability to change the outline line style on Icon representations of elements. I need it for the boxed representations.

I wonder what other users think?

@johmut
Copy link

johmut commented Oct 27, 2024

Other users seem to be OK with the proposed features ;-)
Can you propose to add this to the scope of a next release?

@Phillipus
Copy link
Member

Other users seem to be OK with the proposed features ;-)

I haven't had any feedback from anyone else about this, and I don't want to implement it based on only one person's feedback. Also, I think that other users will probably want to change the line style of the Grouping object. There still remains the unanswered question of impact of backward compatibility as mentioned. I shall ask @jbsarrodie at the next opportunity.

Can you propose to add this to the scope of a next release?

Yes, once the above issues are resolved we can aim for a major Archi release at some point, when some other features have been implemented.

@johmut
Copy link

johmut commented Nov 27, 2024

Hello @Phillipus,
On the Forum, @jbsarrodie hinted towards a solution for the backward compatibility challenge. Given 1156 views of the thread so far, there seems to be quite some interest in this feature, even if people are not explicitly outing there support.
How do you see this feature request's status? Can it be added in scope of a planned release?
Thanks,
Johan

@Phillipus
Copy link
Member

I thought I'd made this clear in the commit? The implementation work has been completed. So, yes, it will be added to the next release, together with other planned features. When that will be depends on the other bits and pieces that need doing...Eclipse updates, Java updates, Unit tests, CI work, testing, corresponding features in jArchi, work on coArchi 2...

@Phillipus
Copy link
Member

Phillipus commented Dec 2, 2024

I've built an Early Access version of Archi so you can try it out:

Change line style for selected elements in the Properties/Appearance tab.

@johmut
Copy link

johmut commented Dec 13, 2024

Hi @Phillipus, @jbsarrodie,
I have tested the early-access version and like very much how this has been implemented. No issues so far.
One thing I missed is perhaps the option to set the line-style to 'None'. Can you imagine adding that to the release?
KR,
Johan

@Phillipus
Copy link
Member

Phillipus commented Dec 13, 2024

One thing I missed is perhaps the option to set the line-style to 'None'

Do you mean non-visible? If so, you can set line opacity to 0.

I can certainly implement a "None" line style in the drop-down box which means that the border is not drawn on the rectangle type figures, but it could be achieved with the line opacity setting. @jbsarrodie WDYT?

@jbsarrodie
Copy link
Member

I can certainly implement a "None" line style in the drop-down box which means that the border is not drawn on the rectangle type figures, but it could be achieved with the line opacity setting. @jbsarrodie WDYT?

I think that would make sense as it's more obvious and making border transparent seems a bit like a hack.

Btw we might want to revisit visual notes as we have a "border style" which mixes figure style (rectangle vs dog ear) and border style (none). But maybe you've already change that (I still havenwt tested the latest code)

@Phillipus
Copy link
Member

Phillipus commented Dec 14, 2024

Btw we might want to revisit visual notes as we have a "border style" which mixes figure style (rectangle vs dog ear) and border style (none).

Note has an additional border type of "None", and Canvas Block and Canvas Image have a border colour of "None" (no border). If they are removed I'd have to add a backward compatibility handler to convert them to the none line style when loading older models.

@Phillipus
Copy link
Member

Phillipus commented Dec 14, 2024

Unless anyone has another idea then I'll have to write a converter when loading models to change a Note's border style from "None" to "Rectangle" and set its Line Style to "None" instead. Also deprecate the Note border style of None (and in jArchi) and remove the option from the drop-down.

This conversion has the side-effect that opening the model in an earlier version of Archi the Note will not have a "None" border type.

@jbsarrodie
Copy link
Member

If they are removed I'd have to add a backward compatibility handler to convert them to the none line style when loading older models.

I was expecting that. So my personal preference is to keep it as it is today. Maybe this can be added to a list of other changes which require updating the internal persistance format, and do this changes in one single release when coArchi2 will be available. This would limot impact on coArchi1 users.

@Phillipus
Copy link
Member

I've added the "None" option to today's early access release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants