How the skinparam topurl works? [URL, links]

0 votes
asked Feb 23, 2021 in Question / help by The-Lu (63,920 points)
edited Feb 23, 2021 by The-Lu

Hello PlantUML team,

  • How the skinparam "topurl" works?

Here is a minimal example:

@startuml
SkinParam topurl https://forum.plantuml.net

url of A is [[/13179]]
url of B is [[https://plantuml.com/sequence-diagram{This is B}]]
@enduml


→ [See links on PlantUML online server]

What did I misunderstand.
Thanks for yours support,

Regards,
Th.

commented Feb 24, 2021 by chris (2,540 points)
edited Feb 24, 2021 by chris
Using -language I can't find this keyword, where did you find topurl as a reference?
commented Feb 25, 2021 by The-Lu (63,920 points)

Hello C.,

Here are all references or source:

Regards,
Th.

1 Answer

+1 vote
answered Mar 3, 2021 by chris (2,540 points)
selected Mar 9, 2021 by The-Lu
 
Best answer

You need to be a bit more explicit, it looks like, specify the participants for sequence diagram. Works for class diagram too

commented Mar 4, 2021 by Martin (8,360 points)
Well done.  However it wasn't the specifying of the participants that did it, it was the adding of the "{}" into the url.
commented Mar 4, 2021 by chris (2,540 points)
Ah yes, cheers, I forgot to mention that as I converted from class back to sequence (took a bit of fiddling to get it working) - still counts as being more explicit though, eh ;)
commented Mar 4, 2021 by The-Lu (63,920 points)

Thanks @chris, @Martin: for the tip of empty tooltip ('{}').
But it seems to be a bug!
Why topurl works only with empty tooltip? Is it normal?

commented Mar 4, 2021 by Martin (8,360 points)
edited Mar 4, 2021 by Martin

Yes, I would say it's a bug.  A trailing space works too: [[/13179 ]], or quotes: [["/13179"]]

I'm not very familiar with Java, but my best guess at the bug is:

Line#107 in URLBuilder.java

return new Url(full, null, null);

should be

return new Url(withTopUrl(full), null, null);

commented Mar 9, 2021 by The-Lu (63,920 points)

Hello all,

Thanks @Martin for point out on the code, and for the other workarounds (empty tooltip or space) and FYI with quotes it is KO.

Then here is the summary of my tests:

I can will open a BUG Report for the correction of the Line#107 in URLBuilder.java.
Regards,
Th.

asked Mar 24, 2021 in Wanted features by The-Lu (63,920 points) Allow 'topurl' on all hyperlink or URL
...