Problem/Motivation
In Drupal 7, thanks to the implementation of l(), an "active" class was automatically added when generating node listing with views, and when the linked entity's URI was the same as the one listed.
With #1979468: ".active" from linkGenerator(), l() and theme_links() forces an upper limit of per-page caching for all content containing links, this is not the case any more and it's been reported to not be not easily alterable.
Proposed resolution
Re add the feature as optional, via means of adding a new checkbox form field to control whether or not the active class on links will be enabled. Adding of the actual CSS class is performed via JS.
Remaining tasks
Write the patchReview itAdd test coverage for the new feature.Write upgrade path to update existing views on sites.Write upgrade path test to verify it works.
User interface changes
New Set the active class on links checkbox on views field options. Description: If checked, if the fields link to the current page, an "is-active" class will be added on active links.
API changes
New set_active_class
boolean on views.row.schema
Data model changes
N/A
Release notes snippet
Views can now optionally add the "active" css class.
Original description
In Drupal 7, thanks to the implementation of l(), an "active" class was automatically added when generating node listing with views, and when the linked entity's URI was the same as the one listed.
With #1979468: ".active" from linkGenerator(), l() and theme_links() forces an upper limit of per-page caching for all content containing links, this is not the case anymore and it seem's not easily alterable (I can't my way through).
Is there a way to change this behaviour. Are we missing something in core to let us alter that ?