-
Notifications
You must be signed in to change notification settings - Fork 70
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
Integration into main plantuml.jar file #14
Comments
Thank you for all your work on plantuml, it's great! I am fine with integrating into plantuml, in fact that is probably better. I think some of the themes might need some tweaking still, which I can help you out with, or if you want to handle that, either way. I like the Also, it would be cool to build in some introspection, if possible. You do this already for many things in plantuml (i.e. -language). Some directive or command line flag that will print out the theme (either in skinparam format or style format). This would help users create their own themes based off of existing themes. It is a little selfish of me too, since I have been working on a theme designer for plantuml, which would help that. Of course, this isn't a big priority, but an idea. Let me know how I can help. Cheers |
I'm not sur that we will be able to handle themes, so we let it to the hands of the community (that is you! :-)
Very good idea!
Well, that's also a good idea. More difficult to implement, but we are starting to think about it :-)
Well, if you accept to manage https://github.com/plantuml/plantuml/tree/master/themes this would be really great. Another point, note that somehow we are deprecating skinparam and moving to style syntax. Another possible help: if you have any ideas of builtin functions we could provide to facilitate themes creation (for example, function to darker or lighter a color, to reverse it, to turn it to gray...) please do suggest. Regards, |
Yes, I can manage this, no problem
Yeah, when I originally did these themes, I wanted to use the style syntax, but I wasn't sure when it would become official, so I kept with the skinparam syntax. I can try to convert to style syntax.
I'm glad you asked :) There are a few functions/variables that would help out a lot. I was meaning to create a feature request for these, but didn't get to it. I am not sure if Java has a package/library to handle these conversions already. If not, then we can base off of an existing implementation (I have used this node pkg in the past, and I like their api). Flag to indicate plantuml support for styleFirst, related to the above style syntax, it would be nice to have a function or probably variable set which indicates that the style syntax is supported in the plantuml verion. So, in the theme files, I can support both skinparam and style (eventually we can phase out skinparam). So, it might look like this inside each theme file:
Doesn't have to be this exactly, but some mechanism so that the theme file can support skinparam and style Shading and tintingAs you mentioned, a shading (darker) and tinting (lighter) function would help a lot. Many of the themes have soft gradients, to give an impression of elevation. I had to manually covert theses gradient colors (I used this web site to do it). This works, but it is very tedious and error prone. So, something like:
Light/Dark DetectionHave a function(s) to determine if a color is light or dark. Something like:
The reason this will be useful is the determination of a color to use. One example, if the background color is dark, then we can set the text color as light, and vice versa. Text colorI believe some text color (text on sequence diagrams and class diagrams -- the text along the arrowed lines ), is automatically set, and can not be set via skinparam (perhaps style has this??). It would be nice to have some mechanism to set this as a default. The reason for this is because many web pages now support dark/light modes, so in that case you will want the text color set to something that looks good on dark and light backgrounds (if diagram is transparent). See this issue (last few comments) for some background on this. Lesser priorityI think having a function to reverse and one to turn into grayscale would be good too, but these would be lower priority. |
Thanks for the link.
Is this what you were expecting ?
That's a very good idea.
Any other strings than This won't help you right now, because this %feature() function is not implemented on older versions.
So we have just introduced a new syntax, where you provide two colors: one for light background, one for dark background.
This is not finished and not working in all case, but you've got the idea. PS: the |
That's perfect, thank you. This will condense the themes files quite a bit.
This helps. It will allow me to include both skinparam and style into the theme files.
Yep, this will be good. I think with this, a theme will be able to support both light and dark backgrounds (maybe not perfectly, but sufficiently). Question: The FontColor at the root level, that will be the default color, correct? In other words, you can override this value within each component (i.e. activity, sequence, etc)?
Ok, cool. I will try it out this weekend. If I have time, I might start modifying the themes this weekend to take advantage of these new features. |
Sorry, one more question. For the FontColor:
What will get chosen if the background is set to 'transparent'? |
Yes, exactly. Everything inherits from
Here we have a real issue. There is no way to guess if the real background color behind transparent is dark or light. (Well, I think, tell us if you have an idea!). So right now, we assume 'transparent' to be light. We are thinking about adding two directives:
So that the end-user can change this default behavior. This is not perfect... |
How about adjusting the syntax, so it might look like this:
Where that third color (i.e. blue), would represent the color to use if transparent. Could make that one optional, and default to current behavior. I know that makes that a little more messy, but seems consistent with current syntax. |
So your suggestion has been implemented in last commit. The third color is optional. Hope this helps ! |
Ok cool. I will try this out this weekend. |
First, many thanks for your work!
Those themes are really nice and greatly improve the default rendering of PlantUML which is known to be very old-fashioned :-)
We are thinking about integrating your work into our own repository.
In practice, this means that we would create a
themes
folder in https://github.com/plantuml/plantuml where we would copy allpuml-theme-xyz.puml
files from https://github.com/bschwarz/puml-themes/tree/master/themesMore important, we would also introduce a new dedicated directive
!theme
. Somehow, this!theme
directive would be a synonym for!include
, but less verbose. For example!theme cyborg
would simple includepuml-theme-cyborg.puml
from the innerthemes
folder. Usage of themes would be even easier this way.Integrating those themes inside plantuml.jar (like we have done for the standard library) will allow people which are running PlantUML on servers that have no direct access to Internet (which is frequent in many enterprises) to use your themes.
Of course, we will credit you for the themes in our license, since we don't want to take credit from other people works.
Would that be ok for you ? Does it sound as a good idea ?
Thanks,
The text was updated successfully, but these errors were encountered: