influxdata / giraffe

A foundation for visualizations in the InfluxDB UI
https://influxdata.github.io/giraffe/
MIT License
183 stars 33 forks source link

fix: count correctly the number of table headers that are rendered #821

Closed TCL735 closed 2 years ago

TCL735 commented 2 years ago

Closes https://github.com/influxdata/ui/issues/6004

Fixes the problem with the measurement of the number of rows that can fit in the available space. Table headers, which are taller than a row, were not being counted correctly. Thus, the total running height was underestimated, and the available remaining height was overestimated, which led to squeezing in an extra row that should not have been rendered.

BEFORE - notice the last row on page 2 overlaps with the edge of the table and horizontal scrollbar:

https://user-images.githubusercontent.com/10736577/194189458-51df473b-a582-4cab-ad24-0344cbd4f8f6.mp4

AFTER - fixed, no overlapping:

https://user-images.githubusercontent.com/10736577/194189491-d4a8250b-b2d8-4c4d-8e04-c28f9a6d4cb0.mp4