Viritin 2.8.9 now contains a handy class called ResizeObserver. You can use it to detect the rendered size of any component, so you can do further configuration that are optimal for your users. For exaple you probably want totally different set of columns for your Grid, if you are using it from a smarphone vs desktop. Or you might want to reconfigure those if user makes the grid narrower in a Splitlayout.
Even if you are just interested about the window/UI size, you can proabably replace two pretty similar code snippets with one (one for “ExtendedClientDetails”, on for page resize events).
I did a series of enhancements, javadocs and bug fixes to ResizeObserver. If you are using that I suggest to update your Viritin to version 2.10.3.
I was also considering to just drop it as a PR to Flow, but I think that approach is “overcomplicated” for the users. In the Flow enhancment issue I changed the API to exist directly in HasSize interface, so that it would practically be available through components. What do you think? Comment here or in the GH issue!
The advantage I see here is, two seperate views but using common features as much as possible. I do not have to muddle with too many CSS class names and/or media queries.
Another week, another iteration. Now the same funtionality can be achieved directly from pretty much all V prefixed Viritin components, by hooking the logic to listen ResizeEvent’s directly to the components. Grid column example: