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

Embed gifs in vignettes #1742

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ jobs:
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
error-on: '"note"'
# with:
# error-on: '"note"'
Comment on lines +77 to +78
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😬

    happy to test this out, we may revert it slows us down a lot

Originally posted by @MichaelChirico in #1621 (review)

1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Suggests:
jsonlite,
mockery,
patrick,
pkgdown,
rlang,
rmarkdown,
rstudioapi (>= 0.2),
Expand Down
File renamed without changes
Binary file modified man/figures/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/emacs.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added man/figures/sublime.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/vim-syntastic.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
45 changes: 21 additions & 24 deletions vignettes/editors.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,18 @@ vignette: >
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
comment = "#>",
out.width = "100%"
)

maybe_still <- function(url) {
if (pkgdown::in_pkgdown()) {
url
} else {
gsub("\\.gif$", "-still.gif", url)
}
}
```

```{r, echo = FALSE, results = 'asis'}
if (!pkgdown::in_pkgdown()) {
cat(
"Note: This vignette is best viewed [online](https://lintr.r-lib.org/articles/editors.html),",
"where we can render full animations of editor flows.\n"
)
}
```

## RStudio

lintr lints are automatically displayed in the RStudio Markers pane (RStudio versions \> v0.99.206).

![RStudio Example](rstudio.png "Rstudio Example")
```{r, echo=FALSE, fig.cap="RStudio Example"}
knitr::include_graphics("../man/figures/rstudio.png")
```

In order to show the "Markers" pane in RStudio: Menu "Tools" -\> "Global Options...", a window with title "Options" will pop up.
In that window: click "Code" on the left; click "Diagnostics" tab; check "Show diagnostics for R".
Expand All @@ -50,7 +36,10 @@ These are easy to remember as you are Alt+Shift+L(int) ;)
## Emacs

lintr has [built-in integration](http://www.flycheck.org/en/latest/languages.html#r) with [flycheck](https://github.com/flycheck/flycheck) versions greater than `0.23`.
![Emacs Example](`r maybe_still("emacs.gif")` "Emacs Example")

```{r, echo=FALSE, fig.cap="Emacs Example"}
knitr::include_graphics("../man/figures/emacs.gif")
```

### Installation

Expand All @@ -67,7 +56,9 @@ e.g. using a different line length cutoff.

lintr can be integrated with [syntastic](https://github.com/vim-syntastic/syntastic) for on-the-fly linting.

![Vim Example](`r maybe_still("vim-syntastic.gif")` "Vim Example")
```{r, echo=FALSE, fig.cap="Vim Example"}
knitr::include_graphics("../man/figures/vim-syntastic.gif")
```

### Installation

Expand Down Expand Up @@ -131,7 +122,9 @@ endif

lintr can be integrated with [Sublime Linter](https://github.com/SublimeLinter/SublimeLinter) for on-the-fly linting.

![Sublime Example](`r maybe_still("sublime.gif")` "Sublime Example")
```{r, echo=FALSE, fig.cap="Sublime Example"}
knitr::include_graphics("../man/figures/sublime.gif")
```

### Installation

Expand Down Expand Up @@ -159,7 +152,9 @@ In the SublimeLinter User Settings

lintr can be integrated with [Linter](https://github.com/steelbrain/linter) for on the fly linting.

![Atom Example](atom.png "Atom Example")
```{r, echo=FALSE, fig.cap="Atom Example"}
knitr::include_graphics("../man/figures/atom.png")
```

### Installation

Expand All @@ -175,7 +170,9 @@ For more information and bug reports see [Atom linter-lintr](https://github.com/

In Visual Studio Code, [vscode-R](https://github.com/REditorSupport/vscode-R#r-extension-for-visual-studio-code) presents the lintr diagnostics from [languageserver](https://github.com/REditorSupport/languageserver).

![VS Code Example](vscode.png "VS Code Example")
```{r, echo=FALSE, fig.cap="VS Code Example"}
knitr::include_graphics("../man/figures/vscode.png")
```

### Installation

Expand Down
Binary file removed vignettes/emacs-still.gif
Binary file not shown.
Binary file removed vignettes/emacs.gif
Binary file not shown.
Binary file removed vignettes/sublime-still.gif
Binary file not shown.
Binary file removed vignettes/sublime.gif
Binary file not shown.
Binary file removed vignettes/vim-syntastic-still.gif
Binary file not shown.
Binary file removed vignettes/vim-syntastic.gif
Binary file not shown.