nuvoleweb / ui_patterns

[NOTE] Development has moved to https://drupal.org/project/ui_patterns
https://drupal.org/project/ui_patterns
GNU General Public License v2.0
85 stars 56 forks source link

Support AJAX Views / Fix live preview detection #269

Open drclaw opened 5 years ago

drclaw commented 5 years ago

A while back there was an issue to fix the live preview detection #156 which was reported as fixed in #185 . However that fix only fixes views that are embedded with views_embed_view and the issue of rows not rendering correctly persists for ajax enabled views (as reported in #239 ).

I believe that when views is rendering a view on the views UI config page, a special "live_preview" property is set. We should be checking for that instead of just $view->preview. This should fix it for both AJAX views and embedded views I believe rendering the need for the $view->element['#embed'] check redundant.

Additionally, I'm curious why we don't just let the pattern render in the views live preview? I know most people use an admin theme so the styles won't be loaded, but the pattern template still loads so at least you can preview that your pattern markup and field mappings are working as expected.

mika2na commented 1 year ago

Moved to drupal.org : https://www.drupal.org/project/ui_patterns/issues/3315661