Skip to content

Dict View for tree-structured data #1431

@rolyp

Description

@rolyp

We currently support loading (via JSON), but not rendering, of tree-structured data. A MultiView is essentially just a dictionary of views where (by convention) the dictionary keys are hidden. We should be able to adapt this to allow for nested hierarchical views where the keys are rendered (perhaps with the option to disable key rendering to subsume the existing MultiView behaviour).

  • setSelection not general enough to support key selection? (Expects "leaf" selection to be on a Val)
  • Emulate layout of tabular view where appropriate, and fix vertical layout of keys/leaves in columnar mode

Done/dropped:

  • Factor existing MultiView instance through new Dict View' instance, verify current behaviour preserved
  • Check default layout: children of div layed out vertically if block elements, or horizontally if inline; svg are inline
  • Dict View should be Dict (View × View), with first view being view of key?
  • New div element to show keys as well (and force vertical layout)
    • Check impact on MultiView examples
  • Indent children relative to parent div (when showing key?)
  • Format (k, v) pair, e.g. k: v
  • CSS grid to render each set of k: v pairs with uniform k column
  • MultiView as just vertically composed views, rather than based on Dict View
    • New impl that doesn't go through Dict View

Metadata

Metadata

Assignees

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions