OJS developer experience: live preview / hot reload #11746
declann
started this conversation in
Feature Requests
Replies: 1 comment 3 replies
-
Quarto needs to render the whole document to make a preview (possibly triggered by the watch input default setting). Computations needs to occur even before rendering so there are no ways around that. Observable or any raw HTML contents are different but still needs to be transformed into the AST internally to then be transformed as HTML output. I don't believe what you want here is even possible for Quarto/Pandoc. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Hi,
As a mainly JS developer using Quarto (and I love it!) I'm jealous of the developer experience available for Python/R in Quarto, Rstudio, and other tools supported by Posit - especially whenever iterating avoids full page reloads (I think this is a big part of why Notebooks and Rstudio are so popular).
In Quarto, the execution context for OJS is different versus Python/R: OJS runs in the browser, Python/R/Julia code runs in kernels (I think) that talk to Quarto during the render process. And OJS is functional and can add a tonne of value to outputs from Python/R or by itself.
But different execution contexts also means the developer experience for OJS is different.
Trying Rstudio, Positron, VSCode, I can't find any developer experience where it's possible to iterate on OJS in Quarto without full page reloads triggered by
quarto preview
. These are slow and break flow/context etc.Observable Framework shows that "live previewing" of OJS is possible, and that the OJS runtime (which Quarto uses) is suitable to support a super fast iterative developer experience for OJS.
Currently, I iterate in Observable notebooks and migrate to Quarto when things are mostly ready - but this is really inefficient; and I especially run into trouble when my target is a Quarto page with significant different layout/features versus Observable notebooks (like a Quarto dashboard or a closeread).
Observable nailed OJS DX in Framework and Observable notebooks, and I'm not under an illusion that achieving the same quality DX is a trivial task.
quarto preview
would need at least a socket server to communicate updates, and just identifying the changes to push will be a bit of work. And that doesn't account for non-OJS cells especially markdown/text updates, or how other particular environments should adapt (environment-specific changes is an alternative approach).Am I missing a way to iterate on OJS without full page reloads?
Am I missing other big challenges to do this?
Do Quarto users even want this? I suspect most are Python and R developers and don't encounter OJS DX except briefly - I'm probably unusual because I make most of my work in OJS.
Are there public developments for OJS DX such as hot reload being considered/planned? (in
quarto preview
or in environments)Imo, Quarto and OJS are great and for those developers who turn to OJS, a neat and fast DX can help them to do new and interesting things. Obviously there is a lot of people (like me) who develop in OJS outside of Quarto too.
Cheers,
Declan
Beta Was this translation helpful? Give feedback.
All reactions