I've turned off all the preview settings I can find in Panels Magic and cleared the cache, but I can't get rid of the preview boxes. What am I missing?
I find it hard to use the Panels admin with such big previews because you end up scrolling a lot. I'd just like to get the normal Panels interface for adding content.
Panels Magic settings

Panels Add Content interface

Proposed resolution
Change the options for "Enable previews when adding panes" to: Automatic, Manual, Disabled (just like the "Live Preview" option).
Here's how they map to the old options:
- Automatic = Enabled
- Manual = Disabled
- Disabled = (new feature!) Completely disable our preview functionality, and return the dialog to the Panels default
I'm not sure the best way to add/remove the functionality in panopoly-modal.css. Maybe we could make the bits we want to turn on/off dependent on a class and then use a hook_preprocess_X() function to add/remove this class from the dialog or page body?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | panopoly_magic-disable-add-previews-2171809-3.patch | 2.43 KB | mpotter |
| panels-add-content-previews.png | 37.17 KB | ergophobe | |
| pano-magic-settings.png | 23.58 KB | ergophobe |
Comments
Comment #1
mglamanThe previews are turned off. However this is part of panopoly-modal.css - "#modal-content .widget-preview .fieldset-wrapper" sets height and width. Unsetting this widget would break the ability to click "preview".
The per-case fix would be to use hook_css_alter() and unset panopoly-modal.css.
Comment #2
dsnopekI think we should make this into a "Feature request" with the proposed resolution of changing the options for "Enable previews when adding panes" to: Automatic, Manual, Disabled (just like the "Live Preview" option).
There are a number of child distributions that aren't crazy about this way this works in Panopoly, for example, Open Atrium and WETKit.
I'd say this is related to #2155377: Only show one widget preview at a time when adding content in panels
Comment #3
mpotter commentedIt wasn't actually difficult to do this. Just returning from panopoly_magic_process_panels_add_content_modal() prevents the previews from showing. Also refactored the options into define() constants. Here is the patch
Comment #5
dsnopekLooks great! Did manual testing and committed.
Here is where the automated test results from Travis-CI will appear:
https://travis-ci.org/panopoly/panopoly/builds/40244105
I don't expect any failures there, but just in case. :-)
Comment #6
ergophobe commentedThanks everyone. Perfect timing - after being away from the project in question for quite a while, I picked it back up today!