Breaking: Renamed icons and a frontend icon registry
See also
Upgrading from 2.4 to 3.0 is the order in which the 3.0 changes have to be applied.
Description
Every icon of this extension is replaced by a Font Awesome Free solid icon,
drawn in current and registered with
\FGTCLB\,
which inlines the file, so the icon takes the text colour of the backend or of
the page (ACE-585). The identifiers follow the scheme the academic extensions
share, tx-<extension key without underscores>-<group>-<name>. The old
identifiers are removed, there are no aliases.
Which registry an icon is in depends on where it is shown:
- Backend icons stay in
Configuration/Icons.php, the icon registry of the TYPO3 backend. The nine record icons becometx-, five of them drawn by a shared file of academic_base. The content element icons becomeacademicpersons- record-* tx-, in the TCA and in the new content element wizard alike. The plugin iconacademicpersons- plugin-* persons_was a brand mark in fixed colours with the core provider, its successors follow the text colour like every other icon. All six content elements showedicon persons_. The list, the list and detail and the detail element now showicon tx-, the profile cardacademicpersons- plugin- persons tx-, and the selected profiles and the selected contracts element shareacademicpersons- plugin- card tx-, in the page module and in the wizard alike. Up to 2.3, the profile card and the two selected elements showed the core iconacademicpersons- plugin- selected- profiles actions-in the wizard and theuser tt_default in the page module.content - Frontend icons are in
Configuration/, the frontend icon registry of academic_base, and are rendered with itsFrontend Icons. php ab:ViewHelper. The seven icons of the public profile detail view, the email, phone, address, room and office hours icons of the contact block and the expand and collapse icons of the fold-out entries, are the sharedicon tx-icons of academic_base now. This extension registers no frontend icon of its own any more, itsacademicbase-* Configuration/is removed. The partialsFrontend Icons. php Partials/andProfile/ Public Profile/ Contact. html Partials/render them withProfile/ Public Profile/ Profile Entries. html ab:, with the arguments they had.icon
During the 3.0 development the seven icons of the public profile had
identifiers of this extension, academic-, first in
Configuration/Icons.php with core:, then in
Configuration/. No 2.x release shipped them.
| 2.x identifier | 3.0 identifier | Registry |
|---|---|---|
tx_ | tx- | Icons. |
tx_ | tx- | Icons. |
tx_ | tx- | Icons. |
tx_ | tx- | Icons. |
tx_ | tx- | Icons. |
tx_ | tx- | Icons. |
tx_ | tx- | Icons. |
tx_ | tx- | Icons. |
tx_ | tx- | Icons. |
persons_ | tx- for the content elements
academicpersons_, academicpersons_ and
academicpersons_, tx-
for academicpersons_, and
tx- for
academicpersons_ and
academicpersons_ | Icons. |
academic- (3.0 development only) | tx- | Frontend of academic_base |
academic- (3.0 development only) | tx- | Frontend of academic_base |
academic- (3.0 development only) | tx- | Frontend of academic_base |
academic- (3.0 development only) | tx- | Frontend of academic_base |
academic- (3.0 development only) | tx- | Frontend of academic_base |
academic- (3.0 development only) | tx- | Frontend of academic_base |
academic- (3.0 development only) | tx- | Frontend of academic_base |
The files below Resources/ are replaced as well. The nine
tx_ and persons_ are
deleted, and so are the Bootstrap Icons files of the 3.0 development,
address., clock., detail-,
detail-, envelope., phone.,
room., and their LICENSE-. The files
this extension ships now are below record/ and plugin/, listed
with their origin and licence (CC BY 4.0) in
Resources/.
Extension. is unchanged.
Impact
An old identifier is no error anywhere. The icon API of the backend and the
ab: ViewHelper both answer it with the default-
placeholder, so the page renders and the icon is wrong.
- A template, TSconfig entry, TCA override or PHP call that names an old identifier shows the placeholder.
- A site package that replaced an icon of this extension under its old
identifier, in its
Configuration/Icons.phpor itsConfiguration/, sees the shipped drawing again.Frontend Icons. php - An override of
Contact.orhtml Profilethat renders one of the seven icons withEntries. html core:shows the placeholder, because the icon registry of the backend does not know the shared frontend icons.icon - CSS that selects on the class TYPO3 renders for an icon, such as
.icon-oracademic- persons- envelope .icon-, matches nothing.tx_ academicpersons_ domain_ model_ profile - A reference to one of the deleted files, such as
EXT:, points at nothing.academic_ persons/ Resources/ Public/ Icons/ persons_ icon. svg - The Font Awesome drawings leave more room inside their square than the files they replace, so an icon sized for the old drawing looks smaller.
The rendered wrapper of a frontend icon keeps its shape: the classes
icon, icon-, icon- and
icon-<identifier>, the attributes data- and
aria-, and the inner icon- with the inlined
<svg>
. Only the identifier in it changes. Records are not affected, an
icon identifier is not stored in the database.
Affected Installations
Installations that name one of the old identifiers or files in their own
templates, TSconfig, TCA, PHP, Configuration/Icons.php,
Configuration/ or CSS, or that override
Contact. or Profile. The shipped templates, TCA
and TSconfig are migrated.
Migration
- Search the site package for
persons_, foricon academic-in icon identifiers and CSS classes, for the table names above where they are used as an icon identifier (persons- icon,Identifier typeicon_,classes identifier=,.icon-) and for the deleted file names, and replace each with its 3.0 identifier from the table.persons_has three successors: take the one of the content element it is named for, and register a replacement oficon persons_under all three.icon - Move a replacement of a backend icon to the new identifier in the
Configuration/Icons.phpof the site package. The site package has to depend on academic_persons, so its entry is read after the shipped one. -
Move a replacement of a public profile icon to the shared identifier in the
Configuration/of the site package, never to itsFrontend Icons. php Configuration/Icons.php, which the frontend does not read. The file has the format ofIcons., and the site package has to depend on academic_base, so its entry is read after the shipped one:php EXT:mysitepackage/Configuration/FrontendIcons.php<?php use FGTCLB\AcademicBase\Imaging\IconProvider\CurrentColorSvgIconProvider; return [ 'tx-academicbase-info-email' => [ 'provider' => CurrentColorSvgIconProvider::class, 'source' => 'EXT:mysitepackage/Resources/Public/Icons/email.svg', ], ];Copied!A replacement of a shared identifier applies wherever an academic extension renders it, the expand and collapse icons also in the study plan of academic_study_plan. To replace an icon on the public profile only, override the partial and render an identifier of the site package.
- In an override of
Contact.orhtml Profile, render the seven icons withEntries. html <ab:and their new identifiers, keep every argument, and declare the namespace in theicon <html>tag of the partial:xmlns:. An icon of the project in the same partial either stays onab="http:// typo3. org/ ns/ FGTCLB/ Academic Base/ View Helpers" core:or is registered in theicon Configuration/of the site package and rendered withFrontend Icons. php ab:too.icon - Adapt CSS that selects on
.icon-<old identifier>to.icon-<new identifier>, and CSS that addressed an<img>of a record or content element icon to the inlined<svg>. - Flush the TYPO3 caches, so the icon registries and the Fluid template cache are rebuilt.