
KPIs Part 1
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
got a small one uh did some Dynamic font sizing on some of these uh kpi pieces so if you start having like lots of density in here it looks okay at this size but when you started getting smaller screens whatever there would be lots of scroll bar so we did a little bit of work here where when you start making them smaller uh the font size uh just decreases and so like you know it works pretty good you start get to a place where maybe like this large one uh like this three million here may uh start getting cut off but you know pretty soon you go to responsive size and it it fits back um so yeah so that's pretty cool I also have
a small change coming in where these uh spark lines will kind of like responsive on smaller sizes they won't get bigger yet because I think there's a rendering issue still but um for interested how this works there's like um uh clamp uh font size and so what this says is like go between like our large font size and our extra large font size uh CSS variables and then um this 15 uh cqi is like container query inline size so like the uh the size from like the left to the right here is like is like the middle so it's like tries to make it always 15% of the container size uh but between large and large and extra large or double XL so um awesome
works pretty good is is there any performance consideration to doing this kind of stuff uh not that I can tell like I I had like pulled out of like 20 or 30 like kpi tiles I lost that dashboard with a migration but um it seemed to work pretty well um I mean ideally we would like format these numbers better by default like instead of like putting you know three million or or whatever you would do like the big number sportting um but from what I can tell there's not not any performance hits yet so for what Jared did it's basically the limitation of the GPU on the device so not much because it's CSS pure if we did things like reformat the numbers that's where
the performance might get drifting but again it would only hit you on resize so yeah I just want to be like somewhat obsessive about whether there's performance stuff and none like very minor or none is perfectly good yeah the win here would be switching to CSS layout instead of react grid layout because that does hurt us but like anywhere we can just use CSS to do the work it's generally going to be insanely fast love it