For me, the methods used to dynamically adapt my dashboards per screen size are well designed and suited to my needs, not to mention easy to use with simple parameters. Granted, it took a little while to understand all the different ways of working with universal dashboard, what it can and cant do, but the benefit is amazing and it saves sooo much time than trying to pop up a website in php (or similar) and spending hours messing about with web development for often simple issues that are very easily leveraged in powershell through UD instead.
The way I handle resizing by screen size in my dashboards is like this:
The design for columns is 12 across. 12 = full width.
So if I want some cards along the top of my page, lets say 6 of them.
On a full screen desktop browser, I want all 6 on one row.
If i resize my window to half, then I only want 3 cards per row.
If i go even smaller, I want 2 cards per row.
New-UDRow -Columns {
New-UDColumn -SmallSize 6 -MediumSize 4 -LargeSize 2 -Content { New-UDCard }
New-UDColumn -SmallSize 6 -MediumSize 4 -LargeSize 2 -Content { New-UDCard }
New-UDColumn -SmallSize 6 -MediumSize 4 -LargeSize 2 -Content { New-UDCard }
New-UDColumn -SmallSize 6 -MediumSize 4 -LargeSize 2 -Content { New-UDCard }
New-UDColumn -SmallSize 6 -MediumSize 4 -LargeSize 2 -Content { New-UDCard }
New-UDColumn -SmallSize 6 -MediumSize 4 -LargeSize 2 -Content { New-UDCard }
}
See: https://www.youtube.com/watch?v=GMr_j8iXmas
I usually place 99% of my elements in ud cards and then handle them this way, so your comment about the grid - just create a row for it, column inside that at 12 small medium and large sizes, and then stick your grid inside that - it’ll stay at full width.
Specifying which columns to hide by screen width is not a feature of this component as far as i’m aware, however it’s not impossible i’m sure, but probably would be tricky to manually implement.
If you want all your cards to auto refresh, then use the parent element: new-udcolumn’s properties -AutoRefresh & -RefreshInterval (Providing these are endpoints and not content).
Alternativly if its just a numerical values you want to display, you can also use new-udcounter which has autorefresh and refreshinterval parameters.
Then there is also the new-udelement which can be used in almost any way (particularly to wrap other components) and also has these properties.
On top of this, there are other numerous ways in which you can refresh data, all depending on what you want to achieve and how. For example, you can also use set-udelement or sync-udelement.
Once you get used to how UD is designed and responds I find it very easy and practical to work with.
You need to understand what it can and cant do, as there’s going to be limitations to any product. The main takeaway is that it’s a framework which enables you to do more in powershell and its constantly evolving and growing (version 3 is on its way with some pretty awesome improvements).
Most often if there are things that cannot be done directly in UD components, there’s a way around it with a bit of extra development and code - or stick a feature request in and it’ll likely be picked up if there is a practical need for it.
If you have any specific issues, please post your code and/or screenshots so people can advise further.
The community here is pretty good and we generally all help each other out where we can so If something doesn’t behave the way you expect or you’re struggling getting something working how you want, provide the specifics and I’m sure people will share the solutions they have.