-
Notifications
You must be signed in to change notification settings - Fork 794
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
TINKERPOP-1447 Add some JavaScript intelligence to the documentation so that comments and output are not copied in a copy paste #766
Conversation
docs/preprocessor/preprocess-file.sh
Outdated
@@ -139,7 +140,7 @@ if [ ! ${SKIP} ] && [ $(grep -c '^\[gremlin' ${input}) -gt 0 ]; then | |||
${lb} awk -f ${AWK_SCRIPTS}/language-variants.awk > ${output} | |||
|
|||
ps=(${PIPESTATUS[@]}) | |||
for i in {0..6}; do | |||
for i in {0..7}; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not able to follow why this is a loop from 0 to 7... can we include a comment or move 7
to a constant with a name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha, it should actually be 0 to 9, as it checks to exit code for each program in the pipe chain. Not sure when that went out of sync, but I'll fix it.
07cb6a3
to
bac969c
Compare
What about for those of us unable to build it?
|
Hmm, this was another ticket and should be solved in this branch as I rebased it after the latest release. |
@dkuppitz I did see that. There was a dep added to the image. I have that rebuilding now. Will let you know the results. |
Just what I was afraid of... the tabs look just like they do in the screenshots. And I don't mean that in a good way 😄 Seriously, this is fantastic. Multi-line works too. My issues:
It's also interesting in that we can now see what's rendered via console vs. hardcoded. Might need to revisit some of these sections and test for correctness. BTW, rebuilding the base image did the trick. Alternatively, it looks like I could have just installed |
@robertdale I like the look :) Do you want to give it a try and tweak the CSS? I just took it from here, changed some colors and that's it. Maybe I just like the current look, because it just worked and I didn't have to mess too much with the CSS stuff.
Not related to this PR, but you're right. That seems to be related to an AsciiDoc update as the blocks no longer react on mouse events. I guess we should just change the WARNING text accordingly. |
@dkuppitz my css skills are close to nil. what little i did play with it, i'm not sure it looks any better. and in the course of doing so, I've grown accustomed to it. In any case, one outstanding issue it the |
@dkuppitz I pushed a CTR fix for invisibility to tp32/master. This fixes the screen from being rendered to 9999 pixels wide. It didn't help the code block language popup though. |
In the 'Console' tab, muli-line statements work. They have the |
Excellent! |
I saw some problems using docker above to generate docs....is that still an issue? I'm getting this:
I get the same error before and after deleting docker images. |
Try rebuilding the docker images using master. |
Hmm.. there doesn't seem to be much difference. Are you deleting both the hadoop and base images? |
i deleted both when i did it, but i didn't rebuild from master - i built from this branch i guess |
I rebuilt my containers using this branch and |
tried again using images from this branch and died the same way. so weird when stuff like this happens with docker. |
@spmallette did you save your console log? |
don't have any of that stuff from my last attempt. what are you looking for exactly? i could fire it up again.... |
@spmallette delete all of your images and then rebuild everything with |
I'm posting this to all open PRs of current relevance - this PR needs to be rebased against the branch it is targeted against given a broken python dependency that was published to pypi a day or so ago. I've pushed a fix on tp32 and master at this point and David Brown is working on getting an issue raised with the project that initiated the problem. |
bca37a8
to
6c0b14c
Compare
wow - thanks to @robertdale with 34f924e because i can finally generate these docs with docker. i guess the question now is whether we rush to immediately look to merge this or push off until next release. i kinda feel like we should do the latter and not be hasty. I'd like some time to put in some other code in certain places and play around with it a bit before we get this on to a release branch and i don't know that i will have time for such things between now and first week of april when 3.2.8/3.3.2 are going out the door. any thoughts to the contrary? |
I have no problem pushing it off. It's unlikely that any other PR is going to affect the changes in this PR, so rebasing should be a no-brainer at any time. |
I was hoping to see us merge this for next release, but now that we have to release this patch because of the groovy bug, there won't be a lot of time to do much with the cool changes you have here. I was hoping we'd be able to see at least some GLV code translation in place for an actual release. Maybe that doesn't matter, in which case I guess we can merge this. Your call in that respect. A question though about the tab system...the tabs look good with two options as shown in your screenshot, but we have Console, Groovy, Java (maybe we wouldn't do that), Python, Javascript and .NET - how does it look when we have all those? Does the tab system scale that way? |
It does scale to up to 4 tabs. Should we ever have more, we only need to tweak the maxTabs property and regenerate the CSS. |
I just generated docs locally on this branch and i didn't get the tabs - it showed radio buttons. something wrong with the stylesheet after rebase maybe? |
i guess i will try again............................................................................................................................. |
Ok - the issue is related to how the <link rel="stylesheet" href="/docs/3.2.8-SNAPSHOT/stylesheets/tabs.css" /> if that were a relative url like everything else, we'd have it. |
nice @dkuppitz - i can finally VOTE +1 🥇 better merge it through fast before someone sees a problem! 😈 |
https://issues.apache.org/jira/browse/TINKERPOP-1447
Added automatic tab generation for all evaluated code block in all docs. A random screenshot from the generated reference docs (for those who are too lazy to build the docs):
VOTE: +1