Closed (fixed)
Project:
Panopoly
Version:
7.x-1.x-dev
Component:
Magic
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 May 2015 at 20:39 UTC
Updated:
1 Jul 2015 at 17:54 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
dsnopekComment #2
gusaus commentedI was going to post an issue, but it looks like #2155377: Only show one widget preview at a time when adding content in panels might be the related to why previews on this radix subtheme now look like this?
http://monosnap.com/image/X7BPU3lm0mdrTaVKyUOGivpF6INlPe
Comment #3
dsnopekYes. Until Radix is updated (ideally with this issue fixed!) you should use the old "Automatic" preview mode with Radix-based themes.
Comment #4
dsnopekHere's a quick attempt at this! It tries to keep the markup exactly the same, although I think we should try to re-evaluate it, especially some of the class names.
Linking to #2467073: Preview fieldset overflows in Firefox if using a very large image which is about switching the preview away from using
<fieldset>altogether! That'll be much easier to implement once this one is done.EDIT: Here is a build on Travis-CI: https://travis-ci.org/panopoly/panopoly/builds/65994673
Comment #5
dsnopekThe tests on Travis-CI pass!
I added a screenshot and a TODO list to the issue summary. Namely, we need to make sure this will work with Radix and add tests for any of the code we are changing which doesn't already have tests.
And I created a campanion issue in the Radix queue for using the changes on this issue once they're done:
#2502939: Incompatible with Panopoly's "Single" preview mode on the "Add content" modal
Comment #6
lsolesen commentedComment #7
dsnopekHere's a new version of this patch which changes some of the class names used in the markup to be more specific to panopoly_magic. This requires some small changes to the tests. Anyway, this crosses TODO #1 off the list.
Also, I was able to show in #2502939: Incompatible with Panopoly's "Single" preview mode on the "Add content" modal that this will work for Radix, so I'm also crossing off TODO #2!
All that remains is adding some test coverage for some things this patch affects which weren't previously tested.
EDIT: Here's a Travis build for the latest patches: https://travis-ci.org/panopoly/panopoly/builds/67040765
Comment #8
dsnopekHrm. Another thing just occurred to me: should we be using the 'class_array' and 'classes' variables in the template, rather than setting 'class' on 'attributes'? I think that makes sense to be consistent with the rest of Drupal.
Also we should probably use classes/attributes on the 'panopoly_magic_preview_link' theme function as well.
Marking as "Needs work"!
Comment #9
dsnopekOk, here's another set of patches that represents an even bigger refactor in markup and class names. In testing with Radix, I discovered that it's unfortunately necessary to keep the old class names around so we don't break anything. A new version of Radix could, of course, fix this, but our releases aren't synchronized and if it's a problem in Radix, it's probably a problem in other themes too!
Also, I made use of the 'classes_array' variable like I mentioned in #8.
So, now for real, all we need to do is add the missing test coverage. :-)
EDIT: Here is a Travis build of the latest patches: https://travis-ci.org/panopoly/panopoly/builds/67058477
Comment #10
dsnopekBoth the Travis builds from #9 and #7 have passed!
Comment #11
dsnopekHere is a new patch for panopoly_test which adds tests for live preview in the style plugin! This crosses off TODO #3.
I manually tested that this works with stylizer, but I think I'm going to defer TODO #4 to a new issue: #2507609: Write tests for live preview of custom Stylizer styles
We're not currently setup to test stylizer (we'd need to enable it when setting up for the tests) and it's not that commonly used. I don't want to hold up something we need to support Radix, which is very commonly used, in order to provide tests for something that's rarely used.
If this passes the automated tests on Travis-CI, I'll commit it! But any manual testing/review is very welcome. :-)
EDIT: Here's the Travis build: https://travis-ci.org/panopoly/panopoly/builds/67215147
Comment #12
dsnopekTests passed! I'm going to commit this so that we're sure the next release will allow us to fix this in Radix. Test still (always!) welcome. :-)