Bricks version: 2.5-beta2 (same in 2.4.6)
What happens
Custom elements can use Bricks’ built-in rule for grid item controls: a control whose key starts with _gridItem is hidden as long as the element’s parent is not a CSS grid (includes/elements/container.php:283, “Check via control startsWith ‘_gridItem’”). This works for controls only. When a custom element puts its grid item controls into their own control group, the controls disappear outside a grid, but the group stays: an empty, collapsible “Grid item” group in every element that is not inside a grid.
A group’s required cannot help: controlGroupClasses() evaluates it against the element’s own settings, and the grid context is the parent’s computed display.
Request
Apply the same rule to control groups: a group whose key starts with _gridItem is hidden while the parent is not a grid, just like its controls.
// main.min.js, control visibility (2.5-beta2)
if(null!=o&&o.startsWith("_gridItem"))return{visible:!(null==l||!l.parent)&&m(l.parent),delay:null};
The same check in controlGroupClasses() (push hide for a _gridItem* group key when $_elementHasCssGrid(parent) is false) would do it. Alternatively: hide any group whose controls are all hidden.
Workaround we use
A small builder script observes the panel and hides [data-control-group="…"] with the same check ($_elementHasCssGrid() on the parent of $_activeElement). It works, but it depends on builder internals we would rather not touch.
Happy to provide more details or a test site if that helps.
Best Regards
Suat