Breaking: The job icons are renamed and moved to the frontend icons
Description
Every icon of this extension has a new identifier and a new drawing (ACE-813, ACE-587).
The seventeen icons of the job properties are shown in the frontend only:
- Twelve stand in front of the job properties of the job list and the job detail view.
- Two stand in front of the phone number and the e-mail address of the contact block.
- Three are rendered by no template the extension ships: the start time, the contact name and the additional contact information. They stay registered, so an override that adds one of these properties to the list it shows gets its icon without registering one.
They were registered in Configuration/Icons.php, for the icon registry
of the TYPO3 backend, and the partials rendered them with core:. They
are now registered in Configuration/, for the
frontend icon registry of academic_base, and are no longer
registered in Configuration/Icons.php. The partials
Partials/, Partials/ and
Partials/ render them with the ab: ViewHelper
of academic_base.
Every job property keeps an identifier of its own, so a site still replaces
the icon of one property without touching the others. The identifiers follow
the scheme of all academic extensions,
tx-<extension key without underscores>-<group>-<name>: a property icon is
tx- and the property name in kebab case. The partials no
longer build the identifier from the property name, they map each property
they show to its identifier in the list they loop over.
The drawings are the shared Font Awesome Free glyphs of
academic_base, several properties share one. They were fifteen
files of this extension in three different inks, grey Material Symbols, black
Font Awesome drawings and the red plugin drawing for the job type, rendered as
an image of 16 by 16 pixels that kept the colour of its file. The glyphs are
inlined now and drawn in current: they take the colour of the
surrounding text and are as large as its font.
The content elements and the job record get their own identifiers in
Configuration/Icons.php. Both draw the Font Awesome Free briefcase of
the shared set of academic_base, info/, in
current, so the content element icon follows the backend colour scheme
like the record icon does.
The old identifiers are removed without an alias:
| 2.x identifier | 3.0 identifier | Registry |
|---|---|---|
academic_ |
tx- | Icons. |
| none, the table named its file |
tx- | Icons. |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
academic_ |
tx- | Frontend |
The contact block of 2.x rendered the identifiers
phone
and
mail
instead of its two registered icons, and nothing registers those,
see Important: The job contact block shows its own icons.
The files below Resources/ are removed with them:
Calendar., Company., Contract.,
Email., Industry., Info., Link.,
Location., Person., Phone., Public.,
School., Star., Work., jobs_,
the former job record icon tx_, and
tx_, which nothing referenced any
more. The extension ships no icon file of its own apart from
Extension., which is unchanged. The origin and licence of the
shared files are listed in
Resources/ of
academic_base.
Impact
None of the following shows an error:
- A template, TCA or page TSconfig of a site package that names one of the old identifiers shows the "icon not found" placeholder.
- A site package that replaced one of the property icons in its own
Configuration/Icons.php, or under its old identifier, sees the shipped drawing in the job list and the job detail view. The frontend icon registry does not read that file, and nothing renders the old identifier. - An override of one of the three partials that still renders a property
icon with
core:, or builds the old identifier, shows the "icon not found" placeholder in its place.icon - A reference to one of the removed files fails.
PHP or backend code that asks the
Icon of TYPO3 for one of the
seventeen property icons gets the "icon not found" placeholder as well.
The markup of the property icons changes from an image to an inlined drawing:
before: <span class="t3js-icon icon icon-size-small icon-state-default icon-academic_jobs-workLocation"
data-identifier="academic_jobs-workLocation" aria-hidden="true">
<span class="icon-markup"><img src="…/Icons/Location.svg" width="16" height="16" alt="" /></span>
</span>
after: <span class="t3js-icon icon icon-size-small icon-state-default icon-tx-academicjobs-info-work-location"
data-identifier="tx-academicjobs-info-work-location" aria-hidden="true">
<span class="icon-markup"><svg … width="1em" height="1em" fill="currentColor">…</svg></span>
</span>
A stylesheet that selects the icon wrapper by an old identifier class
(
.icon-) or the icon as an
<img>
matches nothing.
Affected Installations
Every installation whose site package replaces one of the job icons, styles them, overrides one of the three partials, or names one of the old identifiers or files in a template, TCA, page TSconfig or PHP code of its own.
Migration
-
Replace each old identifier by its 3.0 identifier from the table above. Register a replacement of a property icon in the
Configuration/of the site package, the backend icons in itsFrontend Icons. php Configuration/Icons.php. Both files have the same format. The site package has to depend on academic_jobs, so its entry is read after the shipped one:EXT:mysitepackage/Configuration/FrontendIcons.php<?php use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider; return [ 'tx-academicjobs-info-contact-phone' => [ 'provider' => SvgIconProvider::class, 'source' => 'EXT:mysitepackage/Resources/Public/Icons/Phone.svg', ], 'tx-academicjobs-info-company-name' => [ 'provider' => SvgIconProvider::class, 'source' => 'EXT:mysitepackage/Resources/Public/Icons/Company.svg', ], ];Copied!Svgrenders the file as an image of 16 by 16 pixels, as before.Icon Provider \FGTCLB\inlines a file drawn inAcademic Base\ Imaging\ Icon Provider\ Current Color Svg Icon Provider current, like the shipped icons.Color - In an override of
Item.orhtml Information., take over the property list of the shipped partial, which maps every property to the name of its icon, and renderhtml <ab:. In an override oficon identifier="tx- academicjobs- info- {icon Name}"/> Contact., renderhtml tx-andacademicjobs- info- contact- phone tx-. Render the icons withacademicjobs- info- contact- email ab:instead oficon core:, keep every argument, and declare the namespace in theicon <html>tag of the partial:xmlns:.ab="http:// typo3. org/ ns/ FGTCLB/ Academic Base/ View Helpers" - Adapt a stylesheet to the
.icon-classes and to an inlinedtx- academicjobs- info-* <svg>instead of an<img>. - Flush the TYPO3 caches, so the icon registries and the Fluid template cache are rebuilt.