Problems with hv.Layout and hv.Overlay together in very specific panel circumstances

Hi folks, I seem to be having a very specific layout problem with an hv.Layout. If I create a panel as below, the hv.Layout is reduced to zero size:

import holoviews as hv
import panel as pn

hv.extension("bokeh")

col = pn.Row(
    pn.Column(
        hv.Layout([hv.Curve(([0., 1.], [0., 1.]))]),
        hv.Overlay([hv.Curve(([0., 1.], [0., 1.]))])
    )
)
pn.serve(pn.Tabs(col))

If I omit the pn.Row or the pn.Tabs, or if I replace the layout with an overlay, or use two overlays or two layouts, the problem does not manifest (but the Layout and Overlay can switched in order and the problem remains). Is this a bug or am I missing something specific about how Layouts are supposed to work?

Using holoviews==1.20.2 and panel==1.7.1.

I’ve faced this issue many times and I can’t speak for the root cause, but I find it best to create the overlays and layouts separately before serving them up in a layout.

import holoviews as hv
import panel as pn

hv.extension("bokeh")

plots=[]
plots.append(hv.Layout([hv.Curve(([0., 1.], [0., 1.])), hv.Curve(([0., -1.], [0., 1.]))]))
plots.append(hv.Overlay([hv.Curve(([0., 1.], [0., 1.])), hv.Curve(([0., -1.], [0., 1.]))]))

col = pn.Row(pn.Column(hv.Layout([x for x in plots])))
pn.serve(pn.Tabs(col)) 

image

Can you file a GitHub issue if there isn’t one already? Thanks!