spacebase / spacebasenz

Website for SpaceBase New Zealand
http://dev-spacebasenz.pantheonsite.io/
GNU General Public License v2.0
0 stars 0 forks source link

Establish what font modules are actually needed for what and uninstall + remove unused ones #305

Open treasuretron opened 4 years ago

treasuretron commented 4 years ago

In GitLab by @jayelless on Dec 19, 2018, 22:29

The contrib module fontyourface has been re-installed to allow a problem with failure to purge the data associated with two font entity fields that had been deleted from the system. When all the data scheduled for deletion has been removed, then the fontyourface module can again be removed from the system.

We are have Font Awesome installed but there is no information about what it's for or even if it is being used.

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Feb 25, 2019, 19:31

changed title from {-Remove the contrib module fontyourface-} to {+Establish what font modules are actually needed for what and uninstall + remove unused ones+}

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Feb 25, 2019, 19:32

changed the description

treasuretron commented 4 years ago

In GitLab by @jayelless on Feb 26, 2019, 19:28

The fontyourface module was not being used anywhere (had previously been used I believe, but this was phased out some time ago). Can safely be uninstalled and deleted from the codebase.

The fontawesome module is used to load a file of icons from "https://use.fontawesome.com/releases/v5.0.6/css/all.css" which are then used in various ui elements. A fontawesome icon is displayed by having code similar to

<a href="/invite"><i class="dblock fas fa-plus-circle"></i><span class="text-center">Invite New Members</span></a>

in the generated markup. This is mostly in the spacebase theme or custom module templates. There are also a couple of instances occurring in "#markup" elements in field plugins of custom modules.

The key for fontawesome is the use of the tag with appropriate classes - always "fas" or "far" plus another specific to the icon. Refer to https://www.drupal.org/docs/8/modules/font-awesome-icons for details.

I note that the contrib module (8.x-2.12) has been configured to use the v4 shim file for backwards compatibility of the v5 FontAwesome library with v4 FontAwesome parameters. However, this functionality is only available if the "SVG with JS" method of delivery is used. However the spacebase website is using the older "Web Fonts with CSS" method, so the configuration to use the shim file should be removed.

Consideration should be given to updating the site to use the more modern "SVG with JS" method.

treasuretron commented 4 years ago

In GitLab by @jayelless on Feb 26, 2019, 19:48

One other item is that the site appears to be configured to pull a file with ALL fontawesome icons. I expect that only a small subset are required, so it may be possible to specify a different external file so that only a subset are loaded. This should improve performance.

treasuretron commented 4 years ago

In GitLab by @jayelless on Feb 27, 2019, 18:20

Hi @richbodo : Does Spacebase have a current licence for Fontawesome Pro, or has it had such a licence previously? It appears that some of the referenced font icons are available only with a licence for the pro version.

treasuretron commented 4 years ago

In GitLab by @richbodo on Feb 27, 2019, 19:38

We did buy one back in the day. I'll see if I can dig it up.

treasuretron commented 4 years ago

In GitLab by @jayelless on Mar 22, 2019, 18:51

mentioned in merge request !281

treasuretron commented 4 years ago

In GitLab by @jayelless on Mar 22, 2019, 19:25

The branch 299-font-modules should now be merged into dev. The Fontawsome licence (if any) can come along later.

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Mar 26, 2019, 18:25

closed via merge request !281

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Mar 26, 2019, 18:25

mentioned in commit 00fc7077c4a2ded49ddb332040057ad4bf59689e

treasuretron commented 4 years ago

In GitLab by @jayelless on Mar 26, 2019, 19:13

The merge to dev was unsuccessful, as the fontyourface module was removed from the codebase before some configuration entities could be deleted. This meant that the config could not be imported. The solution will be to manage this update to dev in two stages:

  1. Get the config updated and imported correctly while the fontyourface module is still present in the codebase
  2. Remove the fontyourface module from the codebase in a second later merge request.
treasuretron commented 4 years ago

In GitLab by @jayelless on Mar 26, 2019, 19:13

reopened

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Mar 26, 2019, 22:50

mentioned in merge request !283

treasuretron commented 4 years ago

In GitLab by @jayelless on Apr 11, 2019, 19:05

@thomasmurphy I have generated a new merge request as the first of two parts. This will just uninstall the fontyourface module. A second one later will remove it from the codebase.