Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable export #108

Open
vladdu opened this issue Aug 15, 2018 · 6 comments
Open

Configurable export #108

vladdu opened this issue Aug 15, 2018 · 6 comments

Comments

@vladdu
Copy link

vladdu commented Aug 15, 2018

It would be nice if as an user I could define a template to use to export the tree as. For example:

  • as HTML, unstructured (except whatever the contents of the cards has)
  • as structured HTML (enclose nodes including their children in
    s, so that with some JS one could expand/compress them)
  • as simple text (exists already)

A template could have some simple markup to indicate where the node's content is inserted, together with some logical conditions to associate a certain chunk with a category of nodes. This would need more thought, of course.

If I knew Elm, I could help. Maybe I will learn it, but I have a long list of things to do....

@AdrianoFerrari
Copy link
Contributor

AdrianoFerrari commented Aug 15, 2018

Thanks for the input, Vlad!

For when I get to adding more export options (like this and others), it'd be helpful to have concrete examples of what you'd want to be able to do. Exporting as structured to enable expand/collapse is one concrete example.

Could you clarify "together with some logical conditions to associate a certain chunk with a category of nodes"?

@vladdu
Copy link
Author

vladdu commented Aug 15, 2018

The simple way to define a structured html is to associate "

{{content}}
" to each node, where {{content}} is replaced by the actual content followed by the children, using the same pattern for each node.

For a more complex example, one might want

for first level,
for the second and
for the rest. Then there has to be some way to declare what to use where.

Another example is to output it in a format suitable for online slideshow presentations (different tools have slightly different formats). I think this would be a good selling point for Gingko.

I only have a fuzzy idea about this, and I was aware that it won't be a high priority (which is ok for me), so I wanted to make a note and when you get to it (or when I learn Elm), we can discuss further.

Of course, it would be completely acceptable to have a few hardcoded variants, and let people reformat them manually. Maybe they will require more flexibility, maybe they won't. This is much easier to implement.

@AdrianoFerrari
Copy link
Contributor

Thanks for adding more details.

Have you had a look at the way the online version works for this?
There's an "Advanced" section that allows you to specify what to prepend and append to each child:
screenshot_2018-08-15_17-52-18

Something similar, but also having the option to render each card nested into its parents (instead of in a list), might be enough flexibility to start with.

Will give it more thought, but feel free to add more examples and concrete use cases.

(PS: Slide show is an option already on online, using "Presentation (impress.js)"...)

@vladdu
Copy link
Author

vladdu commented Aug 16, 2018

I haven't noticed the advanced settings there. That would be good enough - but even nicer to be able to save different settings, so that the user doesn't have to copy and paste them every time there is a change. I think even my more advanced examples can be handled by adding a marker in the provided snippets where the depth level of the card can be inserted (for example class="{{depth}}"), then the right CSS can do whatever needed.

Also, it might be useful to add some HTML before and after everything.

@SquidLord
Copy link

And while we are on this particular usage case (varying exports), it would be good to have all of the online versions' export options plus "export only the leaf nodes," for those times when you're doing something like the snowflake development format and all of the things higher in the hierarchy don't need to be in the document. Only the things down at the end of the branches need to be in the document.

It would need to be a toggle/switch, since you would probably want to combine that with either "whole tree" or "current card and sub cards", but I have definitely been in situations where that would be the tool to have.

@MajorMajorMajorMajor
Copy link

For me, the most important part would be to allow export in a nested fashion, i.e. all cards from Column 1 are unindented, cards from Column 2 are indented once, cards from Column 3 indented twice, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants