Deprecation: The study plan class selectors
Description
The script of the study plan content element used to find every part it drives
by class name. It finds them by
data- attribute now, and
reads the class selector of a part only when the attribute of that part is
nowhere in that plan:
| Attribute | Class selector of 2.x, deprecated |
|---|---|
data- |
.academic- |
data- |
.filter
|
data- | The first
<li>
inside the filter list |
data- |
.col
|
data- |
.header
|
data- |
.module
|
data- |
.modal- |
data- | The
<dialog>
inside a module |
The fallback is per part, so markup that carries the attributes on some parts and the classes on others works as well.
The container is the one exception:
.academic- is read next
to
data-, not instead of it. Two plans of one page can come
from different templates, and one whose template lacks the attribute must not
disappear because the other one carries it. It is deprecated on the same terms.
Impact
Nothing is logged and nothing changes for a visitor. The fallback is removed in version 4.0. From then on markup without the attributes has no interaction at all: no filter, no accordion, no dialogs.
Affected Installations
Only an installation that overrides the template or a partial of the study plan with markup of its own. The shipped markup carries the attributes.
Migration
Add the attributes to your markup, on the elements Templates names. The classes may stay where a site stylesheet selects them. The script does not read them once the attributes are there.
An override that only renamed a few elements is often better replaced by an override of the one partial it is really about. The other three then keep coming from the extension, with everything they gain.