Open bnmnetp opened 1 year ago
Videos are visible, as of d18da94eb8a11d32b1591875567ac75e42087853. Needs work on sizing (it appears). Thanks to @bnmnetp for rapid testing ont his one.
@siefkenj -- I see the problem.
startup: {
/* Mathjax typesetting operation is under the control of React */
typeset: false,
In a non react build we have this block
startup: {
pageReady() {
return MathJax.startup.defaultPageReady().then(function () {
console.log("in ready function");
rsMathReady();
}
)}
},
If rsMathReady() is not called then my system to queue up and handle all of the different blocks does not work because I'm waiting on a promise that ensures that MathJax is both loaded and ready to handle additional requests for rendering.
@bnmnetp As of https://github.com/siefkenj/pretext-react/pull/39 rsMathReady
should now be called.
I also added the pencil icon and the Runestone menu.
At the moment the scratchpad is very much a hack and I expect it's quite fragile. I mirrored the code in https://github.com/RunestoneInteractive/RunestoneComponents/blob/229cbf85e6fbda03adaf487397aef25b944d00d8/webpack.index.js#L157 but that code seems to reference global variables and whatnot. Also, I don't have access to runestone_import
, so I cannot wait like your code can...
You can see what I did here: https://github.com/siefkenj/pretext-react/blob/4565b374666014e3458eed938f07365deb0eb529/src/state-management/redux-slices/runestone/runestone-slice.ts#L96
@siefkenj -- Very cool! You can see that build on a runestone server here: http://dev.runestone.academy
For decorating the TOC
The endpoint is /ns/logging/getAllCompletionStatus
This will return JSON which is an array of objects
[
{ chapterName: chapter_id,
subChapterName, sub_chapter_id,
completionStatus: intstatus
endDate: adate
},
.....
]
I think the main thing for you is that the subChapterName key will match the html file in the a
tag sans the .html
This should only be called when the user is logged in eBookConfig.isLoggedIn === true
If the user is not logged in it will return a 401.
corrections: /ns/logger/getAllCompletionStatus
subChapterName
is the page id. chapterName
can be ignored. completionStatus
= -1 if unstarted, 0 if uncomplete, and 1 if complete
Tagging: @rbeezer @siefkenj