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

Refresh needed when card width is changed #68

Closed
erkr opened this issue Feb 5, 2024 · 3 comments · Fixed by #108
Closed

Refresh needed when card width is changed #68

erkr opened this issue Feb 5, 2024 · 3 comments · Fixed by #108
Assignees
Labels
bug Something isn't working

Comments

@erkr
Copy link

erkr commented Feb 5, 2024

Describe the bug
When I rotate my phone, the available card width changes. The card correctly adapts the number of columns (hourly) according the available width, but I need to refresh the screen (iPhone companion app) when I rotate from landscape to portrait or visa versa

To Reproduce
Steps to reproduce the behavior:
I open the hourly view in landscape:
image
Then rotate the mobile back to portrait:
image
After a manual refresh it is back to normal:
image

Expected behavior
I think the card needs an auto refresh when the available card width is modified

Screenshots
See above

@erkr
Copy link
Author

erkr commented Feb 23, 2024

@mlamberts78
Thanks for looking into this issue. Is this already in a release? I just checked V2.3.1 and that version still requires a refresh after a width change.
Best Eric

@mlamberts78
Copy link
Owner

@erkr , V2.3.1 should fix the issue. Tested width change on IOS 17.3.1, Android 14 and on Windows Chrome 121.0.6167.189 browser.
On all, when changing orientation or browser width, the amount of forecasts is reduced to ensure they fit on the card.

@erkr
Copy link
Author

erkr commented Feb 23, 2024

@mlamberts78
You are right, I put the card directly in the view and that it works both in the companion app and Safari on my iPhone iOS 17.3.1.
It is still not working when I embed the weather card in
custom:tabbed-card. Then it still needs a refresh:
image

I'm not a Lovelace developer, but can imagine the issue is caused by that tabbed card (not forwarding the width changes to the embedded card for instance)? If so I will raise an issue there.

Thanks for fixing!

This issue was closed.
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

Successfully merging a pull request may close this issue.

2 participants