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

WIP - custom knit: handle xaringan::inf_mr #875

Draft
wants to merge 62 commits into
base: master
Choose a base branch
from

Conversation

ElianHugh
Copy link
Collaborator

@ElianHugh ElianHugh commented Nov 22, 2021

What problem did you solve?

Solves #796.

Both knitting and previewing xaringan slides should work as expected

(If you do not have screenshot) How can I check this pull request?

Knitting the following should work (i.e., progress bar signals completion), and closing the webview should dispose of the process.

---
title: "Test"
knit: xaringan::inf_mr
output:
  xaringan::moon_reader:
    lib_dir: libs
    nature:
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false
---

class: center, middle

# Test

### 1234


ElianHugh and others added 5 commits July 15, 2021 18:07
Use an enum to restrict the input for the setting: r.rmarkdown.codeLensCommands
Now stops the child process when the webview is closed
@ElianHugh
Copy link
Collaborator Author

i'm a little iffy on how broad the url regex should be, because i don't want it to trigger on just any url that might pop up in the output stream

renkun-ken and others added 24 commits May 12, 2022 16:29
* Rename liveshare folder to liveShare

* Rename folder
* Implement mutation observer

Observe changes in the DOM, in order to ensure urls are appropriate for  webview restrictions

* pre -> span, clean up observer method

* Refactor webview

* Refactor html into func, observe content only

* Improve docs, change URL testing

* Minor update

* Simplify regex usage

- Remove superfluous console.log
- Simplify regex usage

* (Misc) change directory

- Change webview/observer.js to session/webview/observer.js

* Fix merge conflict

* Broaden regex, bug fix

- Fix slowdown for DOMs that have many updates a second
- Fix more resource request paths

* Only test specific tags

- No need to test tags that do not typically have src values. This can be expanded if a tag is missing from the list

* Debounce mut. observer

Co-authored-by: Kun Ren <[email protected]>
* PoF accessing VSC settings

** proof of concept **

Load R-related vsc settings and set as R option

* Update getSettings.R

* Fiddle with configurations

* Setup example usage

* Write settings.json to .vscode-R folder

* Source vscode settings first

* Move import back to init, only replace ops if null

* Update package.json

* Descriptive names, move settings under categories

* Change setting names

* Load settings before attach

* Refine load_settings

* Fix

* Update viewColumn setting

Update the viewColumn item's description

* Minor typos

* Use expression mapping

* Use quote list

Co-authored-by: Kun Ren <[email protected]>
Co-authored-by: Manuel Hentschel <[email protected]>
* Fixes REditorSupport#713

Uses the match pattern for functions from the textmate R grammar

* Remove old rbox message
* Handle error in capture_str

* Simplify capture_str
* Add icons to webviews

* Use class for icon sourcing

- Use the UriIcon constructor to create icon uris

* Remove unused icon

- Removes the search.svg icon, as open-preview.svg was used instead
* background knitting (with progress bar)
* set knit working directory
* Smart knit button, use custom knit functions + rmarkdown::render_site where appropriate
- Contributes a helper function for creating disposables from objects
- Simplifies disposal of child processes
- Do not print lines to output when the process has already been terminated
- use childProcess.spawn instead of childProcess.exec, to allow for faster process termination
* Add object length limit

* Update inspect_env

* Preserve the order of names in completion
* Move R-related session files to `R/session`
* Move `getAliases.R` to `R/help`
* New file `helpServer.R` in `R/help`
* New file `knit.R` in `R/rmarkdown`
* New file `preview.R` in `R/rmarkdown`
Fixes regression with REditorSupport#781 due to a typo in requireNamespace
* Respect output format

* Fix anchor tags
Bumps [nth-check](https://github.com/fb55/nth-check) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/fb55/nth-check/releases)
- [Commits](fb55/nth-check@v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: nth-check
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
renkun-ken and others added 30 commits May 12, 2022 16:29
* Update vsc.R

*  Modify url to allow proxied requests

* Minor update

* Fix message for webview

Co-authored-by: Kun Ren <[email protected]>
* Respect cwd

* Start knit process from knitWorkingDirectory

* Refine getKnitDir

Co-authored-by: Kun Ren <[email protected]>
* browser handles file://

* No need to check before sub
…Support#815)

* Add r.session.levelOfObjectDetail=Normal for max.level=1

* Add object timeout

* Update capture_str
* Add R info to status bar item text and tooltip

* Remove attach_time and add command

* Update shareSession.ts
* get knit command from settings

* configuration option description

* Refine description

* Use a default value

* Update comment

Co-authored-by: Kun Ren <[email protected]>
* Fix package installation

* Fix typo

Co-authored-by: Kun Ren <[email protected]>
* Add support for indented Roxygen

* Exit roxygen after 2 empty lines

* Fix regex
…ditorSupport#859)

* Add backtick to list of quote characters for syntax highlighting.

* backticks denote nonstandard variable names and should therefore be coloured like variables
* Fix detecting yaml frontmatter

* Simplify condition
* Auto refresh help

* Use installed.packages to handle package updates

* Only write log when restarting help server

Co-authored-by: Kun Ren <[email protected]>
Now stops the child process when the webview is closed
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.

7 participants