Task

Convert the following theme functions to use the new table #type:

Module Theme function name Where in Code What is it really?
filter theme_filter_admin_format_filter_order function form table draggable
filter theme_filter_admin_overview function form table draggable

theme_filter_admin_overview() was already converted as part of #80855: Add element #type table and merge tableselect/tabledrag into it.

Related issues

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joelpittet’s picture

Assigned: Unassigned » joelpittet
Status: Active » Needs review
FileSize
3.67 KB

Someone already did theme_filter_admin_overview as it was committed. Here is the other one.

Status: Needs review » Needs work

The last submitted patch, filter-type-table-1938904-1.patch, failed testing.

joelpittet’s picture

Assigned: joelpittet » Unassigned
Status: Needs work » Needs review
FileSize
3.37 KB
2.02 KB

Hmm not sure what I am doing wrong but this fixed a few things. Seems my table's row weights aren't loading in the right order. After many different ways of doing the same thing I am giving up. Any pointers would be great.

Status: Needs review » Needs work

The last submitted patch, filter-type-table-1938904-1.patch, failed testing.

duellj’s picture

Status: Needs work » Needs review
FileSize
1.03 KB
3.63 KB

Fixed failing tests from #3. Filters weren't being sorted after the theme function was removed, since element_children() was never called. Also, filter_admin_format_form_submit() was expecting filters values to be an array, so a #tree needed to be added.

joelpittet’s picture

Thanks a bunch @duellj !!! That was totally the ticket and I learned something. That #tree bit didn't seem to have any affect so this little patch just removes it. The tree comes down from the parent so that should be fine.

jibran’s picture

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

Code looks good. conversion is fine. RTBC for me.
Before

before.png
After

after.png

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Update summary to indicate theme_filter_admin_overview was already converted.