Rather than just the name of the layout, it'd be great to have the layout icon in the IPE as well! This particularly useful for complex layouts with ambiguous names, like from Radix Layouts.

Comments

dsnopek created an issue. See original summary.

swentel’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new5.72 KB
new36.09 KB

Attached patch shows icons now, much better imo. Images have the label of the layout in alt & title tags.
I've had to set the images to a fixed width and height because the images of Display Suite have different dimensions.
The patch also contains an image in case the layout doesn't have preview image, but I'm wondering whether that belongs to layout plugin or not.

This solves the default horizontal scrollbar as well and if you make the screen smaller, the scrollbar pops up, but it doesn't hide the images.

dsnopek’s picture

Screenshot looks great! This made me think of a follow-up:

#2636990: Layouts should be grouped into categories in the IPE

The patch also contains an image in case the layout doesn't have preview image, but I'm wondering whether that belongs to layout plugin or not.

I think this is best here, rather than Layout Plugin. Layout Plugin tries to make as few opinions as possible to ensure compatibility, and providing a fallback image would make an opinion about what these images should look like, their dimensions, etc. Maybe we'll make such an opinion later after seeing how this works in the real world, but I want to avoid premature standardization.

dsnopek’s picture

Issue summary: View changes
StatusFileSize
new31.48 KB

Hm. I tried the patch with Radix Layouts enabled and the "Available layouts" fall to a new row, whereas the screenshot from #2 shows them all on a single row:

It'd also be nice to have a little bit of padding between the icons. In the above screenshot, it's hard to tell where one layout ends and the other begins!

swentel’s picture

yep, I have just enough layouts so both divs (current and other layouts) fit in one row. Working on a patch which uses the technique I use in #2636486: In IPE, the available layouts have scrollbars on them - but even better :)

swentel’s picture

Issue summary: View changes
StatusFileSize
new6.24 KB
new22.43 KB

This should be better

dsnopek’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new42.22 KB

The latest patch works much better with Radix Layouts! It's still a little chaotic but it's definitely an improvement over the current state, so I think it's acceptable.

samuel.mortenson’s picture

Two notes, which we can address in some of the more meta issues around mobile/scale or here:

- On mobile, stacking the layouts may take up the entire screen (or more). That's the original reason we used overflow-x: auto;.

- If two layouts use the same icon, how can we tell them apart? On desktop you can hover to see the title attribute's value, but on mobile this isn't an option.

Status: Fixed » Closed (fixed)

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