Hidden not working with arrow direction in component diagram

+1 vote
asked Oct 11, 2018 in Bug by Serge Wenger Work (15,620 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 Oct 12, 2018 by albert (3,520 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 Oct 12, 2018 by albert (3,520 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 Oct 12, 2018 by Serge Wenger Work (15,620 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 Oct 15, 2018 by plantuml (294,960 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 Oct 15, 2018 by albert (3,520 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

2 Answers

+1 vote
answered Oct 15, 2018 by Serge Wenger Work (15,620 points)

Thanks for the S1 -[hidden]left- S2

0 votes
answered Jun 16, 2020 by Marcel

You should use:

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

...