matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.87k stars 2.65k forks source link

No gap between icon in visits in real time widget #21310

Open tsteur opened 1 year ago

tsteur commented 1 year ago

This is using Matomo 5.

When viewing the real time widget in a dashboard, then there is no gap between the Google icon and the word "Google".

image

After a refresh of the widget (or when the widget auto updates), the gap seems to be there.

Browser: Chrome, latest version

michalkleiner commented 1 year ago

So is this on the first load of the dashboard and then it disappears? Is it replicable, does it happen every time even after a hard refresh and/or in an incognito window with caches disabled?

tsteur commented 1 year ago

It happens for me every time on Matomo 5.

It's not related to caches.

michalkleiner commented 1 year ago

I can confirm this behaviour on Sandbox. There's no gap on first dashboard load, then subsequent update of the live visits widget looks normal. Tested in Brave. Haven't seen any obvious markup or styling differences at a glance.

sgiehl commented 1 year ago

Might be a regression of the vue migration. Looking at the code it seems that the data from the initial request is inserted after removing any whitespaces between the html tags. Responses from further requests are inserted with whitespace, which seems to be the cause, that on the first request there is no whitespace, while further requests add one...

michalkleiner commented 1 year ago

Yeah, that might be the case because in elements view in devtools the markup looks the same but it's the browser formatting and it may be obscuring there's no whitespace between the tags, so the raw request response markup needs to be examined. Should be an easy fix adding a non-breakable space there.