Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DropDowns Incompatibility with stack-in cards #40

Open
2 tasks done
sdrapha opened this issue Mar 7, 2022 · 14 comments
Open
2 tasks done

DropDowns Incompatibility with stack-in cards #40

sdrapha opened this issue Mar 7, 2022 · 14 comments
Labels
bug Something isn't working

Comments

@sdrapha
Copy link

sdrapha commented Mar 7, 2022

Checklist:

  • I updated to the latest version available
  • 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:
ofekashery/vertical-stack-in-card#120
kalkih/mini-media-player#631

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


Additional information:

@mat4444
Copy link

mat4444 commented Mar 15, 2022

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

@guy0nabuffalo
Copy link

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

Screenshot_20220421-063712_Home Assistant

@ildar170975
Copy link

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.

@sdrapha
Copy link
Author

sdrapha commented May 12, 2022

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 added a commit to sdrapha/stack-in-card that referenced this issue May 12, 2022
Allow overflow to fix issue custom-cards#40 

Honestly I'm doing this pull request straight from github, without testing it.  
I have more experience on backend stuff and python, not much in the frontend or typescript. I would have to learn and figure out how to test it. And  I plan to do, WHEN I have more time, but meanwhile this guesswork change looks like the correct thing to do based in the workaround posted. 
If someone can also review or test it I apreciate.!
@ildar170975
Copy link

ildar170975 commented Jan 9, 2024

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
Copy link

ildar170975 commented Jan 9, 2024

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.

@LDprg
Copy link

LDprg commented Feb 11, 2024

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

@sdrapha
Copy link
Author

sdrapha commented Feb 12, 2024

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.

@LDprg
Copy link

LDprg commented Feb 12, 2024

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

@ildar170975
Copy link

ildar170975 commented Feb 12, 2024

I made a PR already

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

@sdrapha
Copy link
Author

sdrapha commented Feb 12, 2024

@ildar170975 I'll update it with your suggestion 👍

@ildar170975
Copy link

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

@sdrapha
Copy link
Author

sdrapha commented Feb 12, 2024

@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.

@ildar170975
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants