generateblocks icon indicating copy to clipboard operation
generateblocks copied to clipboard

Query Loop Block - Post Template tag name not working.

Open fernandoazarcon2 opened this issue 3 years ago • 9 comments

Description

Post Template tag name is not working on a Query Loop Block. The filter generateblocks_container_tagname isn't working as well.

Steps to reproduce

  1. Create Query Loop Block
  2. Change Post Template tag name or use generateblocks_container_tagname filter

Expected behavior

tag name replaced

Actual behavior

tag name remains div

References:

https://share.getcloudapp.com/o0uXNd6w


fernandoazarcon2 avatar Aug 23 '22 04:08 fernandoazarcon2

Although we should include article within the HTML element tags for Container Blocks. In this instance adding it to the gb-container would be incorrect, as it really needs to be applied to thegb-grid-column element.

diggeddy avatar Aug 23 '22 11:08 diggeddy

@fernandoazarcon2 @diggeddy @tomusborne let's push this to 1.7 so we can discuss more before changing. As Tom said, the idea is to remove the gp-grid-column in the future as it's only for the gaps.

JeanPaiva avatar Aug 23 '22 22:08 JeanPaiva

What is stopping us from adding article as a HTML tag for the Container in 1.6 ? It has uses outside of the Query Loop and will be there when we remove the gb-grid-column

diggeddy avatar Aug 24 '22 09:08 diggeddy

@diggeddy nothing stopping us I just opened the PR.

JeanPaiva avatar Aug 24 '22 13:08 JeanPaiva

Testing #670 and questioning why we added the post classes to the gb-grid-column element as well. Seems like they would be better added to the gb-container element. What do you think @diggeddy? I think we added them to the outer element for a reason - maybe visibility?

tomusborne avatar Aug 24 '22 16:08 tomusborne

Primarily styling for example

.gb-grid-wrapper > .gb-column.category-politics {
    width: 100%;
}

And some JS / CSS filters for hiding and showing posts. You have to get the gb-grid-column out the way

diggeddy avatar Aug 24 '22 16:08 diggeddy

Definitely a problem as we want to eventually remove that wrapper and doing so will break solutions like that.

tomusborne avatar Aug 24 '22 16:08 tomusborne

when that happens we can just move the classes to the gb-container right ?

diggeddy avatar Aug 24 '22 16:08 diggeddy

Right, but solutions like your CSS (if the user has added them) will break.

tomusborne avatar Aug 24 '22 16:08 tomusborne

@tomusborne @diggeddy should we apply the tag to .gb-grid-column? Or could we keep it as is?

JeanPaiva avatar Mar 27 '23 20:03 JeanPaiva