WIP: stub of Living Papers preview pane in TEE#44
Open
geoffreylitt wants to merge 1 commit into
Open
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. |
Contributor
|
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. |
pvh
reviewed
Apr 27, 2024
| // 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}`); |
pvh
reviewed
Apr 27, 2024
| // "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`; |
Member
There was a problem hiding this comment.
Clemens' universal-automerge-cache strategy could come in handy here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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