Meta issue: #1843738: [meta] Convert views module to Twig
#1987510: [meta] Convert all core *.tpl.php templates to Twig as singular patch
Manual testing steps:
Testing unformatted lists with no grouping:
- Create some nodes
- Visit the front page - the default front page view is an unformatted list so compare this markup
Testing unformatted lists with grouping:
- Create some nodes
- Edit the default front page View
- Click "settings" for unformatted list and force fields on
- Add content titles as a field for this view
- Click "settings" for unformatted list again and select title as a field to group by
- Visit the front page - the default front page view should now be an unformatted list grouped by node titles
| Comment | File | Size | Author |
|---|---|---|---|
| #29 | 1843770-29-twig-views-view-unformatted.patch | 3.17 KB | joelpittet |
| #29 | interdiff.txt | 1.6 KB | joelpittet |
| #26 | 1843770-26-twig-views-view-unformatted.patch | 3.17 KB | izus |
| #26 | interdiff.txt | 685 bytes | izus |
| #20 | 1843770-20-twig-views-view-unformatted.patch | 3.18 KB | izus |
Comments
Comment #1
joelpittetneed a better way to deal with
hopefully someone can point me to a way to get it like this:
Comment #2
mbrett5062 commentedTagging.
Comment #3
joelpittetMoving to core queue
Comment #4
joelpittetPreprocess needs a rewrite possibly but maybe a new issue for that, this is a straight conversion.
The preprocess docblock needs some love too I bet but lets see if this passes go.
Comment #5
star-szrRe-titling.
Comment #6
star-szrTagging.
Comment #7
joelpittetComment #8
joelpittettagging
Comment #9
joelpittetuntagging, just needs manual testing and code review.
Comment #10
joelpittetReplaced
{{ row_classes[id] }}with{{ row.attributes }}Leaving
$vars$variablesbecause it doesn't obscure the patch much more than it would already be.Added preprocess docblock from #1913208: [policy] Standardize template preprocess function documentation.
Comment #12
joelpittetThe above test failed due to views-view-list not having $row_classes.
I have sent in a VDC patch I hope to get in #1968398: Convert Views $row_classes to $row['attributes']
Comment #13
joelpittetWell I'm not waiting for that conversion to get in. Here is the straight conversion up for review. We can re-roll this if that get's in.
Comment #14
joelpittetDid you forget an attachment joel? Why yes..., yes I did!
Comment #15
dawehnerThanks for making it as simple as possible. Can't spot something fundamental, so all what's left is manual testing.
Comment #16
thedavidmeister commentedtesting
Comment #17
thedavidmeister commentedView without groups (default front page).
Before:
After:
Inspecting the diff between these two looks good so far :)
Comment #18
thedavidmeister commentedWith grouping of rows on the node title (modified front page):
Before:
After:
I've inspected the diff and everything looks good here.
That should be it for manual testing. I'll update the issue summary with steps to replicate what I've done.
Comment #18.0
thedavidmeister commentedadded manual testing steps
Comment #19
star-szrNice work on this @joelpittet, and thank you @thedavidmeister for the thorough manual testing!
Found some tiny documentation tweaks and I think we should roll back the vars -> variables change for now and leave it for #1963942: Change all instances of $vars to $variables - at a glance it looks like we could leave the 'body' of the preprocess function untouched if we revert that.
Rolling back the vars -> variables change and making the below tweaks (posting a new patch and interdiff) would be a good novice task, tagging. After this I'd say it's back to RTBC :)
'Available variables:' per http://drupal.org/node/1823416#docblock.
Should start with 'Default theme implementation…' per http://drupal.org/node/1823416#docblock. Maybe something different along the lines of 'Default theme implementation to display a View of unformatted rows.'? (the whole line needs to fit in 80 characters per http://drupal.org/node/1354#file)
capitalize ID.
@ingroup themeable (add e)
Do we have this documented in another Views patch that we can copy + paste? :) [check other issues in #1843738: [meta] Convert views module to Twig]
Might as well add a period here per http://drupal.org/node/1354#drupal.
Comment #20
izus commentedHi,
taking into account the feedback in #19.
Thanks
Comment #21
izus commentedstatus
Comment #22
thedavidmeister commentedComment #23
star-szrChanges look great, thanks @izus :)
Comment #24
star-szrUnfortunately we'll need to change the @param to say '@param array $vars' for now.
Comment #25
thedavidmeister commentedComment #26
izus commentedHi,
fixed #24.
Thanks
Comment #27
joelpittetThanks @izus back to RTBC
Comment #27.0
joelpittetUpdated issue summary.
Comment #28
star-szrTagging for profiling.
Comment #29
joelpittetdoc updates V to v.
Comment #30
joelpittetre-tagging
Comment #31
jerdavisComment #32
jerdavisScenario
* Ensured front page view was using unformatted list
* Added 50 nodes with devel generate
* Placed a block with a full node on front page
* Ran scenario multiple times, most common result below
Comment #33
alexpott+1. Ready for #1987510: [meta] Convert all core *.tpl.php templates to Twig as singular patch
Comment #34
jerdavisUploaded results
Comment #35
alexpottCommitted 6880348 and pushed to 8.x. Thanks!
Comment #36.0
(not verified) commentedUpdated issue summary.