update table heads to sticky.
The sticky head will trigger on the first time load, not on screen resize, if you change screen size probably needs to reload the page. let me know if we want to have that on-screen resize.
On normal screen
On the smaller device, I used to set the table body to scroll so the header stick on top, but doesn't seems really good, and failed lots of UI test, so when the table x-axis is overflowed sticky head won't work. Let me know if we want to enable this.
@bx80 good spot, update a little bit, should stop the warning now.
@peterhashair the tests are failing see https://builds-artifacts.matomo.org/matomo-org/matomo/4.x-dev/49914/ this also happens for me locally
@tsteur right, sorry the firefox warning fix broken it, revert it back. should be fine now.
@peterhashair I haven't tested yet but looking at the tests there might be still issues? eg https://builds-artifacts.matomo.org/matomo-org/matomo/4.x-dev/49937/UIIntegrationTest_dashboard2.png
I've tested this in few different browsers and mostly worked well. It's pretty awesome! 🚀
I think it's expected it doesn't work on mobile?
There are still few issues though like this one below:
I see the same still in the UI test failures: eg in https://builds-artifacts.matomo.org/matomo-org/matomo/4.x-dev/50077/UIIntegrationTest_metric_tooltip.png
Not sure if this is because of this PR? It doesn't seem related but then the test worked in another 4.x-dev build. Maybe it's a random build failure.
@tsteur it doesn't work on mobile, to work on mobile probably needs to restructure the entire table to a div, quite a big change. Let me know if we want to do that.
to work on mobile probably needs to restructure the entire table to a div, quite a big change. Let me know if we want to do that.
Not needed for now 👍
Do you know why eg this screenshot test is failing now https://builds-artifacts.matomo.org/matomo-org/matomo/4.x-dev/50151/UIIntegrationTest_goals_overview.png ?
@sgiehl if you could give this one a test too that be great
How much time would it take to get a JS solution to work roughly?
As it's more complex than expected I'm thinking maybe we just don't do it.
👍 @peterhashair sounds good to give it a try then. Let's restrict it to spend max 4 hours for now and then re-assess if needed.