Feedback wanted: Collapsible JSON objects in docs? #490
Replies: 2 comments 1 reply
-
|
my feeling is not to do it -- most things to get in the way of copy and pasting etc. I think at most one "Expanded/Collapsed" option is best -- so we can mark ( _x ) sections to collapse by default (like "global" if we're talking about parts; or vice-versa; and "mnx" in nearly all cases), and then clicking on expand will expand everything -- I don't think otherwise that people are going to spend the time expanding or collapsing every little thing (we have a lot of objects!) |
Beta Was this translation helpful? Give feedback.
-
|
I agree with @mscuthbert that in its current form it gets in the way of copying the text, but if it could be done in the same way that most IDEs/text editors collapse sections where you can still select and copy the whole text then I think it improves readability and exploration. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've put together an experimental branch that changes MNX example documents to allow collapsing objects. You can click an arrow next to an object to collapse that part of the document:
Here's a web view of the branch so you can play with it yourself:
https://cdn.githubraw.com/w3c/mnx/docs-collapsible/docs/mnx-reference/examples/
Example: https://cdn.githubraw.com/w3c/mnx/docs-collapsible/docs/mnx-reference/examples/lyric-line-metadata/
This is something I've wanted to try for a while, because in theory it makes it easier to explore the example markup (hiding things you don't care about). But seeing it in action, I'm on the fence about it now.
Is this worth doing? Does it have practical benefit, or would it just clutter up the interface? It also adds a fair amount of complexity to the code (which was already a bit complex).
Beta Was this translation helpful? Give feedback.
All reactions