maartenba/Glimpse — pull request #3 by avanderhoorn (2013-12-04 04:48:05+00:00)
Title: Update layout of the Storage tab

As requested, I have updated the storage tab layout. Here are some notes:
- The main problem you had was the casing of the keys in the 'Cell' method. These need to match what you would find in the json object, not what is rendered to the screen. Hence why 'Requests' has been changed to 'requests'.
- With the way the rendering engine works, you don't need to specify titles (i.e. use the 'WithTitle' method) unless you want it to print something that is different than the way in much Glimpse processes property names (i.e. when we detect a property with the name of 'responseCode' we will print 'Response Code' for you :). With the exception of the properties in Statistics, Glimpse will render the titles you previously manually defined, automatically. Hence cutting down the code you need.
- NOTE, I realized after I wrote this, that it doesn't work that way when specifying layouts :S that's a bug, currently fixing. So for the moment it won't be cased correctly, but it will be by the time this goes live.
- Even thought the API lets you, its not best practice to set the pixel width dimensions on all fields in a given table. Overall Glimpse is going to try and render a table as 100% wide. If you specify a fixed pixel width for all fields, this will come into conflict with how Glimpse is trying to render things. Hence, you should either set percentages that will total 100% or leave the width of at least one column as not set, so it can "flow" as the tables is sized. I usally choose columns like "url" as ones not to set.
- Specifying layouts for the values of a object/dictionary (i.e. a table that is rendered with a key/value table) isn't currently supported. The JS api lets this happen but trying to map the expressiveness of the JS api to CSharp has proven very tough. To make this better, ultimately I would just like to let plugin authors write the metadata objects as JSON on the server side, but as you know there isn't any supported way of doing this currently in csharp.

Let me know if all this makes sense.