Integrating the docs

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Re: Integrating the docs

Post by BvG » Wed Jul 17, 2013 11:17 am

In light of discussions elsewhere, I suggest the following approach to an editor:
  • Ignore that it's supposedly xml: Do not try or aim to produce xml, instead produce content that shows up correctly in the dictionary
  • Write a style guide about how content is supposed to be with examples etc. (I could possibly start that, but not this month)
  • Make sure that all fields that can, are abstracted into buttons etc, to reduce typo possibility
  • Make editing rich text, and only at the end assemble the "fake xml" file
  • Don't invest too much time to make it perfect: "barely enough" for president!
Looking at the editor that RunRevMark just uploaded, I think it'll be easiest to find a way to send a finished entry to the dictionary stack of the ide, because the one that is in that editor is outdated, and one could just as well us the rendering of bvg docu instead.

Mark Wieder, have you done any work yet? I don't really see how we can work on it together :(
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Integrating the docs

Post by mwieder » Wed Jul 17, 2013 4:55 pm

@BvG- email sent.

@runrevmark-
Here's the problem I'm up against: I'm trying to produce some documentation for the xpath/xml changes I pushed a little while ago so that they're ready to integrate. This is in two parts: new doc files for the two xpath functions; and updated docs for the functions that have new synonyms for consistency.

Note that the current files are *not* processed properly by the revXML... functions, especially in the case of the summary / example / description tags, which have embedded html and completely screw up the node processors.

htmlText <> html <> xml

For the existing functions I can take the easy route: I can just edit the existing files by hand to include the synonyms. That's easy enough with any text editor, since i just have to add/modify a small section of each file.

For the new functions, copying a similar existing file and modifying it is more work than it's worth, given the bad formatting.

I'm glad to see that the format/mechanism will change in the future, but I need to do this now. My concern is with perpetuating the existing doc paradigm. I now understand why it's been so hard to get changes implemented in the docs. It would be at the bottom of my to-do list as well.

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1207
Joined: Thu Apr 11, 2013 11:27 am

Re: Integrating the docs

Post by LCMark » Wed Jul 17, 2013 6:21 pm

Right so, there are several issues raised here and I don't really disagree with any of them - however, I'd hate to see anyone spend time on a project which might get superseded by development a little way down the line so rather than jump the gun let's see if we can come up with a plan of action.

First of all, is the docs editor I pushed today (the one we use 'in-house') sufficient for right now? It is a little flaky, but does (at least) give a preview of what docs will look like. By sufficient I mean 'able to be used by someone who wasn't involved in writing it (or have them sitting next to them)' which is essentially the situation we have in the office. If so, then hopefully that will serve for contributors needing to make small changes / add new docs for the time being (i.e. those adding engine features etc.). (I and my colleagues are in a slightly privileged position as I just send some notes to Elanor/Hanson and they sort out turning them into XML in-between their other responsibilities).

Looking to the future, then our current ideas are to present three types of documentation:
  • Reference documentation for each piece of syntax - this will sit next to the syntax descriptions in the spec files that the refactored engine will (eventually) use. The idea being it will tell you precisely what the syntax will do, and what larger effects it has.
  • Guides that explain how developers can use features to build functionality into their apps - we've started providing these, they are written in markdown.
  • Lessons that explain how to solve specific problems - these use the ScreenSteps portal.
Indeed, in terms of guides, then we're hoping to provide a guide (providing examples of usage etc.) for each new feature area we add and, hopefully over time new guides for existing functionality in much the same way (thus replacing and updating the content of the User Guide).

Right now, of course, most of the information about how things work is contained in the XML dictionary entries and (as has been pointed out) these are not in as clean a state as would be ideal. Indeed, really they should be content-oriented and not display-oriented. However, this is partly a facet of legacy. The docs XML files have been processed a couple of times to improve structure although as they originally came from a source (a stack) that was display-oriented many (if not most) will still be in that style. As far as I can see (and if my memory serves correctly), the schema for the XML files in the contributors doc is not actually complete in that the docs processor (docs_builder in builder/) actually understands far more content-oriented tags than this suggests - the aim being that the XML files would gradually be migrated from display, to a content-oriented structure.

So, several questions come out of this:
  • How many of the XML files are currently malformed? (I'm pretty sure it is not all - a cursory glance over the newly added ones today suggested that they were fine)
  • If a substantial number, is it possible to write an automated tool to fix them?
  • What is the current state of the XML schema as understood by the docs_builder and what is missing to help move docs to a more content-oriented style?
  • What is the best approach with the current XML docs we have given we are intending to move the content to a different mechanism / location in the 'not-too-distant' future?
The last one of these is perhaps the most interesting as, to be fair, there is still much discussion to be had at the best approach. It would seem sensible that the docs (when they are written into the spec files) should be similar in style to something like HeaderDoc, JavaDoc or perhaps some sort of mark-down as that is easier to read than XML in its raw form and perhaps works a little better with text merging (of the sort git uses). However, what format should this documentation content be spat out in after the spec file is processed?

XML is still a worthy contender here as it is highly amenable to processing into other formats (the current dictionary XML is processed in three ways - for dictionary display in the IDE, for display in the online docs and into XML formatting objects for printing). Assuming XML still stands out as the best format for this 'intermediary' then making sure we should make sure we have a well enough defined schema (based around a content, not display oriented format) for it that is rich enough to give a good user-experience in all the forms the reference documentation is produced. Indeed, going down this road (with the idea that uniformity is good), it might be wise that the schema be rich enough to encompass release notes, guides and (potentially) lessons from ScreenSteps. (Maybe it would be better if these were a collection of related schemas).

Beyond that, a point was raised above about a style guide - then as far as I can recall we do have an internal one which those that write docs in the office reference. However, it has yet to make it up into the contributor's guide - I'll have to ask Hanson what the state of it is.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Integrating the docs

Post by mwieder » Wed Jul 17, 2013 8:27 pm

First of all, is the docs editor I pushed today (the one we use 'in-house') sufficient for right now?
Yes, thanks for pushing that. It's a bit clunky, missing some features, and awkward in other ways, but it'll get me through the current impasse. It's nice to be able to see what the user will see as a result of the editing. It still carries forward the technical debt of the current format.

If the underlying docs mechanism isn't going to change in the immediate future then I'd suggest cleaning this up and posting it as a tool in the IDE Contributors forum so that pull requests can be issued documentation changes. But I'd rather see the new docs format implemented first (soon, please) and *then* the tool published.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Integrating the docs

Post by mwieder » Wed Jul 17, 2013 9:29 pm

One thing that isn't clear to me in the <description> section is the tags of <command>, <function>, <message>. These seem to turn into hyperlinks. Should they be the names of the .xml files or is there something else going on?

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Re: Integrating the docs

Post by BvG » Thu Jul 18, 2013 10:48 am

I motion to ignore all talk about the future that RunRevMark brought up. Mostly because those pie in the sky ideas are only relevant insofar as to not try and fix the xml issues right now, because they're going to be replaced somewhen (but not now). It's more time efficient for everyone to use the xml files as they're used now.

If on the other hand we could just dump them all and replace them with a sqlite file, I might know a tool that does exactly that within about 2 seconds of processing time for all entries ;)
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Locked

Return to “Engine Contributors”