Hi All,
I’ve had some troubling behavior a few times tonight and I cannot figure out what is going on, though I suspect it may be related to recently adding HTL to the notebook. Basically, sometimes without even making changes aside from switching back from safe mode, many of my notebook cells will fail to render and instead just appear white, with no error messages in the notebook or the console.
I have been working in this notebook for months without issues. Admittedly this notebook has a LOT of cells. I exported to VSCode once and there were over 6k lines of code – I am sure there are more now. (There is a reason we have so much code in an Observable Notebook though I’d be happy to put some functions into a second notebook and import, just haven’t had any down time to do that) Recently, I decided I wanted to start using Hypertext Literal in the notebook because I love being able to write event listeners inline with the HTML. Given the size of the notebook though, I couldn’t just switch all of the regular html already written over to HTL, so I brought the HTL module in namespaced as htl so that I could still have traditional html<>
blocks along with htl.html<>
blocks.
All three times the white cells appeared, I was working on the cell in which I’m using HTL. The first time I resolved it by reverting to an earlier version I found that worked using history. The second time I tried history again to no avail, and ultimately solved it by removing the HTL import and converting the HTL in that cell to HTML. I was then able to add the HTL back without problems. (The first revert did not go so far back that the HTL module was no longer in the notebook.) The third time the white cells occurred after switching back from safe mode in the same browser tab when I hadn’t touched any code in safe more – I had just searched. (I may have had safe mode open in other browser tabs when the first two instances occurred, also dev tools was likely open). I tried the fix from the second time which didn’t work, but once I commented out the code in the cell entirely and just returned true in its place (i.e. went from viewof myCell = {//code with HTML or HTL here} to myCell = true then things returned to normal and I was once again able to add the HTL import and HTL code in the cell and things work find again.
Does anyone have any ideas about what may be causing this?
Unfortunately I can’t share the notebook but I’m attaching some screenshots of the problem and normal behavior as well as of the cell with the HTL content