Consistent Artwork?

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Roy_043
Veteran
Posts: 8585
Joined: Thu Dec 27, 2018 12:28 pm

Consistent Artwork?

Post by Roy_043 »

While working on the pages for the Std_Menu I have uploaded several replacement SVG images. In some cases the images are duplicates of existing artwork but with the correct "Std_*" name.

Looking at the Artwork page I see some older and incorrect images (that are used on several pages sometimes). When I say incorrect I mean that they do not match the images used in the program. Certainly not all images have the correct "Std_*", "Draft_*" etc. names.

What should be done to make things more consistent?
Should I modify the Artwork page whenever I upload a new image?
Should I also edit the pages where images with the wrong names are used? Or can this be done automatically?
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Consistent Artwork?

Post by vocx »

Roy_043 wrote: Thu Apr 02, 2020 5:50 pm ...
What should be done to make things more consistent?
Should I modify the Artwork page whenever I upload a new image?
Should I also edit the pages where images with the wrong names are used? Or can this be done automatically?
I've explained this a few times in this wiki subforum.

The Artwork pages should include all images that are included in the source code exactly how they are named in the source code.

However, many commands do not match their icon name. Say, if we have a tool called "Std_SuperView", its icon may be named "superview.svg". In the source code itself there is no problem, we can use whichever icon name we want for that tool, and we only need to specify this once.

However, when creating the wiki pages, we often have to use the same command many times, so we need to specify the icon many times. I don't want to remember the name of the icon. In this case, I upload the icon name to be the same as the command name. So, if the command is called "Std_SuperView", I upload a file called "Std_SuperView.svg". Then I can use the command name next to its icon quickly, like [[File:Std_SuperView.svg|16px]] [[Std_SuperView]].

This is what the documentation pages use. The GuiCommand template takes the |Name= value, and uses it to find a corresponding icon named the same as the command. So the two names must match. This is just for convenience, to facilitate us the work of writing these documentation pages.

However, the Artwork pages should still have the "correct" icon name, "superview.svg". So, the file would be uploaded twice, once as "superview.svg" and another time as "Std_SuperView.svg". This is done on purpose to facilitate writing the documentation.

As a matter a fact, maybe we don't need to upload the icon twice. Instead we could define a redirection, so that the page File:Std_SuperView.svg redirects to File:Superview.svg. I didn't do this at the beginning, but maybe it can be done now.

Also, many pages still have PNG versions of the icons that existed prior to v0.16. Obviously these files are obsolete and should be updated. All icons in the Artwork pages should list the current SVG icons. And yes, there are extensions for the wiki that would allow us to mass import the icons in the current source code into the wiki, but I think such extensions are not currently enabled. They must be used responsably, as otherwise these extensions could be used to generate spam.
Should I also edit the pages where images with the wrong names are used? Or can this be done automatically?
Exactly which images?

As I said, sometimes using the "wrong" icon name is intentional, but other cases it may not be. So, I wouldn't like you to just blindly rename all icons without taking into account what I mentioned earlier.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
Roy_043
Veteran
Posts: 8585
Joined: Thu Dec 27, 2018 12:28 pm

Re: Consistent Artwork?

Post by Roy_043 »

vocx wrote: Thu Apr 02, 2020 6:41 pm The Artwork pages should...
Well, I have only looked at the main Artwork page. And that page certainly does not comply.

Two examples (images that differ from those used in the GUI):
document-new.svg
and the draw style icons.

I was not aware of the double naming scheme. Never a good idea IMO.
I see now that some images in the source do have the WB prefix. Which explains the inconsistent image names on the Artwork page.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Consistent Artwork?

Post by vocx »

Roy_043 wrote: Thu Apr 02, 2020 8:16 pm Well, I have only looked at the main Artwork page. And that page certainly does not comply.
The main Artwork page groups different icons into sections: File, View, Edit, etc. However, in my opinion, these classifications are unnecessary, and we should concentrate exclusively on the lists of icons by path, that is, src/Gui, src/Mod/Arch, src/Mod/Draft, etc.

For example, we have missing icons for all the workbenches listed in the src/Mod/AddonManager directory.

When I re-organized the pages into subpages, I left the first section (Application icons common to multiple workbenches) intact because I didn't feel like outright deleting it. However, if you can verify that each of those icons are in the subpages, then I think we can delete that section.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
Roy_043
Veteran
Posts: 8585
Joined: Thu Dec 27, 2018 12:28 pm

Re: Consistent Artwork?

Post by Roy_043 »

vocx wrote: Thu Apr 02, 2020 11:31 pm if you can verify
I do not see how that makes sense if the plan(?) is to reorganize these pages using the src folder structure:
Each folder gets its own wiki page.
The pages can perhaps even be created (semi) automatically from the src.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Consistent Artwork?

Post by vocx »

Roy_043 wrote: Fri Apr 03, 2020 7:34 am ...
The pages can perhaps even be created (semi) automatically from the src.
My point is that I didn't want to delete all icons without knowing that they are already somewhere else.

For example, there are some FreeCAD emoticons. I think these were created exclusively for the wiki and I don't see them in the source code. So, maybe we don't want to delete everything.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
Roy_043
Veteran
Posts: 8585
Joined: Thu Dec 27, 2018 12:28 pm

Re: Consistent Artwork?

Post by Roy_043 »

vocx wrote: Fri Apr 03, 2020 6:08 pmdelete all icons without knowing that they are already somewhere else
The problem is rather more the opposite:

Let's look at an example:
On the Artwork page we find Workbench_FEM.svg (41kB). Used on 100+ pages.
On the Artwork_Fem we find FemWorkbench.svg (83kB). Used on 4 pages.
In the source we find FemWorkbench.svg (39kB).

In theory you could remove the first image from the Artwork page: wrong name, wrong file. And after updating the file on the Artwork_Fem page everything is OK again for this image.
But this may not be wise if, at a later date, you want to find those 100+ pages.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Consistent Artwork?

Post by vocx »

Roy_043 wrote: Fri Apr 03, 2020 7:29 pm ...
On the Artwork page we find Workbench_FEM.svg (41kB). Used on 100+ pages.
...
I think this is "Workbench_something.svg" convention is only used in the wiki. And Kunda followed that and used it also for the Addon Manager icons.

So, at that point it may be easier to rename the icons in the source code. Because there are like 20 workbenches, so it's easier to rename 20 icons, and change 20 pages in Artwork_Fem, Artwork_Arch, etc. than it is to rename 100 pages.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
Roy_043
Veteran
Posts: 8585
Joined: Thu Dec 27, 2018 12:28 pm

Re: Consistent Artwork?

Post by Roy_043 »

OK: Let's keep those "Workbench_something.svg" images... :mrgreen:

Although that means we now have 4 name categories for images:
  1. Identical to the source code name.
  2. With the "Workbench_" prefix.
  3. With the WB name prefix: "Std_", "Draft_" etc. In some cases source code names already have this prefix.
  4. Faulty names.
I have updated the Artwork page. And, for now, have added an 'Obsolete Icons' paragraph.

There are also multiple 'Icon' pages and 'Key' pages:
Arch_Icon, Arch_Key etc. that have to be kept up to date.

It may perhaps be worth reconsidering them.
User avatar
Roy_043
Veteran
Posts: 8585
Joined: Thu Dec 27, 2018 12:28 pm

Re: Consistent Artwork?

Post by Roy_043 »

Also strange: 2 different FreeCAD logo icons are used on the wiki pages. And the program icon is different from those two.
Last edited by Roy_043 on Sat Apr 04, 2020 9:06 pm, edited 1 time in total.
Post Reply