Hidden not working with arrow direction in component diagram

0 votes
asked 6 days ago in Bug by Serge Wenger Work (9,810 points)

@startuml
package AAAA {
   component C1
   component S1
   component S2
   C1 -left- S1
   C1 -[hidden]- S2
'Remove next line comment
'S1 -left[hidden]- S2}
@enduml

If we remove comment to the red line, there is a syntax error

http://www.plantuml.com/plantuml/png/SoWkIImgAStDuIf8JCvEJ4zLS0G2XMek1GM5vFpSWloyrBmI1MT3L7umEjy8o0UgKj3DIKqhqGNAm_ZH6PafAQbviReWDUf1gRdvPQaAUQaL9GevcNcf82DoWGPmgGT3zIAhh-LoICrB0ReD0000

commented 5 days ago by albert (2,340 points)
Something that is quite strange for me is that the "red" line contains the closing '}' and that no error is given as the package is not "closed.
commented 5 days ago by albert (2,340 points)
I think the error is correct, it does not really make sense to have a hidden line and attach it somewhere (in this case on the left hand side). On the other hand it might be useful for ordering the different component in a certain order.
commented 5 days ago by Serge Wenger Work (9,810 points)
Hello albert,

You are rignt for the }. It should be:
@startuml
package AAAA {
   component C1
   component S1
   component S2
   C1 -left- S1
   C1 -[hidden]- S2
'Remove next line comment
'S1 -left[hidden]- S2
}
@enduml

I use this to try to modify some layout
commented 2 days ago by plantuml (182,940 points)
Actually it works the other way:

@startuml
package AAAA {
   component C1
   component S1
   component S2
   C1 -left- S1
   C1 -[hidden]- S2
'Remove next line comment
S1 -[hidden]left- S2
}
@enduml

http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuIf8JCvEJ4zLS0G2XMek1GM5vFpSWloyrBmI1MT3L7umEjy8o0UgKj3DIKqhqGNAm_ZH6PafAQbviReWDUf1gRdvPQaAUQaL9GevcNcf82DoWGPm1ICf1Ha1LbxBvP2Qbm9q6m00

I agree that syntax is not very intuitive...
commented 2 days ago by albert (2,340 points)
I had a look at the webserver version and saw a few thing:
- the 'left' relation between S1 and S2 is not present in the png and svg version
- in the 'ASCII art' version there is a line between S1 and S2 and between C1 and S2

1 Answer

0 votes
answered 2 days ago by Serge Wenger Work (9,810 points)

Thanks for the S1 -[hidden]left- S2

...