pretext
pretext copied to clipboard
React / Runestone issues
- [ ] search is missing, and we want to log student searches
- [ ] Json to add new search bar and button that uses the lunr data
- [ ] Brad to provide Jason with the API call to log the search
- [ ] Runestone user menu gone
- [x] Jason to build a new Menu
- [ ] Brad to provide Jason with the list of eBookConfig attributes and the conditions that turn on/off various menu options.
- [x] no styling for Runestone components - need to whitelist or provide a prefix for all web packed stuff @done(2023-05-31 09:54 AM)
- [x] Videos are invisible -- looks like they are missing the wrapper div with runestone class
- [x] Rob will look at this.
- [x] mathJax problems with some parsons
- [x] Brad and Jason to try to figure out whats happening. Its probably a timing problem/race condition
- [ ] Not sure about Webwork and the activate button
- [ ] Need a webwork test book so we can give
- [ ] Parsons, Activecode, and CodeLens need full width
- [ ] Jason to work on the CSS
- [x] Missing pencil icon
- [x] Jason to add the icon, and provide a React wrapper as popup
- [x] Brad to point Jason to our code that creates the popups today, which appear to be broken. - I think this may be CSS prefix Related.
- [ ] Table of contents decorating
- [x] Brad to Get Jason the API call that gives the status of each TOC entry (but only down to the section level, and we are assuming we chunk at sections for Runestone)
- [ ] Cacheing issues
- [ ] activities on the page - There is a mismatch between the SPA architecture of React and the web application architecture of Runestone. eBookConfig is refreshed per page, but there is only one page in the React implementation.
- [ ] component by component things could be out of date if the page of the book was in the cache.
- [ ] Could eBookConfig move to the table of contents?
Tagging: @rbeezer @siefkenj
Videos are visible, as of d18da94eb8a11d32b1591875567ac75e42087853. Needs work on sizing (it appears). Thanks to @bnmnetp for rapid testing ont his one.
Parsons and MathJax
@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