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 magic settings

Panels Add Content interface
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?

Comments

mglaman’s picture

Status: Active » Closed (works as designed)

The 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.

dsnopek’s picture

Component: Documentation » Magic
Category: Support request » Feature request
Issue summary: View changes
Status: Closed (works as designed) » Active
Related issues: +#2155377: Only show one widget preview at a time when adding content in panels

I 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

mpotter’s picture

Status: Active » Needs review
StatusFileSize
new2.43 KB

It 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

  • dsnopek committed 2ed8e9a on 7.x-1.x
    Update Panopoly Magic for #2171809 by mpotter | ergophobe: Added Can't...
dsnopek’s picture

Status: Needs review » Fixed

Looks 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. :-)

ergophobe’s picture

Thanks everyone. Perfect timing - after being away from the project in question for quite a while, I picked it back up today!

Status: Fixed » Closed (fixed)

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