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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

duellj’s picture

Status: Active » Needs review
FileSize
19.01 KB

First pass at converting taxonomy theme tables to table #type.

Status: Needs review » Needs work

The last submitted patch, 1938932-1-taxonomy-table.patch, failed testing.

duellj’s picture

Status: Needs work » Needs review
FileSize
21.57 KB
25.72 KB

- Fixed failing tests with forum module
- Renamed generic 'table' form elements in vocab/term forms to 'vocabulary' and 'terms'

andypost’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Assigned: duellj » xjm
Status: Reviewed & tested by the community » Needs review

165 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...

+++ b/core/modules/taxonomy/taxonomy.admin.incundefined
@@ -238,56 +213,96 @@ function taxonomy_overview_terms($form, &$form_state, Vocabulary $vocabulary) {
+      // Verify this is a term for the current page and set at the current ¶
+      // depth.

Space at end of line...

alexpott’s picture

#3: 1938912-3-language-tables.patch queued for re-testing.

duellj’s picture

Thanks for the review alexpott. Updated patch to remove space mentioned in #5

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Needs @xjm confirm for commit :)

andypost’s picture

#7: 1938932-7-taxonomy-table.patch queued for re-testing.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 1938932-7-taxonomy-table.patch, failed testing.

andypost’s picture

Assigned: xjm » Unassigned
Status: Needs work » Reviewed & tested by the community

Talked 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

tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
26.07 KB

I went to review this, but it needed to be rerolled. xjm indicated that she doesn't have time soon to review this, unassigning.

xjm’s picture

Issue tags: +Needs manual testing

Actually 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.

andypost’s picture

Issue tags: -Needs manual testing
FileSize
26.27 KB
1.19 KB

@timlunket thanx a lot for re-roll.

Proper merge

tim.plunkett’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Well, if my patch passed and was wrong like that, we're missing test coverage.

andypost’s picture

Title: Convert taxonomy theme tables to table #type » Remove taxonomy_overview_terms() and taxonomy_overview_vocabularies() theme functions in favour of table #type
Status: Needs work » Needs review
Issue tags: -Needs tests
FileSize
27.26 KB

Re-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

andypost’s picture

Forget 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 commit

star-szr’s picture

#type table itself does not have tests yet either - see #1948374-8: #type 'table' allow attributes on table cells.

steveoliver’s picture

Status: Needs review » Reviewed & tested by the community

Notwithstanding 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.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

This is great clean-up!

Committed and pushed to 8.x. Thanks!

webchick’s picture

Btw, 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.