Skip to content
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

Optimize and restructure the backend #118

Merged
merged 11 commits into from
Dec 13, 2023
Merged

Optimize and restructure the backend #118

merged 11 commits into from
Dec 13, 2023

Conversation

coatless
Copy link
Owner

@coatless coatless commented Dec 8, 2023

In this PR, we work towards achieving the second goal of #93

Specifically, we sunset the webr-init.html file in favor of two separate template files:

  1. qwebr-styling.css: The extension style data (minus the external dependencies on monaco and fontawesome)
  2. qwebr-init.js: The initialization routine for splicing in the webR status indicator and bringing webR online.

We are also no longer replicating out the function definition of executeCode() each time we have an interactive or output cell on the page. Instead, we now have multiple subfunctions defined once inside of the qwebr-compute-engine.js.

Similar improvements have been made regarding initializing the monaco editor. The initialization routine for each Monaco Editor is now contained within qwebr-monaco-editor-element.js.

HTML elements for the interactive and non-interactive areas have been shifted fully over to JS code. This allows us to move the cell selection out of the Lua filter and into JS.


TODO

  1. Establish a promise with respect to the webR initialization that the compute engine can be wrapped around.
  2. Work on providing a call order.

webr-init.html ->
CSS styles to qwebr-styling.css
JS initialization to qwebr-init.js
@coatless coatless marked this pull request as draft December 8, 2023 11:00
@coatless coatless marked this pull request as ready for review December 12, 2023 10:15
@coatless coatless merged commit 541f610 into main Dec 13, 2023
@coatless coatless deleted the optimize-page branch December 13, 2023 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant