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.
Follow-up to #2349775: Remove classes from Views templates
I'm adding this issue to just copy the Views templates from the module directory to Classy. There are lots of classes scattered about Views, so it is unclear how long it may take to clean them out of core. With the aim of getting Classy shippable, lets copy the templates as a first step. This is similar to how we treated System.
This issue copies all views templates other than the field templates because they are currently output as theme functions by default.
The original issue, 2349775, we can still use to do the removal of classes.
Beta phase evaluation
Issue category | Task |
---|---|
Issue priority | Not critical because nothing is broken. |
Unfrozen changes | Unfrozen because it only changes markup/theme. |
Prioritized changes | The main goal of this issue is to improve the themer experience.. |
Disruption | This should not be disruptive. |
Comment | File | Size | Author |
---|---|---|---|
#16 | copy_views_templates_to-2424533-16.patch | 20.74 KB | davidhernandez |
#13 | copy_views_templates_to-2424533-13.patch | 4.37 KB | davidhernandez |
#9 | views.diff | 23.69 KB | mortendk |
copyviews-toclassy.patch | 5.21 KB | davidhernandez | |
Comments
Comment #1
davidhernandezComment #2
mortendk CreditAttribution: mortendk commentedyes lets use same approach as we did with system - copy over all the templates, so we can begin the work on the css & classes
while we clean up core's templates at the same time ... if the test is green offcourse
Comment #4
mortendk CreditAttribution: mortendk commentedwhich its not huh?
Comment #5
davidhernandezThis is weird. On things like UserSwitchTest, the markup is coming out escaped.
Comment #6
davidhernandezThis seems to be related to the Views theme function conversions which have not all been completed yet.
Comment #9
mortendk CreditAttribution: mortendk commentedComment #11
davidhernandezInteresting; fewer fails than last time, but I think this still isn't going to work until #2348747: Convert theme_views_view_fields() to 100% Twig: remove the theme function gets in.
Comment #12
mortendk CreditAttribution: mortendk commentedhe he yeah probably - but im still gonna see if we can get em all fixed ;)
no guts no glory!
Comment #13
davidhernandezChecking to see if this works without the -field and -fields template.
If we can get green patch while leaving out the field templates, we should proceed without them. Core currently uses theme functions for fields and not the actual templates, for performance reasons. There are issues to work on it, but it may not be possible to make those conversions before release. In light of that, proceeding without the field templates doesn't hurt much. They do not contain CSS classes, so we do not need Stark vs. Classy version of them anyway.
Comment #14
mortendk CreditAttribution: mortendk commented+1 on this im to tired right now to review anything though ;)
Comment #15
star-szr+1 to this patch/approach for the stated reasons. However, the "Default theme implementation" lines need to be replaced, see #2452363: Classy's @file docblocks shouldn't say "Default theme implementation…".
You can just replace "Default theme implementation" with "Theme override" throughout.
Comment #16
davidhernandezI change the opening description to say "Theme override". I also removed the @ingroup which shouldn't be there either.
Comment #17
star-szrYes, thanks @davidhernandez I forgot about that pesky thing!
Updating the issue summary to explain why we are skipping the field templates.
Comment #18
alexpottThis is only moving front end templates. Committed f2ed4ce and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.