observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

Manage collections in a more hierarchical way and make them more visible #20

Open ericemc3 opened 3 years ago

ericemc3 commented 3 years ago

Is your feature request related to a problem? Please describe. I have many notebooks that form a complete and structured tutorial, organized in chapters and sub-chapters. The current Collection feature is a litle bit 'flat' and not very visible for the reader

Describe the solution you'd like I'd like to arrange a collection of notebooks in a structured and hierarchical summary, with at least one more depth level. And also possibly display the summary on the left, as in a bookdown doc: https://bookdown.org/yihui/rmarkdown-cookbook/d3.html

Describe alternatives you've considered build my own nav menu...

mbostock commented 3 years ago

You can add collections to collections as described here:

https://observablehq.com/@observablehq/collections

Here are a couple examples of collections-of-collections:

https://observablehq.com/collection/@observablehq/topics https://observablehq.com/collection/@observablehq/tutorials

However, because a collection or a notebook may exist in multiple collections, the top-level list of collections and notebooks is still effectively flat. The hierarchy, in a sense, only begins when you enter a collection. We’ve talked about having “folders” as an alternative or addition to collections, with the difference being that a notebook (or maybe a collection) and only exist in one folder at a time. Is that what you’re asking for? Or does the existing support for nested collections suffice?

CobusT commented 3 years ago

I was wondering whether it would be desirable to be able to mark a collection as a 'sub-collection' (may need a better term for this) where you basically indicate that the collection should not be shown in the list of collections, but only show inside its parent collection. That would mean that you would not see the collection listed anywhere except its parent collection(s).
It seems like that may create the hierarchy that a folder structure would provide, but still allow for a collection to exist in multiple collections.

I can imagine a structure like this (sc = sub-collection):

In the current implementation, you would see all these collections listed in the collections view as a flat list (and of course, when navigating into a collection, you would see the sub collections listed again):

If we create this idea of flagging collections as sub-collections, the collection listing would instead feel more like a folder structure and start off looking like this:

and you would have to navigate Into these top-level collections to see the sub collections. Or, of course, it could be presented in a tree structure. The key here is that you effectively want to identify which collections should be sub collections.

(NOTE: or... same idea... but perhaps you just flag which collection should be a top-level collection... and those would be the only ones shown in the collection list)

Would love some feedback on this idea. It effectively creates a folder structure (with the added benefit of having the same subfolder exist in multiple parents). But it does break the flat collections view...

ericemc3 commented 3 years ago

You can add collections to collections as described here:

https://observablehq.com/@observablehq/collections

Thank you for the tip, i hadn't notice that, and it is a possible answer for me to better organize my work. But when you enter https://observablehq.com/@enjalot/us-county-datasets?collection=@observablehq/maps https://observablehq.com/@enjalot/us-county-datasets?collection=@observablehq/elections there is no obvious clue for the reader where he is. If the collection parameter in the url points to an ordered collection, it is a little bit clearer, but you don't get there is actually, maybe, a deeper hierarchy.

I like to tell apart the designer/author point of view and the reader point of view. As a designer, i'd like to publish a "book" (a tutorial, a curriculum...). As a reader, entering the book via a particular node, i'd like to get a sense of the whole content, where i am exactly, how to go on with my exploring tomorrow.

I am coming from the R universe where it is quite common to organize multiple documents in a "book" like https://r4ds.had.co.nz/

A possible implementation 1) create a specific observable notebook with only one markdown cell that defines a tree/TOC, with subtopics linking to separate Observable notebooks 2) tag it as a "book table of contents" 3) then allow the reader to call a child notebook with a book= parameter. In that configuration, the TOC would appear as a navigation widget on the left. It would be symetric to the Visual dataflow widget that appears on the right, but operating on a diffrent logical level. It may contain a search field, allowing to search the whole book (as in https://r4ds.had.co.nz/)

Of course, 1) could be replaced by an automatic mechanism analyzing a collection of collections and generating the whole TOC

Benefits Publish, when needed, more structured contents on Observable platform, help readers and learners find their way