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

#119, #72: All elements and relationships can support hyperlinks (based on #126) #135

Merged
merged 15 commits into from
Apr 11, 2021

Conversation

kirchsth
Copy link
Member

Hi,

I created a new PR based on #126 with link support. It should cover #119 and #72.
I didn't merge the links support into #126 that the link extensions can be rejected.

I extended all calls with a $links="..." that all elements and relationships can have a link like below

@startuml
!include https://raw.githubusercontent.com/kirchsth/C4-PlantUML/extended/C4_Container.puml

Person(admin, "Administrator", $sprite="person2", $link="https://github.com/plantuml-stdlib/C4-PlantUML/blob/master/LayoutOptions.md#hide_person_sprite-or-show_person_spritesprite")
System_Boundary(c1, "Sample System", $link="https://github.com/plantuml-stdlib/C4-PlantUML") {
    Container(web_app, "Web Application", "C#, ASP.NET Core 2.1 MVC", $descr="Allows users to compare multiple Twitter timelines", $link="https://github.com/plantuml-stdlib/C4-PlantUML/blob/master/LayoutOptions.md")
}
System(twitter, "Twitter", $link="https://github.com/plantuml-stdlib/C4-PlantUML")

Rel(admin, web_app, "Uses", "HTTPS", $link="https://plantuml.com/link")
Rel(web_app, twitter, "Gets tweets from", "HTTPS", $link="https://plantuml.com/link")
@enduml

png itself supports no links, therefore the following image is generated as svg image.
Github does not support svg links in Markdown.
If you click on the image a new window is opened and there you can use the links.

Click on the image that the links are working

The implementation can be checked via my extended branch

BR Helmut

…nIconic and tags (1 - legend update missing)
…ntUML internal line breaks are not deterministic)
…nIconic and tags (2 - incl legend)

add procedures: AddRelTagSupport(), UpdateRelStyle()
rename procedures: SHOW_DYNAMIC_LEGEND() to SHOW_LEGEND(), UpdateSkinparamsAndLegendEntry() to UpdateElementStyle()
…nIconic and tags (4 - rename AddTagSupport() to AddElementTag(), AddRelTagSupport() to AddRelTag(), update img links)
…nIconic and tags (5 - skinparam arrow colors allows no #, resync percy files, fix build)
…nIconic and tags (6 - fix PR findings: remove obsolete code, update comments and use https urls)
…nIconic and tags (6a - fix PR finding: all files should end with empty line)
Copy link
Member

@Potherca Potherca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes look good. I haven't checked the www.plantuml.com/plantuml/ diagrams this time, though.

@kirchsth
Copy link
Member Author

@Potherca: on plantuml server it is working (it overlays png with maps, details see end of #72).

@adrianvlupu
Copy link
Member

Considering the changes, I think a new version needs to be released before merging this

@Potherca Potherca added this to the v2.2.0 milestone Apr 4, 2021
@Potherca
Copy link
Member

Potherca commented Apr 4, 2021

@adrianvlupu I've taken the liberty of tagging v2.1.0. (and supplying milestones for all MRs/issues) Do you think we should also create a release branch? (As was done with v2.0.0, since files now link to master).

@kirchsth
Copy link
Member Author

kirchsth commented Apr 5, 2021

@Potherca thank you for Release 2.1. Can you please release v 2.2 soon too?
(#126 contains following changes and therefore I think 2.1 should be a "short living" release:
UpdateSkinparamsAndLegendEntry -> UpdateElementStyle
SHOW_DYNAMIC_LEGEND -> SHOW_LEGEND
)

@Potherca Potherca linked an issue Apr 6, 2021 that may be closed by this pull request
@Potherca
Copy link
Member

Potherca commented Apr 8, 2021

@kirchsth Release is planned for my FOSS work this weekend.

@Potherca Potherca merged commit ceddd0a into plantuml-stdlib:master Apr 11, 2021
@Potherca
Copy link
Member

Potherca commented Apr 11, 2021

@kirchsth This has been released as v2.2.0.

Before tagging the release, I did add 621a191 and 34353dd to make sure that master doesn't break because of SHOW_DYNAMIC_LEGEND and UpdateSkinparamsAndLegendEntry being renamed. (This would have effectively meant a v3 release as it breaks backward compatibility). For future MRs this might be something to take into account, as we want to break master as little as we possibly can.

Obviously, we should have seen this when reviewing this MR, but beter late than never, right? 😁

I would have liked to add more to that release but, because of 2 reviewers being needed, things will have to wait for v2.3 . 😞

@kirchsth
Copy link
Member Author

@Potherca thank you for the extension, deprecated is a good idea

@kirchsth kirchsth deleted the feature/126_inclLink branch July 4, 2021 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Hyperlink element node to another diagram
3 participants