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

[Wanted feature][Style] Allow full local style (for if diamonds) on Activity diagram #1623

Closed
The-Lum opened this issue Dec 8, 2023 · 6 comments
Labels

Comments

@The-Lum
Copy link
Collaborator

The-Lum commented Dec 8, 2023

Context

Observed on QA-18457.

Wanted feature

  • Could you allow full local style on Activity diagram?

Example source

@startuml
<style>
activityDiagram {
  diamond {
    LineColor blue
    BackgroundColor lightCyan
    LineThickness 2
    ArrowThickness 0.5
    FontName Arial Narrow
    FontColor red
    FontSize 11
    FontStyle regular
  }
}
</style>
if (decision) then (yes)
    :C1;
else (no)
endif
<style>
activityDiagram {
  diamond {
    LineColor red
    BackgroundColor pink
    LineThickness 1
    ArrowThickness 1
    FontName Courier
    FontColor blue
    FontSize 10
    FontStyle italic
  }
}
</style>
if (decision) then (yes)
    :C2;
else (no)
endif
@enduml

Output (tested on 1.2023.13beta3) ❌

Here is the result:

  • ✔️ It seems only OK for BackgroundColor,
  • ❌ but KO for all the other style parameters.

Regards,
Th.

@github-actions github-actions bot added the triage label Dec 8, 2023
@arnaudroques
Copy link
Contributor

I think there is an extra diamond { in your example that is the root of the issue.

It looks like it is working fine this way.

@The-Lum
Copy link
Collaborator Author

The-Lum commented Dec 8, 2023

In fact that is the opposite:

  • some end bracket (}) are missing...

I will fix that this evening...

Regards,
Th.

@The-Lum
Copy link
Collaborator Author

The-Lum commented Dec 8, 2023

Hi @arnaudroques, and all,

I just changed with the correct end bracket (}). [Sorry for the first mistake.]
The wanted feature remains... 😄

Regards,
Th.

@arnaudroques
Copy link
Contributor

The wanted feature remains... 😄

Well, I am confused here :-)
In the diamond, the FontColor is ok, the LineColor is ok, the BackgroundColor is ok.
Could you be more specific about what is not correct? Thanks!!

@The-Lum
Copy link
Collaborator Author

The-Lum commented Dec 11, 2023

Hi @arnaudroques, and all,

Here are some more explanations:

@startuml

' Local style for the diamonds of the first if;
<style>
activityDiagram {
  diamond {
    LineColor blue
    BackgroundColor lightCyan
    LineThickness 2
    ArrowThickness 0.5
    FontName Arial Narrow
    FontColor red
    FontSize 11
    FontStyle regular
  }
}
</style>
:On the diamonds of the first if;
floating note
According the above (local) style:
* The line color is not good
it should be <color:blue>blue
* The FontColor is not good
it should be <color:red>red
* The LineThickness is not good
* The FontStyle is not good
* ...
* <b>Only the BackgroundColor is good!
end note
if (decision) then (yes)
    :C1;
else (no)
endif


' Local style for the diamonds of the second if;
<style>
activityDiagram {
  diamond {
    LineColor red
    BackgroundColor pink
    LineThickness 1
    ArrowThickness 1
    FontName Courier
    FontColor blue
    FontSize 10
    FontStyle italic
  }
}
</style>
:On the diamonds of the second if;
floating note
<b>All is good here... (like if the param will be global)
The BackgroundColor, the LineColor, the FontColor
end note
if (decision) then (yes)
    :C2;
else (no)
endif
@enduml

If that is more clear 😄
Regards,
Th.

@arnaudroques
Copy link
Contributor

If that is more clear 😄

Yes, definitively more clear! We were lost with all those colors :-)

This might be fixed in last snapshot.
Please reopen this issue if needed!

Many thanks for your tests!

@The-Lum The-Lum changed the title [Wanted feature][Style] Allow full local style on Activity diagram [Wanted feature][Style] Allow full local style (for if diamonds) on Activity diagram Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants