-
Notifications
You must be signed in to change notification settings - Fork 21
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
WIP: stub of Living Papers preview pane in TEE #44
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for tee-production ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for tangerine-dolphin-eefe36 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Very cool. I was intrigued as to why your PDFViewer was so much simpler than mine (at https://github.com/joshuahhh/lp-viewer/blob/main/src/BuildsViewer.tsx). Memory is hazy but I think the main difference is that my version keeps an old PDF visible while a new PDF loads invisibly, so changing the document doesn't produce flickering. Something to consider if you notice that as a problem. |
// Assuming there's a function to fetch data from a URL | ||
console.log(`Fetching data for docUrl: ${docUrl}`); | ||
|
||
const buildResult = await fetch(`http://localhost:8088/build/${docUrl}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
// "pdfjs-dist/build/pdf.worker.min.js", | ||
// import.meta.url | ||
// ).toString(); | ||
pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.js`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clemens' universal-automerge-cache strategy could come in handy here.
This is a tiny preliminary sketch of a Living Papers preview pane in TEE. You can edit a Markdown doc in the left pane and see the PDF from Living Papers update live in the right pane.
All the actual work here is happening in the automerge-based LP compile process that @joshuahhh created. The goal of this PR is as an initial exploration to 1) start thinking about how a deeper integration into TEE might be shaped, in terms of UX and software composition, and 2) serve as a testbed for ongoing work to support this use case better, e.g. supporting asset import.
how to run this in local dev
other repos worth being aware of:
design issues
todos