day8 / re-frame-10x

A debugging dashboard for re-frame. X-ray vision as tooling.
MIT License
631 stars 68 forks source link

Smarter rendering of data structure width #123

Open danielcompton opened 6 years ago

danielcompton commented 6 years ago

When we render data structures, we sometimes render too widely and people need to scroll sideways to see more. Other times we don't render widely enough (e.g. pop-out panel on a widescreen monitor) and we 'waste' space.

Dirac's rendering config renders based on counts of items in collections. Over certain thresholds they are elided and you can use the dropdown arrow to show more. It would be great to be able to calculate the width of a rendered data structure line, and choose the best way to lay it out, while still staying within the boundary.

agzam commented 6 years ago

I second that. In our app we use a lot of namespaced keywords in the app-db, and sometimes nesting is a bit out of hand. And narrowing down to the exact place in the state is right now kinda difficult (even compared to re-frisk). Would be nice maybe if the input supported autocomplete. But that probably still wouldn't completely solve the problem.

kimo-k commented 1 year ago

Would be nice to render namespaced keywords with an expander or tooltip when they're longer than a certain length. Also, consider a way to declare ns-aliases in the settings, or even get them from the source code somehow.

As for tweaking the layout based on the rendered size, sounds non-trivial. Maybe you'd implement that in jsonml->hiccup somehow.