Problem/Motivation

Panels overrides the Layout icons even if there's an icon map that could be displayed. This is especially annoying in Layout Builder.

Proposed resolution

Check if there's an icon map in panels_layout_alter before setting the no preview icon.

User interface changes

Before:

After:

Comments

bendeguz.csirmaz created an issue. See original summary.

colincalnan’s picture

StatusFileSize
new866 bytes

Nice work https://www.drupal.org/u/bendeguzcsirmaz, however I do believe there's a neater solution to this.

The core LayoutDefinition plugin provides a method called `getIcon` which does the necessary checks for icon maps and icon images/paths and returns correctly.

I simply updated Panels to call this method to retrieve an icon map.

phenaproxima’s picture

StatusFileSize
new891 bytes
new1.72 KB

Here's a test...let's get this committed.

The last submitted patch, 3: 3030976-3-FAIL.patch, failed testing. View results

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

Nice fix! Thanks

  • phenaproxima committed b31489e on 8.x-4.x
    Issue #3030976 by phenaproxima, bendeguz.csirmaz, colincalnan: Panels...
phenaproxima’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x-4.x. Thanks!

Status: Fixed » Closed (fixed)

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