MagicMirrorOrg / MagicMirror

MagicMirror² is an open source modular smart mirror platform. With a growing list of installable modules, the MagicMirror² allows you to convert your hallway or bathroom mirror into your personal assistant.
http://magicmirror.builders
MIT License
19.44k stars 4.15k forks source link

MMM-OnSpotify module causes MagicMirror to draws things multiple times #3409

Open TheEpicTen opened 3 months ago

TheEpicTen commented 3 months ago

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.

KristjanESPERANTO commented 3 months ago

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

TheEpicTen commented 3 months ago

I'll have a look in about an hour.

TheEpicTen commented 3 months ago

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 commented 1 month ago

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.

Fabrizz commented 1 month ago

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 commented 1 month ago

Other pages

image

REALLY strange

image

On the same page

image Happens instantly with my setup

TheEpicTen commented 1 month ago

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?

sdetweil commented 1 month ago

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..

Fabrizz commented 1 month ago

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

sdetweil commented 1 month ago

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