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.
Task
Convert the following theme functions to use the new table #type:
Module | Theme function name | Where in Code | What is it really? |
---|---|---|---|
taxonomy | theme_taxonomy_overview_terms | function (unusable) | form table w/ operations, pager |
taxonomy | theme_taxonomy_overview_vocabularies | function (unusable) | form table w/ weight, operations |
Related issues
Comment | File | Size | Author |
---|---|---|---|
#17 | taxonomy-1938932-12.patch | 26.27 KB | andypost |
#17 | taxonomy-1938932-14-broken_withtest.txt | 2.38 KB | andypost |
#16 | taxonomy-1938932-14-broken.patch | 27.26 KB | andypost |
#14 | interdiff.txt | 1.19 KB | andypost |
#14 | taxonomy-1938932-12.patch | 26.27 KB | andypost |
Comments
Comment #1
duellj CreditAttribution: duellj commentedFirst pass at converting taxonomy theme tables to table #type.
Comment #3
duellj CreditAttribution: duellj commented- Fixed failing tests with forum module
- Renamed generic 'table' form elements in vocab/term forms to 'vocabulary' and 'terms'
Comment #4
andypostNice cleanup!
Vocabularies should be replaced with own controller #1891690: Use EntityListController for vocabularies but the issue waiting for #1855402: Add generic weighting (tabledrag) support for config entities (DraggableListController)
Comment #5
alexpott165 insertions, 217 deletions... I like the look of this
Assigning to @xjm as taxonomy module maintainer for a review...
Sorry got a really minor minor nit...
Space at end of line...
Comment #6
alexpott#3: 1938912-3-language-tables.patch queued for re-testing.
Comment #7
duellj CreditAttribution: duellj commentedThanks for the review alexpott. Updated patch to remove space mentioned in #5
Comment #8
andypostNeeds @xjm confirm for commit :)
Comment #9
andypost#7: 1938932-7-taxonomy-table.patch queued for re-testing.
Comment #11
andypostTalked to @xjm in IRC and she have no idea why this one assigned.
This one about conversion #theme functions and does not touch taxonomy
But there's another task waiting that patch #1891690: Use EntityListController for vocabularies
I think better to commit this one and finish taxonomy CMI conversion
Comment #12
tim.plunkettI went to review this, but it needed to be rerolled. xjm indicated that she doesn't have time soon to review this, unassigning.
Comment #13
xjmActually it's more that I have maybe one-tenth of one clue about the render/theme layer. ;) All I'd do is test the patch manually, so if someone else can do that, this is a go.
Comment #14
andypost@timlunket thanx a lot for re-roll.
Proper merge
Comment #15
tim.plunkettWell, if my patch passed and was wrong like that, we're missing test coverage.
Comment #16
andypostRe-title to point a scope
@tim.plunkett There's 3 reasons to not write tests here
1) This code should be dropped in favour of list controllers #1891690: Use EntityListController for vocabularies & a bunch of forum issues
2) Scope of this issue to drop useless theme functions and convert the render
3) Making test that some link have no query string leads to disability to extend it
I can't RTBC it as my patch last but let's get this in and unfreeze conversion of taxonomy and forum
Comment #17
andypostForget to attach interdiff -
taxonomy-1938932-14-broken_withtest.txt
WebTestBase::assertLinkByHref() makes check as contains to no ability and reason to check query-string
taxonomy-1938932-12.patch
actually to commitComment #18
star-szr#type table itself does not have tests yet either - see #1948374-8: #type 'table' allow attributes on table cells.
Comment #19
steveoliver CreditAttribution: steveoliver commentedNotwithstanding that we do need expanded table rendering tests based on Drupal\system\Tests\Theme\TableTest to include the #type table consolidations' support for tableselect/tabledrag, this patch is implementing existing #type table functionality (just like #1938904: Convert filter theme tables to table #type), so I have created #1975152: Expand render test coverage for #type table and consider #17 RTBC.
Comment #20
webchickThis is great clean-up!
Committed and pushed to 8.x. Thanks!
Comment #21
webchickBtw, I don't like committing this without test coverage, but there's a precedent for doing so with the column stuff.
Therefore, I escalated #1975152: Expand render test coverage for #type table to major.