hypothesis / lms

LTI app for integrating with learning management systems
BSD 2-Clause "Simplified" License
46 stars 14 forks source link

Show table of contents hierarchy in VitalSource page range selection #5821

Closed robertknight closed 11 months ago

robertknight commented 12 months ago

We currently present the table of contents returned by VitalSource's API as a flat list. However it is really hierarchical, with the level of an entry indicated by the level field, which is an integer >= 1. See https://developer.vitalsource.com/hc/en-us/articles/360010967153-GET-v4-products-vbid-Title-TOC-Metadata#h_1c266775-a673-4d3d-9caa-b0599db07381 for an example.

Implementing a full tree-view with selection could be quite a lot of work. At a minimum it would be useful to at least be able to see the hierarchy, to make the list easier to scan.

As well as showing the hierarchy visually in page range selection, our app needs to understand the hierarchy to understand the start/end pages that a particular TOC item relates to.

robertknight commented 12 months ago

This is now implemented in a minimal way by indenting rows according to their level in the hierarchy:

VS TOC hierarchy
robertknight commented 11 months ago

I'm going to consider the above change an MVP solution to this. I do think we should implement a proper tree view, but that's enough work that it merits a separate issue.