Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After #1804614: [meta] Consolidate theme functions and properly use theme suggestions in core lands, this issue should be changed to active.
We would like to eliminate theme_tablesort_indicator
in favor of theme_image
but we should add a theme hook succestion so that the table sort indicator can be easily overridden.
Comments
Comment #1
LewisNyman CreditAttribution: LewisNyman commentedI'd like to expand the scope of this issue to discuss whether we need the table sort indicator to be an inline image. It's clearly presentational.
Comment #2
thedavidmeister CreditAttribution: thedavidmeister commentedalternative potentially being something like remove the img tag completely + add the up/down arrow icon back in with CSS on the table header by doing something in tablesort_header() and add back in an equivalent solution for the title/alt tags explaining the sort behaviour that are currently on the image for accessibility reasons, also in tablesort_header().
Comment #3
jenlamptontagging
Comment #4
joelpittet@LewisNyman and @thedavidmeister one counter reason to that would be CSS images don't like to to load in parallel, AFAIK so it would be a bit slower, and also someone would likely like to replace those images with maybe an icon webfont or svg?
Though if we were to go in the CSS direction I'd hope for maybe spriteing some of these?
Comment #5
joelpittetI'm +1 for getting this in CSS:)
Comment #6
star-szrComment #7
mgiffordWhat is this postponed on? At this stage it should be bumped up to 8.1.0 or addressed shouldn't it?
Comment #8
joelpittetGood question, maybe just that all consolidation was postponed...
Tagging with CSS as I hope for that solution:)
Comment #9
LewisNyman CreditAttribution: LewisNyman commentedComment #10
mitokens CreditAttribution: mitokens as a volunteer commentedComment #11
sqndr CreditAttribution: sqndr as a volunteer commentedI will look into this issue this week.
Comment #12
sqndr CreditAttribution: sqndr as a volunteer commentedThe
theme()
function has already been removed.Comment #13
star-szrI think we still want to remove it even though it's a Twig template now :)
Comment #14
joelpittetOh yes, thanks! Yeah this doesn't need to be a template and even if it was a twig template I'd be tempted to put it in the table.html.twig to avoid the performance hit.
CSS approach would be simpler though.
Comment #15
lokapujyainteresting question: use a template or remove it? wondering what the reason is for removing it.
Comment #16
star-szrBecause it's a tiny template, and CSS is a thing.
Comment #17
joelpittetBumping to D8.1
Comment #18
andypostStable theme has this template so probably this becomes 9.x
Comment #19
catchNo we can stop using the template in core in a minor release, just can't completely remove it.