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
Remove obsolete drawings shown in diagram layer #3056
Comments
What is your plan for MSL v4.0.0 actually? Do you want to check all classes manually and compare if the diagram layer duplicates the icon layer? |
Is there a better way to do that? For sure there is a better way, but this is some programming effort, I suppose: Detect which diagram annotations contain line elements. I guess we shall create PRs for each sub-package to make small step improvements. |
I have two problems with understanding this guideline that was added 2017-04-18. Is the intention to avoid something like Modelica.Blocks.Discrete.Sampler (etc) where both diagram and icon layer graphically represent the sampler? In that case I don't see the need to move that to the documentation layer. Note that augmenting the diagram with drawing makes sense to me, e.g. Modelica.Blocks.Examples.PID_Controller has some illustration that works. |
If the above represents the intent I would propose to rephrase it, perhaps as: The diagram layer is intended to contain the graphical components, and if there are no graphical components it can be left empty. In particular do not make the diagram layer a copy of the icon layer. Graphical illustrations shall not be added in the diagram layer, but can be added in the HTML documentation. Note: Assuming this is the intent the check would be for the following combination:
Note that in most cases the Diagram layer doesn't really duplicate the Icon-layer; it just looks similar and graphical illustrations are fine if augmenting the components as in PID_Controller. |
I was going to say that mentioning |
I agree that lack is a bit odd. However, I don't think that preferredView="icon" would be good for these cases; I think the text- or documentation-layer is more appropriate to understand how the model behaves. Showing the icon doesn't give any new information, and it is too subtle in my opinion. |
In my workflow, I'm almost always thrown off by documentation opening up by default, but I agree that opening the text view would be even better than the icon. For classes that only serve to provide an icon, however, it would still be useful to set |
OK, it makes sense to me to to clarify the wording of the MSL User's Guide. Saying this, we posiibly leave the MSL models as they are, except there is a clear reason to remove some obsolete graphics from the diagram layer. |
I also agree to #3056 (comment) from @HansOlsson . |
Just noticed that the majority of math blocks use duplicate diagram layers. |
Yes, correct, but it is basically just an alternative icon and it is indeed not required to better understand the model. |
I wonder if we have a compromise on how we proceed
|
Those two make sense.
I would prefer if we don't use preferredView unless really needed, and especially not have preferredView="icon". If you want to understand a model the text, diagram or documentation layers are the most useful, and switching to a different layer often feels a bit odd. And you often (at least in many tools) click on the icon to get to the model - so you already know what the icon looks like (e.g. for the "Add"-block - which adds signals) - and wanted to understand it more; so just showing the icon or another image looking like the icon doesn't really benefit the users. |
No |
I removed redundant diagram layers and partially moved some images to the info layer. Many packages I am familiar with are covered by #3303. However, the following packages I am definitely not familiar with:
I kindly invite the library officers of these libraries to go through possibly affected models and remove redundant diagram drawings and/or place a copy of the drawing in the info layer. |
I quickly scanned Modelica.Fluid, if I understood what this issue is (which I'm not 100% sure) I only found two examples, namely I don't think this is very high priority, I'll see what I can do, but I guess I have other much more relevant issues to take care of before the deadline. |
I will proceed with Mechanics when PR #3312 is merged in order to omit conflicts. |
Both done with 2f6ae65 |
I guess this ticket is resolved for now. |
In the MSL there exist many Modelica classes which show a drawing the diagram layer. These drawings are obsolete according to the guidelines of the User's Guide
Modelica.UsersGuide.Conventions.Icons
:There are still plenty of Modelica classes in the MSL which do obey this rule. Diagram drawings to be used in the HTML documentation shall somehow be store somewhere as discussed in #2603 and #2695.
Note. In order to store some of my scripts and images until we come up with a decision I created https://gitlab.com/christiankral/ModelicaImages
The text was updated successfully, but these errors were encountered: