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

Fix PlantUML style #4

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 25 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ The output style is org-mode mindmap.

```uml
@startmindmap
* Root
** LoggedOut<<noView>>
*** TermsOfUse
**** FailedLoading
*** Welcome
**** SignInFailedDialog
**** ForgotPassword
***** SMSAuthentication
****** ResetPassword
** LoggedIn<<noView>>
* Root<<hasView>>
** LoggedOut
*** TermsOfUse<<hasView>>
**** FailedLoading<<hasView>>
*** Welcome<<hasView>>
**** SignInFailedDialog<<hasView>>
**** ForgotPassword<<hasView>>
***** SMSAuthentication<<hasView>>
****** ResetPassword<<hasView>>
** LoggedIn@endmindmap
@endmindmap
```

Expand All @@ -44,16 +44,23 @@ Additionally, the mindmap style is set to detect easily the RIB has own view or
```
<style>
mindmapDiagram {
. * {
BackGroundColor #FFF
BackgroundColor translate
LineColor #d20b52
FontColor #d20b52
RoundCorner 30
LineThickness 2.0

node {
BackgroundColor #fff
}

arrow {
LineColor #192f60
Shadowing 0.0
RoundCorner 20
LineThickness 2.0
}
.noView * {
BackGroundColor #FFF
LineColor #d20b52

.hasView {
LineColor #192f60
FontColor #192f60
}
}
</style>
Expand Down
26 changes: 16 additions & 10 deletions Sources/RIBsTreeMaker/TreeMaker/PlantUMLFormatTreeMaker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private extension PlantUMLFormatTreeMaker {

let viewControllablers = extractViewController(from: edges)
let hasViewController = viewControllablers.contains(targetName)
let suffix = hasViewController ? "" : "<<noView>>"
let suffix = hasViewController ? "<<hasView>>" : ""
if shouldShowSummary, let retrievedSummaryComment = try retrieveSummaryComment(targetName: targetName) {
summary = " / \(retrievedSummaryComment)"
}
Expand All @@ -59,17 +59,23 @@ private extension PlantUMLFormatTreeMaker {
let style = """
<style>
mindmapDiagram {
. * {
BackGroundColor #FFF
BackgroundColor translate
LineColor #d20b52
FontColor #d20b52
LineThickness 2.0

node {
BackgroundColor #fff
RoundCorner 30
}

arrow {
LineColor #192f60
Shadowing 0.0
RoundCorner 20
LineThickness 2.0
}
.noView * {
BackGroundColor #FFF
LineColor #d20b52
TextColor #d20b52

.hasView {
LineColor #192f60
FontColor #192f60
}
}
</style>
Expand Down