These are chat archives for ractivejs/ractive

12th
May 2017
Chris Reeves
@evs-chris
May 12 2017 06:44
I've got tutorials through components done if anyone would like to sanity check them
they've been modernized and expanded where necessary
I suck at documentation and coming up with decent examples, though, so if there's something that isn't working as a learning aid, please feel free to point it out
I also have been sick for a few days, so some of the new tutorial steps may have been written under a bit of delirium :smile:
Bob Schellink
@sabob
May 12 2017 14:41
Sheesh, alot of effort was put into the docos. Great to see so many code snippets. On that note, it seems the snippets always show the templates as inline strings, which doesn't do syntax highlighting and is harder to read than placing the template into a separate snippet. Wonder if it isn't worth moving the templates into a separate snippets? It isn't possible to use actual dom for templates right? <div id="template">content</div>. But there is the <script> tag that I sometimes see. in fiddles (Sorry, I always load my templates from files so I'm often ignorant of the more basic options).
Joseph
@fskreuz
May 12 2017 14:42
You mean snippets that do this:
Ractive({
  template: `
    <div></div>
  `
})
If so, that's probably me. The goal was to make those snippets easily copy-pasted in one swoop, for cases like copying to jsfiddle or playground.
Also gives some form of cohesion when reading component/instance declarations, like "this template is specifically for this comp/inst" rather than jumping across several snippets and figuring out which one belongs to which JS.
Bob Schellink
@sabob
May 12 2017 14:47
Yep, those are the ones. Some of the bigger snippets become harder to read when mustaches and methods are communicated to the reader.
Joseph
@fskreuz
May 12 2017 14:48
Yep, they're only good for small snippets. They're horrible on larger ones (i.e. examples). But we should keep snippets small so they're easily digestible. :D
We don't want to be like plunkr, so many sections. :grin:
A good example for "small examples" is lodash docs.
Bob Schellink
@sabob
May 12 2017 15:02
Sounds good. So just to confirm, using existing dom as the template isn't possible correct?
Chris Reeves
@evs-chris
May 12 2017 15:06
That is correct. Too much happens to existing DOM to really get away with anything but the simplest templates.
Joseph
@fskreuz
May 12 2017 15:06
I am not sure if it was possible. But if it were, it would be dangerous since that DOM could mutate unexpectedly.
Chris Reeves
@evs-chris
May 12 2017 15:08
And people were getting confused as to why, for instance the each nested inside atable where only table elements are allowed, was disappearing.
Bob Schellink
@sabob
May 12 2017 15:19
Makes sense thanks.
Bob Schellink
@sabob
May 12 2017 15:26
We might want to consider flattening out some of the menus later on. For example, I'd find "api" easier to navigate if everything was in one file, with a sidebar for all the sections. Similar to Javadocs. Currently, with nested menus I don't know which menu to navigate to in order to find what I'm looking for.
Also the three menus, Concept, Integrations and Extend feels like they belong in one section called "Documentation". For me "Templates" is the most important topic, but it is hidden away under "concepts".
Chris Reeves
@evs-chris
May 12 2017 15:29
That's one of the things the 0.9 to-do list at ractivejs/ractivejs.github.io#29
Bob Schellink
@sabob
May 12 2017 15:29
Oh right, I'll try and help out as well.
Joseph
@fskreuz
May 12 2017 15:30
Was doing that on the concepts portion. Some concepts can be collapsed together. Just so much text tho. :D
Vue also does that one-page API docs. Was considering it but not really a fan of it. If you mash up all the API pages, you get one very long markdown file.
I'm not against it tho :D
Actually... We might just be able to eliminate the dropdowns entirely with that approach. One less CSS headache to worry about. :D
Bob Schellink
@sabob
May 12 2017 15:37
I hear you on the "one large file to maintain", not sure if MKDocs has an option to combine multiple smaller files into a larger one?
At runtime, that is.
Or compile time rather.
Joseph
@fskreuz
May 12 2017 15:43
I don't know of such functionality. Also, I'd like to stick to plain markdown for content. Compile tools, especially when they get outdated, is a complication we'd want to avoid.
That was the case with the home page. Updating Ractive's CDN link is a challenge since the build is broken. For that simple change, you'd have to dive into the tools, deps and config.