Embedded View Overflow Visible

Hi,

I’m having strange behaviour with embedding a view into a coordinate container and having it’s overflow visible by default.

The view has it’s own overflow set to visible:
image

When I embed this view into another container, it appears with scrollbars:
image

If I add overflow:visible, it behaves correcly, as the other examples show.

Views attached.Overflow.zip (9.0 KB)

Is this expected behaviour? It would really cumbersome to have to add this key every time a symbol is added to a mimic, negating the convenience of drop config.

This is currently on 8.1.11.

Regards,
Deon

This can happen when you are using irregular fixed sizes and drop it into a flex/percent container. Its probably rounding it a bit wrong causing it to enter overflow state.
This is expected behaviour tho

Try putting overflow hidden on the view, that way it should not cause an overflow when embedded.

I’m deliberately placing the label outside the view dimensions and actually want the overflow to be visible by default. It is only visible after adding overflow:visible to the embedded view.

You can change the default behaviour of embedded views with theme.css (or injection)

Which will cause all the embedded views to have overflow visible… You will not easily be able to ever anywhere change it back to have a different overflow tho… so i cant recommend this.

.view-parent{overflow:visible !important}

(inject into background image of a style class no need apply the style)
}.view-parent{overflow:visible !important}{


1 Like

If you do this i reccommend creating a style class named
“childEmbeddedOverflow” (or something)

and then use this instead and put this class on the containe of your view with all the embdedded stuff in. This way it will only apply in this container
}.psc-childEmbeddedOverflow .view-parent{overflow:visible !important}{

1 Like

Yes, this is expected. You're setting properties for a View, but those settings aren't set on the Embedded View, nor are they inherited from whatever View is instanced/embedded. So what you're encountering is an unfortunate consequence of every component defaulting to overflow: auto.

Is there any way to change the default behaviour to visible?

At this point that would be a backwards-breaking change, and could potentially have large impact on existing projects. I’ll discuss with Dev to see if we should modify this behavior for 8.2.0.

1 Like

I discussed this with one of the Devs, and we have a solution which stems form two open features:

  1. We have an open feature which would allow for users to create their own custom component variants within the component palette.

  2. We also have an open feature that would allow users to specify component variants as a drop target.

These two features in tandem would allow you to specify an “Overflow Visible” variant of the Embedded View component, and then specify that variant as the drop target for your UDT. These features are not guaranteed for 8.2.0, but neither would result in a backwards-incompatible change, and so they could actually be added at any time without impacting anyone. I’ll link this forum post in the two features.

4 Likes

That sounds perfect