community
community copied to clipboard
Weather Alerts Jumbled
@aschechter88 I received my first alert and for a few seconds each time it loads itβs a bit funky and jumbled before fixing itself.
Whoa, that hasn't ever happened to me. Will have to do some digging to try and reproduce.
On Thu, Sep 8, 2022 at 17:34 Brandon Jones @.***> wrote:
@aschechter88 https://github.com/aschechter88 I received my first alert and for a few seconds each time it loads itβs a bit funky and jumbled before fixing itself.
[image: image] https://user-images.githubusercontent.com/155808/189248611-b700612f-6b3e-4f3b-bfb7-39bb39e58b5d.jpeg
β Reply to this email directly, view it on GitHub https://github.com/tidbyt/community/issues/646, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWE2PZWLYBIFUDZ34F3JPTV5KAYVANCNFSM6AAAAAAQIHOHBE . You are receiving this because you were mentioned.Message ID: @.***>
If it helps, here are a couple more screenshots someone else posted on discord.
Okay! Even though the starlark file was committed to the tidbyt main, I'm (still) driving my local version locally with crontab running on my computer and have never seen image collisions like that.
On Thu, Sep 8, 2022 at 18:47 Brandon Jones @.***> wrote:
If it helps, here are a couple more screenshots someone else posted on discord.
[image: image] https://user-images.githubusercontent.com/155808/189254973-d453b688-e971-49de-87c4-e710bc00a350.jpeg
[image: image] https://user-images.githubusercontent.com/155808/189254986-ab263f71-17a3-4a18-b80e-efb1f3ff7f2b.jpeg
β Reply to this email directly, view it on GitHub https://github.com/tidbyt/community/issues/646#issuecomment-1241407632, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWE2P2KFEKVEAO4ENEZPELV5KJKHANCNFSM6AAAAAAQIHOHBE . You are receiving this because you were mentioned.Message ID: @.***>
Could it somehow be due to cached data or keys or something? I've had that happen when weird stuff like this happens.
@aschechter88 any timeline for an update on this. I know it's been mentioned on the discourse too.
And I know people would like an option to have it not in the rotation unless there are alerts too, which I could add but wanted to check if you had something int he works first for the bigger issue.
Haven't had time to work on the multi-frame thing but was locally unable to reproduce a few weeks ago.
As for eliminating from rotation, I'm listening. It was troublesome and kludgy last time I looked into it.
On Sat, Oct 1, 2022 at 10:03 PM rs7q5 @.***> wrote:
@aschechter88 https://github.com/aschechter88 any timeline for an update on this. I know it's been mentioned on the discourse too.
And I know people would like an option to have it not in the rotation unless there are alerts too, which I could add but wanted to check if you had something int he works first for the bigger issue.
β Reply to this email directly, view it on GitHub https://github.com/tidbyt/community/issues/646#issuecomment-1264552670, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWE2P5JLFA3NAXB7BSWIFDWBEJSHANCNFSM6AAAAAAQIHOHBE . You are receiving this because you were mentioned.Message ID: @.***>
You just have to do return []
and it won't show up in the rotation. So the easiest solution may be to have a toggle that if there are no alerts then just do return []
instead of return render.Root()
.
I think when I looked at the code the first time I couldn't find a good place to add it as I wasn't sure how you were filling the text and everything.
I am wondering if you have a cache issue or something so that is why you aren't able to reproduce locally, you may have to hard code to recreate or maybe find a place with alerts and see if you can get it to show up in pixlet serve
. I don't know what your cache keys are though either or what is being cached. I'm just throwing stuff out of things to check.
@aschechter88 I am 99% sure the issue may be that you need to use render.Animation
and not render.Sequence
I think you need to use modules from the animation widget instead for that to work properly. @fxb is render.Sequence
built exclusively with the idea of using it with the functions from the animation module (i.e. what is a use case to use this over render.Animation
if not using animation
commands?)
I have not play tested it more than swapping one of my apps from render.Animation
to render.Sequence
and I seem to get similar overlapping results as your jumbled cards when using render.Sequence
did not change in my PR for your app as I wanted you to play around with display timings and what not.
edit: if you would like me to simply change that in the existing PR let me know and I can.
When I wrote the first version the Animation widget had just barely barely come out and I did play with it some: I recall that it definitely wasn't what I needed and that speed control over the frames was basically non-existent. That was earlier this year, so I'll give it a second go.
On Thu, Oct 6, 2022 at 4:52 PM rs7q5 @.***> wrote:
@aschechter88 https://github.com/aschechter88 I am 99% sure the issue may be that you need to use render.Animation and not render.Sequence I think you need to use modules from the animation widget instead for that to work properly. @fxb https://github.com/fxb is render.Sequence built exclusively with the idea of using it with the functions from the animation module (i.e. what is a use case to use this over render.Animation if not using animation commands?)
I have not play tested it more than swapping one of my apps from render.Animation to render.Sequence and I seem to get similar overlapping results as your jumbled cards when using render.Sequence
did not change in my PR for your app as I wanted you to play around with display timings and what not.
β Reply to this email directly, view it on GitHub https://github.com/tidbyt/community/issues/646#issuecomment-1270851540, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWE2PZFR5GSN2K2WNI5EATWB5Q4ZANCNFSM6AAAAAAQIHOHBE . You are receiving this because you were mentioned.Message ID: @.***>
When I wrote the first version the Animation widget had just barely
Do you mean render.Animation
or the animation
module? render.Animation
has been available from the start.
I've used the animation.Transformation
and it works well, it can just take some time to get the parameters right depending on how you want it to look.
render.Animation
and delay
should do what you want if you just want it to paginate through.
If you want something fancy then animation.Transformation
and render.Sequence
. You could probably add a blank page between alerts/ put the text in a box with a black background, but that is honestly probably overkill. Just depends.
TLDR: for a quick fix render.Animation
should work, but should be tested first.
For what it's worth I also have the overlapping text thing today.
Hm. Can you give me a representative location (zip code might be sufficient) so I can attempt to reproduce?
- I meant the
animation
module with theTransformation
element. - I'm gonna start with re-doing the cache keys. I'm wondering if somehow the condition that requires checking for previous data is somehow being triggered more than once. After that, then I'll attempt to address the rendering -- I'm not convinced that's where the problem is, though.
- This is not my location, but looks like any place in the upper midwest should give you a frost advisory warning. (checked weather.gov)
- A noticing the
render.Animation
andrender.Sequence
thing last night, I really don't think your cache stuff is the issue either because you are doing it by truncated latitude and longitude and saving the data and not the frames based on the code. Additionally I tried swapping one of my apps that was usingrender.Animation
withrender.Sequence
and I got the same jumbled issue. The slides aren't actually jumbled per se, I think they're just stacking and overlapping and your delay is so long that it doesn't dissappear quick enough, either way without usinganimation.Transformation
in your stuff I think the way you need to go is withrender.Animation
to get a pagination since I'm guessing that's what you want.
So, if you simply swap that from render.Sequence
to render.Animation
in the line below they should no longer be overlapping. You may have to play with delay though.
https://github.com/tidbyt/community/blob/778322bd3d6949c755040aa2fa9c07ebb913d7ed/apps/severewxalertsusa/severewxalertsusa.star#L56
Okay now I'm starting to see it. Will get to the render
change first.
Yeah I think the render.Animation
patch may be a good intermediate fix if you want the changes to be fancy rather than just paginate, but the app isn't super useful with this bug.
Also it looks like on my tidbyt app, the render.Sequence
does work as I saw it on my other app, but again, you need to put a background behind the text (could be solved with render.Box), but I think the easiest solution is just changing to
render.Animation`.
Thanks for fixing it! It also looks like the toggle for alerts only also got merged, so that should be useable on your end if you have no alerts in your current area.
Also feel free to change the toggle icon on the alert only, I used eyeSlash
as I usually use it to hide app, but another font-awesome icon may make more sense. Potentially circleExclamation
exclamation
or triangleExclamation
as I made it eyeSlash since I was thinking of hide app, not alerts only. But I do think eyeSlash
may be more differentiable in case you add extra settings to this app and maybe only want to see certain types of alerts.
@aschechter88 I was able to test the switch out, you'll need to play with the transition, but here's me just running pixlet render. Before then after. as I said you will need to change the delay, as it seems a little long.
edit: the only difference is render.Sequence
vs render.Animation
Before:
After: