Closed dgieselaar closed 1 week ago
Pinging @elastic/apm-ui (Team:APM)
The purpose of the HeightRetainer
hook is to make sure the page doesn't shrink vertically causing the scroll position to change. I'm not sure what the purpose of ResettingHeightRetainer
is.
I think we can improve the HeightRetainer
so it only retains the height down to where the user's bottom screen is (a little hard to explain - might be easier to talk out over zoom).
@sqren I think the HeightRetainer component only grows vertically. IMHO your suggested solution is a bit hackish. The ResettingHeightContainer "forgets" about a fixed height as soon as the content has settled. E.g., if you show content of 800px, and then a loading spinner, it will keep the container at 800px, and then when content comes back in at 400px, it will understand that it needs to update its minHeight to 400px. The HeightRetainer component would keep it at 800px. IMHO we should replace the HeightRetainer implementation with the one from ResettingHeightContainer.
ResettingHeightContainer "forgets" about a fixed height as soon as the content has settled. E.g., if you show content of 800px, and then a loading spinner, it will keep the container at 800px, and then when content comes back in at 400px, it will understand that it needs to update its minHeight to 400px.
Ah, agree, this sounds better.
IMHO we should replace the HeightRetainer implementation with the one from ResettingHeightContainer.
Yes, I didn't understand why we have two very similar approaches. If we can replace HeightRetainer
with ResettingHeightContainer
I'm all for it.
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)
I'm almost sure this has been fixed
Currently, the container of the trace waterfall is not reset (fit to content) when navigating traces, which can result in a lot of blank space:
We have a resetting height container that we can use: https://github.com/elastic/kibana/blob/main/x-pack/plugins/apm/public/components/shared/height_retainer/resetting_height_container.tsx