!theme supports no calculated from path and no stdlib from path

0 votes
asked May 13, 2023 in Wanted features by kirchsth (4,880 points)
edited May 13, 2023 by kirchsth

related to C4 themes

Starting with v1.2023.7 (prerelease) stdlib deploys C4 with themes support that it can be used e.g. via !include

!include <C4/themes/puml-theme-C4_united.puml>

But !theme supports neither calculated path nor the stdlib path (!include supports both options)

' NOT WORKING: theme with stdlib from <<<<<<<<<<<<<<<<<
'!theme C4_united from <C4/theme>

' NOT WORKING: theme with calculated from <<<<<<<<<<<<<<<<<
!$baseUrl = "https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master"
' !theme C4_united from $baseUrl/themes

Is it possible to extend !theme that "from path" supports the same features like the "include path"

If you click the link you see all working and not working (missing) !theme calls

Thank you and best regards
Helmut

1 Answer

0 votes
answered May 15, 2023 by plantuml (294,960 points)
selected May 18, 2023 by kirchsth
 
Best answer

Thanks for the idea!

This is implemented in last beta.

Tell us if it's not working for you or if you need other improvement.

Regards,

commented May 15, 2023 by kirchsth (4,880 points)

Thank you for the fast implementation

a) themes via  stdlib are working,
b) but the calculated themes are still not working

Can you please implement the calculated themes too (reuse the existing !include implementation)?
It would simplify the local theme development



Thank you and best regards
Helmut

commented May 17, 2023 by plantuml (294,960 points)

point b should be fine now.

Tell us if it's not working for you!

Thanks

commented May 17, 2023 by kirchsth (4,880 points)

Again, thank you for the fast implementation. yes

1) combination with $baseUrl is working
      !theme C4_united from $baseUrl/themes
2) In my sample above I have a combination with a function too, this is still not working.
      !theme C4_united from  %get_variable_value("RELATIVE_INCLUDE")/themes

Could you fix this too?
BR Helmut

commented May 17, 2023 by plantuml (294,960 points)

Could you give a simple but complete non-working example ?

This one is working for us:

@startuml
!RELATIVE_INCLUDE = "https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master"
!theme C4_united from %get_variable_value("RELATIVE_INCLUDE")/themes
!include <C4/C4>
C4Version()
%version()
@enduml

Thanks!

commented May 17, 2023 by kirchsth (4,880 points)

Thank you, you are right.
I added in my sample unintentional a second space after from and then it is not working anymore

@startuml
!RELATIVE_INCLUDE = "https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master"

' WORKING
' !theme C4_united from %get_variable_value("RELATIVE_INCLUDE")/themes
' NOT WORKING (2 spaces between "from  %get..")
  !theme C4_united from  %get_variable_value("RELATIVE_INCLUDE")/themes

!include <C4/C4>
C4Version()
%version()
@enduml


https://www.plantuml.com/plantuml/uml/bOx1IyCm58Vl-IlU0iFri0Qa9r6Pn2B5sidOvh6axNCD96b9NhP_twwW1y63juy7l-zxcq3AKxI6BNPv-RGlZdbTLB8yFEVm0Bmd6iET45vTqfEcFZOne6y7H-WeRGShHgFSTRyEr1dT29cjtw-dmrifh0g4dZDs0n_RtMjHlKoqe1ujWipgw3HX1vz-iB0y8TLdvRLg34vW8gxuxuzu8kPnc3JLTlyjXTKjX56r6A11kY0wuBDqjgOfJnZyaVrlbosqQqti4Evb9cJso6HsH1_qu5O9Mvv_S8EkYzPy0G00

commented May 17, 2023 by plantuml (294,960 points)
Thanks for the report: we will also fix this space issue... tomorrow :-)

We'll post a message here when ready.
commented May 18, 2023 by plantuml (294,960 points)
commented May 18, 2023 by kirchsth (4,880 points)

Thank you, it works perfect. yesyesyes

Is there a "central" place that I can download the (latest) beta version of the jar?

commented May 18, 2023 by plantuml (294,960 points)
You'll find it on github https://github.com/plantuml/plantuml/releases

Hope this helps!
commented May 18, 2023 by kirchsth (4,880 points)

Thank you.
Did you explicit create this release or was automatically?
If it is automatically I update following issue.

commented May 18, 2023 by plantuml (294,960 points)
It's automatic, thanks to github action.

Do not hesitate to update other issues if they are fixed! Thanks for your help.
...