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

State content exceeding container width #70

Open
amitkeret opened this issue Dec 13, 2021 · 6 comments
Open

State content exceeding container width #70

amitkeret opened this issue Dec 13, 2021 · 6 comments

Comments

@amitkeret
Copy link

amitkeret commented Dec 13, 2021

I've found that in certain situations, the "stated" card exceeds its parent width.
For me, it seems to happen as a result of images not being resized or restricted to the parents container's width, so if a larger image appears, it causes the entire card to "stretch" past its container. The images appear as part of the mini-media-player custom card.

No media playing:

Media playing, normal sized thumb:

Media playing, large thumb:

Media playing, large thumb, scrolling down to it:

I'm using hash-based state. I've looked at #14 and #18 and I think this is a separate issue.
Using version 1.9.1 of state-switch.

(I've removed irrelevant things from the code below)

- type: vertical-stack
  cards:
    - type: grid
      cards:
        - type: button
          tap_action:
            action: navigate
            navigation_path: '#tv'
        - type: button
          tap_action:
            action: navigate
            navigation_path: '#kodi'
        - type: button
          tap_action:
            action: navigate
            navigation_path: '#ac'
- type: custom:state-switch
  entity: hash
  default: none
  states:
    tv:
      type: ..........
    kodi:
      type: vertical-stack
      cards:
        - ..........
        - type: conditional
          conditions:
            - entity: media_player.koditv
              state_not: idle
          card:
            type: custom:mini-media-player
            entity: media_player.koditv
            volume_stateless: false
            hide:
              power: true
              controls: true
              volume: true
              icon: true
            artwork: full-cover
            name: Now Playing
    ac:
      type: ..........
@w1tw0lf
Copy link

w1tw0lf commented Dec 14, 2021

Sitting with the same issue.

@Stijn-Daniels
Copy link

I have the exact same issue since 1.9.0. Reverting to version 8 fixes the issue for now.

@andrazek
Copy link

I also have this issue. Is there a workaround?

@LastElf
Copy link

LastElf commented Feb 26, 2022

I'm getting the same thing with the upcoming media card on mobile with a hash state. Resizing a desktop browser handles the resize fine

@thomasloven
Copy link
Owner

Please try release 1.9.3.

@Stijn-Daniels
Copy link

@thomasloven seems to work so far, thanks for fixing it and thanks for all your plugins!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants