MagicMirror icon indicating copy to clipboard operation
MagicMirror copied to clipboard

MMM-OnSpotify module causes MagicMirror to draws things multiple times

Open TheEpicTen opened this issue 1 year ago • 10 comments

I'm adding 2 images of the clock and Newsfeed module to show what I mean.

https://imgur.com/a/2B9Sj6R

Not sure how to fix this or what's causing it, but I have the MMM-OnSpotify module, and it temporarily fixes every time the currently playing song changes.

TheEpicTen avatar Apr 01 '24 07:04 TheEpicTen

Does the problem also occur if you deactivate all modules except for the clock?

KristjanESPERANTO avatar Apr 01 '24 09:04 KristjanESPERANTO

I'll have a look in about an hour.

TheEpicTen avatar Apr 01 '24 09:04 TheEpicTen

Well my mirror no longer starts. I have a solution, but not enough time to do it today. I'll work on it tomorrow

TheEpicTen avatar Apr 01 '24 10:04 TheEpicTen

So the only time this issue occurs is when something is playing and shown on the onspotify module. I'll put this issue on that repo.

TheEpicTen avatar May 22 '24 19:05 TheEpicTen

I can reproduce this as it only happens on the machine that I use to develop. Im sure that its related on how chromium readers things (In this case I thing its related to css filters and opacity interactions).

I cannot find issues similar to this as some times MM2 appears drawn over other tab in my machine and that REALLY makes no sense.

Im sure that there is a way of using flags to change how rendering works in electron and or other browsers. Changing the viewport size fixes this as its just a rendering artifact.

EDIT: will try to reproduce, and maybe open a bug on the chromium bug tracker(?

Fabrizz avatar May 22 '24 20:05 Fabrizz

Other pages

image

REALLY strange

image

On the same page

image Happens instantly with my setup

Fabrizz avatar May 22 '24 20:05 Fabrizz

Oh, interesting. I only get the doubles when mirror is the active window, they don’t appear otherwise. Can be fixed temporarily by reloading mm(Ctrl+r), but comes back very quickly. I’ll have a look later to make sure, but how do I change viewport size?

TheEpicTen avatar May 23 '24 14:05 TheEpicTen

I don't understand viewport? MM IS the viewport.. full screen intended..

IF your module wants a smaller 'viewport' then it has to use html idoms to create another , like iframe https://developer.mozilla.org/en-US/docs/Web/CSS/Viewport_concepts and use css to customize its size

else it uses size to control the drawing area height, width ....

IF the module resurfaced from off screen/hidden, its resume() method would be called..

sdetweil avatar May 23 '24 14:05 sdetweil

I don't understand viewport? MM IS the viewport.. full screen intended..

IF your module wants a smaller 'viewport' then it has to use html idoms to create another , like iframe https://developer.mozilla.org/en-US/docs/Web/CSS/Viewport_concepts and use css to customize its size

else it uses size to control the drawing area height, width ....

IF the module resurfaced from off screen/hidden, its resume() method would be called..

Nono, I'm just saying that a viewport change in the page (or a color change on the elements that have a filter) triggers a repainting, thus the bug disapears. (Just a visual thing)

I made the corresponding bug report on the chromium bug tracker.

The best way (hacky way) to make this disapear would be to change the colors a bit over time or not use that background effect.

I don't know if maybe instead of using css for opacity using the alpha channel in the color would be different, as that is not applied after

Fabrizz avatar May 23 '24 15:05 Fabrizz

ok, we don't know about css when we do updateDom().. we check that the redendered content is the same or not. so if style changed under the covers (animated background) that would be a browser shadow dom change I think. and outside our knowledge

sdetweil avatar May 23 '24 15:05 sdetweil