Breaking: Icons are renamed and follow the colour scheme
Description
The record icons of this extension were registered with the core provider
\TYPO3\, which renders
the default markup - the markup a
typeicon_ entry reaches - as an
<img>
tag. An image is opaque to CSS, so the icon kept the ink of its
file whatever the backend colour scheme said, and a dark drawing stayed dark on
the dark cards of the record list.
They are now registered with
\FGTCLB\,
which inlines the file in both markups, and the files themselves are drawn in
current with no colour of their own.
Every icon of this extension is now a Font Awesome Free solid drawing, and every icon identifier of this
extension follows the scheme
tx-<extension key without underscores>-<group>-<name>. The group decides the
registry: doktype, plugin and record icons are shown by the
backend and live in Configuration/Icons.php only. The identifiers of
2.x are removed without an alias:
| 2.x identifier | 3.0 identifier | Registry | Shown for |
|---|---|---|---|
academic- |
tx- | Configuration/ | the academic partner page type, and the partner pages offered in the partner select of a partnership |
academic- |
tx- | Configuration/ | the Partner List content element and its entry in the new content element wizard |
academic- |
tx- | Configuration/ | the Partner Map content element and its entry in the new content element wizard |
academic- |
tx- | Configuration/ | the Partners Linked content element and its entry in the new content element wizard |
academic- |
tx- | Configuration/ | the Partner Logo Teaser content element and its entry in the new content element wizard |
tx_ |
tx- | Configuration/ | partnership records |
tx_ |
tx- | Configuration/ | role records |
The page type and the Partners Linked content element share one
drawing, Resources/, but no longer one
identifier, so a site can replace either one alone. The other three content
elements are drawn from plugin/, plugin/ and
plugin/. The two record icons are
drawn from the shared files info/ and
info/ of academic_base. The partner select of a
partnership showed the partnership icon for every partner page it offers, it
now shows the page type icon of the page.
The four category type icons and the group icon keep their identifiers,
category_ and
category_,
which category_types registers in the icon registry of the backend
and in the frontend icon registry of academic_base. Their files
moved:
| Identifier | 2.x file | 3.0 file |
|---|---|---|
category_ | Category | category- |
category_ | Category | category- |
category_ | Category | EXT: |
category_ | Category | category- |
category_ | Category (3.0 development only) | plugin/ |
Paths without an extension prefix are below
EXT:. The files
Partnership., Role. and the folders
Category and Category are removed.
Extension. stays the extension icon and is no longer registered as
an icon. The four category types and the group ask for the inlining provider
with inline in Configuration/. Without
that flag a category type icon keeps the core provider.
Impact
The four category type icons reach the frontend, through the icon
ViewHelper of academic_base,
<ab:, in
Partials/,
Partials/ and
Partials/, and through
category_ in Partials/.
category_types registers them in the frontend icon registry as
well, with the same provider, see
Important: Category type icons come from the frontend icon registry.
None of those calls asks for the inline markup, so their rendered markup
changes: an
<img>
of a fixed pixel size becomes an inlined
<svg>
with
width="1em" height="1em"
, which follows the font size
and the colour of the text around it. Every frontend icon of this extension
renders inline in current, and every site using the partner or
partnership plugins sees those icons resize, recolour and change their drawing.
Site CSS or JavaScript that sized, coloured or addressed the
<img>
has
to address the
<svg>
instead.
In the backend, the academic partner page type icon, the content element icons, the two record icons and the four category type icons take the text colour around them, so they stay legible in a dark backend colour scheme, and all of them show their new drawing.
A site package that registered one of the 2.x identifiers in its own
Configuration/Icons.php to replace the shipped drawing replaces
nothing any more: the backend shows the new shipped icon. Backend code, TCA or
page TSconfig of a site that names a 2.x identifier, for example a
icon of a wizard entry, shows TYPO3's not-found icon.
A site package that pointed at one of the removed files, in its own icon
registration or in a Category that declares a type or the
group again, shows no icon.
Affected Installations
Every installation of this extension. Installations that render the partner or partnership plugins in the frontend are affected visibly. Installations whose site package replaces an icon of this extension, names one of its 2.x identifiers or points at one of its removed files have to migrate.
Migration
Replace an image selector with an element selector in the site CSS, for example
/* before */
.partner-attributes .icon img { width: 32px; }
/* after */
.partner-attributes .icon svg { width: 1.25em; }
The icon element keeps the surrounding
<span class="t3js- wrapper, so a
selector written against the wrapper of a category type icon needs no change.
A selector written against the identifier of a page type, content element or
record icon names the 3.0 identifier from the table above.
Replace every 2.x identifier the site names, in TCA, page TSconfig, templates
or code, with its 3.0 identifier. The 2.x
academic- became five
identifiers, pick the one of the page type or of the content element it is
shown for.
A site package that replaces a page type, content element or record icon
registers the 3.0 identifier in its own Configuration/Icons.php, for
the backend:
use FGTCLB\AcademicBase\Imaging\IconProvider\CurrentColorSvgIconProvider;
return [
'tx-academicpartners-plugin-partners' => [
'provider' => CurrentColorSvgIconProvider::class,
'source' => 'EXT:my_site/Resources/Public/Icons/Partners.svg',
],
];
A site package that replaces a category type icon keeps the identifier: it
declares the type again in its Configuration/ with
its own
icon
, for both registries, or registers the identifier in its
own Configuration/, for the frontend only, see
Important: Category type icons come from the frontend icon registry.
A file path of this extension it names has to be the 3.0 path from the table
above.