Skip to content

Improved examples #67

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

Merged
merged 4 commits into from
Sep 24, 2018
Merged

Improved examples #67

merged 4 commits into from
Sep 24, 2018

Conversation

gkellogg
Copy link
Member

Makes most of the changes called for in #26.

Tabbed UI could use some styling assistance.

There remain some examples which didn't make sense to use the tabular format, and in some cases, examples are interrelated (as before), but include attributes to allow them to be checked against each other.

Examples do not include graphical images representing the equivalent graphs. These would add even more of a burden, and each would require it's own separate accessibility explanation, so doesn't seem worth it. That said, we may want to include more graphics on a case-by-case basis.

Visually, the document is somewhat shorter, but the HTML source is inflated quite a bit. I'm not in favor of splitting the document into multiple parts, regardless.

… compacting and turning into RDF (both tabular, Turtle/TriG representations).

Fixes #26.
@azaroth42
Copy link
Contributor

Does the Preview / Diff happen automagically somehow? Should I wait for it to appear?

@gkellogg
Copy link
Member Author

gkellogg commented Sep 21, 2018

It’s supposed to happen automatically, and may still. You can always see it with rawgit.

@gkellogg
Copy link
Member Author

We may want to consider styling for print, which could expand all parts of the examples, and add some sub-example headers.

@gkellogg gkellogg mentioned this pull request Sep 23, 2018
@iherman
Copy link
Member

iherman commented Sep 24, 2018

I am not sure why the preview does not work. In any case

https://rawgit.com/w3c/json-ld-syntax/improved-examples/index.html

is the right rawgit reference

Copy link
Member

@iherman iherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it a lot!

I wonder whether there is a way to force a colored syntax output for the expanded form and for Turtle. While this may be available in JSON I however doubt that there is a syntax coloring tool for Turtle, though...

@gkellogg
Copy link
Member Author

S when we add comments or emphasis, we need to turn off the syntax highlighting.

@BigBlueHat
Copy link
Member

@gkellogg this looks great, thank you!

@iherman I filed an issue for supporting Turtle highlighting back in 2017. It seems Respec uses highlight.js which (still) lacks a Turtle highlighter. If we make one for highlight.js, then Respec can integrate that.

Copy link
Member

@BigBlueHat BigBlueHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

@azaroth42 azaroth42 merged commit 91bce75 into master Sep 24, 2018
@azaroth42 azaroth42 deleted the improved-examples branch September 24, 2018 16:17
@cygri
Copy link

cygri commented Mar 13, 2019

Regarding syntax highlighting for Turtle, there is a PR for highlight.js that adds Turtle and SPARQL support, but has been sitting in limbo for quite some time:
https://github.com/highlightjs/highlight.js/pull/1553/commits

@gkellogg
Copy link
Member Author

Part of the problem for us using syntax highlighting is that we markup our examples with **** and #### which is used in a data-transform to add HTML elements with CSS highlighting. This means that by the time a syntax highlighter looks at it, either it includes the **** or the HTML bits, so it won't be grammatically correct.

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

Successfully merging this pull request may close these issues.

5 participants