The current problem with the implementation of the preview in d7 ui is that
the view is runned on the initial php loading. This leads to a lot of problems

  • If the sql breaks you might have a problem
  • Performance: you have to execute a query just to edit it isn't that perfect

So that the preview is additional, it needs some kind of seperate page callback to support the non-js use case.

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new2.36 KB

Here is an initial patch which tries to bring this back.

One feature which this drops at the moment is that on the initial loading the preview is done.

dawehner’s picture

Status: Needs review » Needs work

Update status.

dawehner’s picture

StatusFileSize
new2.83 KB

Here is some more work. One problem is that the checkbox is pretty much ignored if you edit some kind of setting.
It always rerenders.

webchick’s picture

Tagging as a release blocker, per dereine.

tim.plunkett’s picture

I'm not sure which checkbox you mean. It seems to behave as I expect it to.

dawehner’s picture

I mean the "[] auto preview" checkbox.

If you change something and the auto preview checkbox is not checked, it shouldn't run the preview, but it does it at the moment.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new2.84 KB

Just remembered that checkboxes are special in javascript :( you can't just use val() but you have to use is(':checked').

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

If the checkbox on admin/structure/views/settings for "Automatically update preview on changes" is checked, the view is still previewed on page load and this change has no effect.
If that checkbox is unchecked, then the patch works as advertised.

I *think* this is the desired effect, and it's what the patch documentation says, so RTBC from me.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the review! Commited to 7.x-3.x

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