fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
465 stars 298 forks source link

Missing icons in control panel #3493

Open JustCarmen opened 4 years ago

JustCarmen commented 4 years ago

There are some icons missing in control panel.

Before:

fisharebest commented 4 years ago

These are two icons:

I see them fine.

Do you see:

JustCarmen commented 4 years ago

I see the missing icon symbol

JustCarmen commented 4 years ago

Ok, this is strange. I am working on the Justlight theme for wt-2. When switching to the default webtrees theme at my development site, the icons are back. I didn't know it was possible to interfere with the admin theme but apparently it is. Any idea what could have happened?

fisharebest commented 4 years ago

You set the icons in your boot() function - which is correct.

You are using font-awesome icons.

webtrees only loads the icons that it uses. See https://fontawesome.com/how-to-use/on-the-web/advanced/svg-javascript-core See https://github.com/fisharebest/webtrees/blob/2.0.7/resources/js/vendor.js#L24-L40

I think the problem is that webtrees should not call boot() for admin pages - because modules should not run there.

This is related to #3413

ric2016 commented 4 years ago

I think the problem is that webtrees should not call boot() for admin pages - because modules should not run there.

I disagree with this. Modules may want to run on admin pages as well. For example, modules may want to add additional per-tree preferences. And why shouldn't a theme affect admin pages as well?

fisharebest commented 4 years ago

For example, modules may want to add additional per-tree preferences.

If two modules try to replace a the same view, only one will work.

In the genealogy pages, this might be OK. In the admin pages, this would be a problem.

Perhaps we could create a new interface to allow modules to add a section to the "tree preferences" page? My concern is that users will not find these options, as they have always used the module's own config page...

ric2016 commented 4 years ago

Perhaps we could create a new interface to allow modules to add a section to the "tree preferences" page? My concern is that users will not find these options, as they have always used the module's own config page...

I don't think that's too much of a problem - the module's config page could add a note to that effect. Otherwise, the module would have to add a tree selection dialog for tree-specific preferences. Or maybe even add both navigation options automatically if a module implements the new interface?

Another question is where to store such preferences, is it ok to have them in the gedcom_setting table, or should there be an additional module_gedcom_setting table?

Anyway, are we quite sure modules shouldn't run on admin pages, even if this and #3413 is addressed? We definitely don't want any theming for these pages for example?

fisharebest commented 4 years ago

Anyway, are we quite sure modules shouldn't run on admin pages

Not entirely sure.

For example, data-fixes are modules, and these run on the admin pages...

fisharebest commented 4 years ago

Another question is where to store such preferences, is it ok to have them in the gedcom_setting table

I think this is OK.

The relationships-chart module already does this.

But it might be wise to choose your setting names carefully, to avoid future conflicts.

JustCarmen commented 3 years ago

Is there a way to determine if I am at an admin page?

What I want to do is to load my theme views (from the theme boot function) only if I am at the front side and not in control panel.

This would prevent the conflicts I am facing with the JustLight theme as described above.

I agree with ric2016 that it should be possible for a module to set some per tree configuration but in my case for this theme I don't need it and so I am looking for a way to get rid of the question marks in control panel. The easiest way I could think of is to determine if the user is on an admin page and then not run the conflicting part of the boot function from this particular module.