You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "kinow (via GitHub)" <gi...@apache.org> on 2023/02/05 18:00:12 UTC

[GitHub] [jena-site] kinow opened a new pull request, #144: Create an automatic Table of Contents, position it as a sidebar (larg…

kinow opened a new pull request, #144:
URL: https://github.com/apache/jena-site/pull/144

   …e screen) or at the top of page (smaller than large screen)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jena-site] kinow commented on pull request #144: Create an automatic Table of Contents, position it as a sidebar (larg…

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow commented on PR #144:
URL: https://github.com/apache/jena-site/pull/144#issuecomment-1418213594

   This PR also fixes two issues with the layout.
   
   The first when a block code was really long and would push the rest of the content (before non, now a sidebar with the ToC) over the visible viewport area:
   
   ![image](https://user-images.githubusercontent.com/304786/216838054-7112fa92-5c7a-498b-9a2d-232f36c911ca.png)
   
   Versus now (fixed with `white-space: break-spaces;`):
   
   ![image](https://user-images.githubusercontent.com/304786/216838345-eabefde5-2d5d-4b28-9013-41ba00d809f9.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jena-site] kinow commented on pull request #144: Create an automatic Table of Contents, position it as a sidebar (large screen) or at the top of page (smaller than large screen)

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow commented on PR #144:
URL: https://github.com/apache/jena-site/pull/144#issuecomment-1426857323

   Hi @afs, not a problem! I imagined you'd be busy but wanted to ask your review as I remember during the port to Hugo you worked on the existing table of contents, and might have some feedback.
   
   >I tries it out quickly and it looks good. Some pages need further refinement because they have a TOC for the area (e.g. http://localhost:1313/documentation/io/).
   
   Ah, good catch. So that page has internal and external links. Instead of deleting everything, I removed the local ones (to give users a single behavior for internal links, i.e. use the ToC at the sidebar or top menu if mobile) but left the external links as a suggestion. Here's a screenshot of what I did:
   
   ![image](https://user-images.githubusercontent.com/304786/218276812-e5338d8a-c178-49f7-b4ca-9ac4d4418a1a.png)
   
   I started going through the entries in the top menu, and found in the Fuseki page a mix of internal and external links that seems to be intentionally organized for users to follow.
   
   ![image](https://user-images.githubusercontent.com/304786/218276919-d23ab55f-9674-4d9b-8e2a-ae5a32c14431.png)
   
   Removing the internal links and leaving the rest wouldn't be really helpful, I think. Let me think about this one before merging or doing any other changes…
   
   Thanks for the review!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jena-site] kinow commented on pull request #144: Create an automatic Table of Contents, position it as a sidebar (large screen) or at the top of page (smaller than large screen)

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow commented on PR #144:
URL: https://github.com/apache/jena-site/pull/144#issuecomment-1426703335

   Ping @afs . If that's OK I will merge this one this week. I want to suggest one improvement built on top of this, and also fix a JavaScript error :+1: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jena-site] kinow commented on pull request #144: Create an automatic Table of Contents, position it as a sidebar (larg…

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow commented on PR #144:
URL: https://github.com/apache/jena-site/pull/144#issuecomment-1418207150

   This also removes the previous Jekyll toc (I think it came from Jekyll?) from some pages, like the Query Builder. Here's [the current page](https://jena.apache.org/documentation/extras/querybuilder/index.html):
   
   ![image](https://user-images.githubusercontent.com/304786/216837615-163debde-0884-4374-9d7f-1e02ef077c3b.png)
   
   Versus now:
   
   ![image](https://user-images.githubusercontent.com/304786/216837664-386afa2e-3f7e-4bea-9037-a19344db91d1.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jena-site] kinow commented on a diff in pull request #144: Create an automatic Table of Contents, position it as a sidebar (larg…

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow commented on code in PR #144:
URL: https://github.com/apache/jena-site/pull/144#discussion_r1096778461


##########
layouts/_default/single.html:
##########
@@ -1,3 +1,15 @@
 {{ define "main" }}
-	{{ .Content }}
+<main class="d-flex flex-xl-row flex-column">
+  <aside class="text-muted align-self-start mb-3 px-2 d-xl-none d-block">
+    <h2 class="h6 my-2">On this page</h2>
+    {{ .TableOfContents }}
+  </aside>

Review Comment:
   This one is displayed when the viewport is not extra large (because of the `d-xl-none`).



##########
source/tutorials/rdf_api.md:
##########
@@ -29,26 +29,7 @@ model.</p>
 all the examples used in this tutorial can be downloaded from
 <a href="//jena.apache.org/download/index.cgi"><code>jena.apache.org/download/index.cgi</code></a>.</p>
 
-<p></p>
-
-<h2>Table of Contents</h2>
-<ol>
-  <li><a href="#ch-Introduction">Introduction</a></li>
-  <li><a href="#ch-Statements">Statements</a></li>
-  <li><a href="#ch-Writing-RDF">Writing RDF</a></li>
-  <li><a href="#ch-Reading-RDF">Reading RDF</a></li>
-  <li><a href="#ch-Prefixes">Controlling Prefixes</a></li>
-  <li><a href="#ch-Jena-RDF-Packages">Jena RDF Packages</a></li>
-  <li><a href="#ch-Navigating-a-Model">Navigating a Model</a></li>
-  <li><a href="#ch-Querying-a-Model">Querying a Model</a></li>
-  <li><a href="#ch-Operations-on-Models">Operations on Models</a></li>
-  <li><a href="#ch-Containers">Containers</a></li>
-  <li><a href="#ch-More-about-Literals-and-Datatypes">More about Literals and
-    Datatypes</a></li>
-  <li><a href="#ch-Glossary">Glossary</a></li>
-</ol>
-
-<h2><a id="ch-Introduction">Introduction</a></h2>
+## Introduction {# id="ch-Introduction" }

Review Comment:
   This was the only annoying part of this issue (otherwise I would have submitted it on Saturday). Hugo's `TableOfContents` doesn't appear to work with HTML tags, only when you use Markdown (it uses Goldmark library to traverse an AST, but I assume it's a Markdown ASF? :confused: Didn't investigate much).
   
   Only learned how to specify an ID today from [this comment in an issue](https://github.com/gohugoio/hugo/issues/8383#issuecomment-821996828).



##########
layouts/_default/single.html:
##########
@@ -1,3 +1,15 @@
 {{ define "main" }}
-	{{ .Content }}
+<main class="d-flex flex-xl-row flex-column">
+  <aside class="text-muted align-self-start mb-3 px-2 d-xl-none d-block">
+    <h2 class="h6 my-2">On this page</h2>
+    {{ .TableOfContents }}
+  </aside>
+  <article class="flex-column me-lg-4">
+    {{ .Content }}
+  </article>
+  <aside class="text-muted align-self-start mb-3 mb-xl-5 px-2 d-none d-xl-flex flex-column sticky-top">

Review Comment:
   And this one is displayed only when the viewport is large (because of the `d-none d-xl-flex` combination).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jena-site] kinow merged pull request #144: Create an automatic Table of Contents, position it as a sidebar (large screen) or at the top of page (smaller than large screen)

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow merged PR #144:
URL: https://github.com/apache/jena-site/pull/144


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jena-site] kinow commented on pull request #144: Create an automatic Table of Contents, position it as a sidebar (large screen) or at the top of page (smaller than large screen)

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow commented on PR #144:
URL: https://github.com/apache/jena-site/pull/144#issuecomment-1426877857

   Ah, luckily that Fuseki page is the only one that I found with a table of contents that was not easy to remove (because it only had links within the same page) or replace by a list of external links (because it had only one or two external links at the end of the list).
   
   I will leave the Fuseki page as-is, and we can decide what to do about that later. LGTM! :tada: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jena-site] afs commented on pull request #144: Create an automatic Table of Contents, position it as a sidebar (large screen) or at the top of page (smaller than large screen)

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on PR #144:
URL: https://github.com/apache/jena-site/pull/144#issuecomment-1426830553

   Sorry for the delay. This week has been busy with W3C RDF star work translating SPARQL document to the current W3C specification criteria.
   
   I tries it out quickly and it looks good. Some pages need further refinement because they have a TOC for the area (e.g. http://localhost:1313/documentation/io/).
   
   When the site is ready, let's ask for wider review across a range of devices and screen sizes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org