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

Add Drivers Manual code tabs #8

Merged

Conversation

recrwplay
Copy link
Collaborator

This adds function for the tabbed sections that you see in the Drivers Manual up to Neo4j 4.1.

Although it's similar to (and based on) the function you've already added, because of the specific structure of the asciidoc blocks that form the tabbed content, and because that is no longer used in Neo4j 4.2, I felt it was better to keep it separate from the existing function.

@ggrossetie
Copy link
Contributor

Although it's similar to (and based on) the function you've already added, because of the specific structure of the asciidoc blocks that form the tabbed content, and because that is no longer used in Neo4j 4.2, I felt it was better to keep it separate from the existing function.

I think that's fine.
Does that mean that Neo4j 4.2 is using the "standard" structure of AsciiDoc blocks?

src/js/06-code.js Outdated Show resolved Hide resolved
src/js/06-code.js Outdated Show resolved Hide resolved
src/js/06-code.js Outdated Show resolved Hide resolved
src/js/06-code.js Outdated Show resolved Hide resolved
@recrwplay
Copy link
Collaborator Author

Although it's similar to (and based on) the function you've already added, because of the specific structure of the asciidoc blocks that form the tabbed content, and because that is no longer used in Neo4j 4.2, I felt it was better to keep it separate from the existing function.

I think that's fine.
Does that mean that Neo4j 4.2 is using the "standard" structure of AsciiDoc blocks?

I don't think anything is 'standard' or 'non-standard'. What I'm referring to is the structure that is used by the drivers manual up to and including 4.1 that allows a series of blocks to be treated as the content of one tab (ie by using 'include-with-javascript` we can put all the blocks within that section under a 'JavaScript' tab), rather than using tabs for codeblocks only.

From 4.2, the single Drivers Manual, which covered .NET, Go, Java, JavaScript, Python, has been split into a manual for each language, so this tabbed content setup is not used in those manuals.

@ggrossetie
Copy link
Contributor

I don't think anything is 'standard' or 'non-standard'

I agree that's why I put quotes around "standard" but I think you got the idea. I was referring to what we are currently doing vs the slightly different/specific structure that you are using in Neo4j 4.1.

From 4.2, the single Drivers Manual, which covered .NET, Go, Java, JavaScript, Python, has been split into a manual for each language, so this tabbed content setup is not used in those manuals.

OK 👍

What I'm referring to is the structure that is used by the drivers manual up to and including 4.1 that allows a series of blocks to be treated as the content of one tab (ie by using 'include-with-javascript` we can put all the blocks within that section under a 'JavaScript' tab), rather than using tabs for codeblocks only.

Your approach is definitely more versatile and I think we should adopt it. For reference, here's another way to write tabs sets: https://docs.couchbase.com/home/contribute/tabs.html (and the associated JavaScript code: https://github.com/couchbase/docs-site/blob/master/lib/tabs-block.js)

I think we should move the code in its own file since tabs are not limited to code anymore: 06-tabs-block.js

Also, I think we need to "formalize" the syntax we want to use for tabs. We want to avoid supporting multiple syntax unless there are a very good reasons.

@recrwplay
Copy link
Collaborator Author

I agree with everything you've said 😄

Particularly in agreeing a syntax for tabs. We have this legacy usage now, so we need to keep it around while the version is supported, but it's the only current usage. It's likely that we will want to use tabs for the Neo4j Aura manual, which is coming up soon - the method in your link looks like a good candidate.

src/js/06-tabs-block.js Outdated Show resolved Hide resolved
src/js/06-tabs-block.js Outdated Show resolved Hide resolved
src/js/06-tabs-block.js Outdated Show resolved Hide resolved
@ggrossetie ggrossetie force-pushed the drivers-language-tabs branch from 372dc33 to 49dd17f Compare December 8, 2020 16:42
@ggrossetie ggrossetie merged commit 749df50 into neo4j-documentation:master Dec 8, 2020
@recrwplay
Copy link
Collaborator Author

Looks perfect now - thanks!

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

Successfully merging this pull request may close these issues.

2 participants