Breaking: The study plan icons are renamed and the controls are frontend icons
Description
In 2.4 the study plan registered seven icons in
Configuration/Icons.php, for the icon registry of the TYPO3 backend:
the icon of the content element, the record icons of categories, semesters and
modules, and the three control icons of the frontend, the plus and the minus
glyph of a semester header and the close glyph of a module dialog. Version 2.3
registered only the first four and asked for control icons nobody registered.
The template rendered the controls with core:.
The academic extensions now draw every icon from one set, Font Awesome Free
(solid), drawn in
current so each icon takes the colour of the
surrounding text, in both backend colour schemes and in the frontend
(ACE-593). The identifiers follow the scheme
tx-<extension key without underscores>-<group>-<name>, and the group
decides the registry:
- The content element icon and the three record icons are shown by the
backend only. They stay in
Configuration/Icons.phpunder new identifiers. The content element icon was a placeholder drawing in fixed colours, and now follows the colour scheme like the record icons. - The three controls are shown by the frontend only. They are no longer
registered by this extension: the partials
Frontend/andDefault/ Partials/ Study Plan/ Semester. html Frontend/render the shared action icons of academic_base from its frontend icon registry, with theDefault/ Partials/ Study Plan/ Module Dialog. html ab:ViewHelper of academic_base and the arguments they had (ACE-813).icon
The previous identifiers are removed without an alias:
| 2.x identifier | 3.0 identifier | Registry |
|---|---|---|
academic- | tx- | Configuration/ |
academic- | tx- | Configuration/ |
academic- | tx- | Configuration/ |
academic- | tx- | Configuration/ |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
academic- | tx- | Configuration/ of academic_base |
The files content-, category.,
semester., module., plus., minus.
and close. in Resources/ are removed. The new
files live in Resources/ and
Resources/. Resources/Public/Icons/Extension.svg
stays, as the extension icon only. The origin and licence of the Font Awesome
files (CC BY 4.0) are listed in
Resources/.
The controls are still inlined SVG. The files of 2.x carry a
view
but no
width
and
height
, and an inline SVG without a size
collapses to 0 pixels inside the flex header of a semester and inside the close
button of a dialog. Only the stylesheet 2.4 shipped made them visible, see
Important: The study plan controls are visible. The new files carry
width="1em" height="1em"
and keep that size without a stylesheet, which
this version no longer ships, see
Breaking: The study plan ships no stylesheet.
Impact
- An icon requested with one of the previous identifiers renders a
not-found placeholder: in TCA, page TSconfig and through
Iconthe one of TYPO3, withFactory:: get Icon () ab:the one of academic_base. A site package that registers one of the previous identifiers in itsicon Configuration/Icons.phporConfiguration/no longer changes anything.Frontend Icons. php - An override of
Semester.orhtml Modulethat renders a control withDialog. html core:shows TYPO3's not-found icon, because the icon registry of the backend does not know the identifiers of the frontend icon registry.icon - The class the icon markup derives from the identifier changes with it. The
stylesheet example of Style the element switches the glyphs of a semester
header through
icon-andtx- academicbase- action- expand icon-, and hidestx- academicbase- action- collapse .iconin the header on a wide viewport. A site stylesheet or an override that still usesicon-oracademic- study- plan- plus icon-shows both glyphs, or neither.academic- study- plan- minus - A replacement of a control is no longer limited to the study plan. Its identifier belongs to academic_base, so a site package that replaces it changes the glyph in every academic extension that renders it.
Affected Installations
Every installation whose site package replaces one of the icons, names one of
the previous identifiers in TCA or page TSconfig, overrides one of the two
partials, or styles the generated
icon-*
classes. Installations that use
the extension as shipped need no change.
Migration
- Replace the previous identifiers with the 3.0 identifiers from the table above, in TCA overrides, page TSconfig and overridden templates.
- To draw the content element or a record icon differently, register its
3.0 identifier in the
Configuration/Icons.phpof the site package. -
To draw a control differently, register its 3.0 identifier in the
Configuration/of the site package, not in itsFrontend Icons. php Configuration/Icons.php. The file has the format ofIcons.. The site package has to depend on academic_base, which registers the control icons, so its entry is read after the shipped one:php EXT:mysitepackage/Configuration/FrontendIcons.php<?php use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider; return [ 'tx-academicbase-action-close' => [ 'provider' => SvgIconProvider::class, 'source' => 'EXT:mysitepackage/Resources/Public/Icons/close.svg', ], ];Copied! - In an override of
Semester.orhtml Module, render the controls withDialog. html <ab:instead oficon <core:, keep every argument, and declare the namespace in theicon <html>tag of the partial:xmlns:. An override ofab="http:// typo3. org/ ns/ FGTCLB/ Academic Base/ View Helpers" Semester.keeps renderinghtml tx-andacademicbase- action- expand tx-when the site stylesheet selects their classes, as the example of the manual does, see The glyphs of a semester header.academicbase- action- collapse - Replace
.icon-<2.selectors withx identifier> .icon-<3..0 identifier> - Flush the TYPO3 caches, so the icon registries and the Fluid template cache are rebuilt.