stack-in-card icon indicating copy to clipboard operation
stack-in-card copied to clipboard

DropDowns Incompatibility with stack-in cards

Open sdrapha opened this issue 3 years ago • 14 comments

Checklist:

  • [x] I updated to the latest version available
  • [x] I cleared the cache of my browser

Release with the issue:

Last working release (if known):

Browser and Operating System:

Description of problem:

Starting on HA version 2022.3 The dropdowns don't show correclty if the mini-media-playerlink card is used inside a custom:stack-in-cardlink or a custom:vertical-stack-in-card link

image

I'll cross post this issue on the other involved custom cards repos, as I don't know what is the root cause for the issue.

Cross posted issues: https://github.com/ofekashery/vertical-stack-in-card/issues/120 https://github.com/kalkih/mini-media-player/issues/631

Javascript errors shown in the web inspector (if applicable):


Additional information:

sdrapha avatar Mar 07 '22 17:03 sdrapha

Same issue here. The card needs to allow overflow for the dropdown menus. image

mat4444 avatar Mar 15 '22 13:03 mat4444

Also having trouble with this. Input select options do not expand past the card.

Screenshot_20220421-063712_Home Assistant

guy0nabuffalo avatar Apr 22 '22 14:04 guy0nabuffalo

The custom:stack-in-card is incompatible with the new Material Web Components' dropdown list control. A very simple MWE:

type: custom:stack-in-card
cards:
  - type: entities
    entities:
      - entity: input_select.test_value

image image The list is clipped inside the stack's area.

Temporarily this may be fixed by applying a overflow: visible !important; CSS style to the stack by card-mod.

ildar170975 avatar May 01 '22 22:05 ildar170975

Thanks for the temporary work-around @ildar170975, it works.

Posting it here in a more clear format on where to use it, to make it easier for more people to use. Since card-mod css structure is not the most intuitive thing on earth.

type: custom:stack-in-card
card_mod:
  style: |
    ha-card {
      overflow: visible !important;
    }
cards:
  - type: custom:mini-media-player
    lorem: ipsum.....

sdrapha avatar May 12 '22 22:05 sdrapha

For the record: This overflow: hidden may also cause clipping for a history-graph: described here

image

type: custom:stack-in-card
cards:
  - type: history-graph
    entities:
      - sun.sun

ildar170975 avatar Jan 09 '24 01:01 ildar170975

And now I suggest this mod:

type: custom:stack-in-card
card_mod:
  style: |
    ha-card {
      overflow: visible !important;
    }
    ha-card > div {
      overflow-x: clip;
    }
cards:
  - type: history-graph
    entities:
      - sun.sun
  - type: custom:hui-element
    row_type: section
  - type: entities
    entities:
      - input_select.test_value

which prevents overflowing by X & allows it by Y. But clip value may not work in some old browsers.

ildar170975 avatar Jan 09 '24 02:01 ildar170975

Same issue here workarounds work perfectly. Maybe someone should make a pr with an actual fix.

LDprg avatar Feb 11 '24 18:02 LDprg

Same issue here workarounds work perfectly. Maybe someone should make a pr with an actual fix.

I made a PR already, almost 2 years ago, never got merged. It's still there ready to go, just waiting for the repo owner. Maybe the card is not being maintained anymore. idk.

sdrapha avatar Feb 12 '24 04:02 sdrapha

@RomRider Is it possible to merge that pr, so that problem gets resolved?

LDprg avatar Feb 12 '24 05:02 LDprg

I made a PR already

This PR does not handle some cases, already suggested you corrections.

ildar170975 avatar Feb 12 '24 12:02 ildar170975

@ildar170975 I'll update it with your suggestion 👍

sdrapha avatar Feb 12 '24 13:02 sdrapha

Very good. The only thing that bothers me - it may not work properly on some old browsers.

ildar170975 avatar Feb 12 '24 13:02 ildar170975

@ildar170975 What is your goal trying to limit overflow in X only, does that solves any particular issue? I've never had a problem allowing overflow to all directions... so, I'm curious.

sdrapha avatar Feb 12 '24 15:02 sdrapha

Compare image image

The 1st card has no overflow-x: clip style.

type: custom:stack-in-card
card_mod:
  style: |
    ha-card {
      overflow: visible !important;
    }
    ha-card > div {
      overflow-x: clip;
    }
cards:
  - type: history-graph
    entities:
      - sun.sun
  - type: custom:hui-element
    row_type: section
  - type: entities
    entities:
      - input_select.test_value

ildar170975 avatar Feb 12 '24 15:02 ildar170975