home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.92k stars 2.65k forks source link

Picture elements: element's position (top/left) if set in "%" is processed in a bad way #14704

Open ildar170975 opened 1 year ago

ildar170975 commented 1 year ago

Checklist

Describe the issue you are experiencing

Consider this card:

  - type: picture-elements
    elements:
      - type: icon
        style:
          top: 50%
          left: 50%
        icon: mdi:car
    image: /local/images/test/blue.jpg

image

So far it is OK.

If the card's height is changed - then the element's position is calculated with respect to the INITIAL height, not to the actual one. Means - the element may be NOT displayed at all since it placed outside the card's boundary:

  - type: picture-elements
    elements:
      - type: icon
        style:
          top: 50%
          left: 50%
        icon: mdi:car
    image: /local/images/test/blue.jpg
    card_mod:
      style: |
        ha-card {
          height: 100px !important;
        }

image

Element's position must be calculated based on the CURRENT size.

Describe the behavior you expected

Element's position is calculated based on the CURRENT size.

Steps to reproduce the issue

see above

What version of Home Assistant Core has the issue?

2022.12.2

What was the last working version of Home Assistant Core?

In which browser are you experiencing the issue with?

Chrome 108.0.5359.99

Which operating system are you using to run this browser?

Win10x64

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

ildar170975 commented 1 year ago

This is a not an issue like "it was OK, not it is broken". I remember that I always had to edit these top / left values after a described "manual" change of the card's height. But I think that this behaviour may be fixed.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

ildar170975 commented 1 year ago

up

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

ildar170975 commented 1 year ago

Up

github-actions[bot] commented 11 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

ildar170975 commented 11 months ago

up

github-actions[bot] commented 8 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

ildar170975 commented 8 months ago

up

github-actions[bot] commented 5 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

ildar170975 commented 5 months ago

up

github-actions[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

ildar170975 commented 2 months ago

Up