Skip to content

Commit 8769507

Browse files
committed
Maybe I should also take control of fig width
In local preview, they look huge.
1 parent bcb706d commit 8769507

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

vignettes/articles/pr-functions.Rmd

+12-4
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,13 @@ This creates a local branch called `formidable` and we switch to it (or "check i
136136
Let's go ahead and make the change, which is adding the word "formidable" to the `R/adjective.R` file in the package. Below is the diff and the commit associated with this change.
137137

138138
```{r, echo = FALSE}
139-
#| fig-alt: Screenshot of the RStudio Git pane showing the file
139+
#| fig-alt: >
140+
#| Screenshot of the RStudio Git pane showing the file
140141
#| R/adjective.R staged for a commit. The preview of the file
141142
#| highlights the addition of the line formidabel, with no comma
142143
#| at the end of the line. The Commit message says
143144
#| Add formidable to adjectives.
145+
#| out.width: "90%"
144146
knitr::include_graphics("img/pr-functions-diff.png", dpi = 300)
145147
```
146148

@@ -174,10 +176,12 @@ looks like the following.
174176
<!-- in local preview, I Jenny am seeing a very wide image here -->
175177

176178
```{r, echo = FALSE}
177-
#| fig-alt: A screenshot showing the diff on GitHub, with the old
179+
#| fig-alt: >
180+
#| A screenshot showing the diff on GitHub, with the old
178181
#| version of the file on the left, and the new version
179182
#| containing the newly added line formidabel, with no comma,
180183
#| on the right. There is a green button that says Create Pull Request.
184+
#| out.width: "90%"
181185
knitr::include_graphics("img/pr-functions-pull-request.png", dpi = 300)
182186
```
183187

@@ -199,19 +203,23 @@ pr_view(90)
199203
If we're lucky, and our pull request is perfect, the maintainer will accept it, a.k.a. merge it. However, in this case, the PR still needs some work. So the package maintainer leaves us comments requesting changes.
200204

201205
```{r, echo = FALSE}
202-
#| fig-alt: A screenshot of the comments section on the pull request.
206+
#| fig-alt: >
207+
#| A screenshot of the comments section on the pull request.
203208
#| A comment from a collaborator on the new line says Did
204209
#| you mean to add formidable? And can you please add a comma
205210
#| at the end? Thanks!
211+
#| out.width: "90%"
206212
knitr::include_graphics("img/pr-functions-comments.png", dpi = 300)
207213
```
208214

209215
Being somewhat new to all this, we try to address one of these comments (fix spelling) and neglect the other (forget to add the comma). We make another change and commit it.
210216

211217
```{r, echo = FALSE}
212-
#| fig-alt: A screenshot of the Rstudio Git pane, showing the changed line
218+
#| fig-alt: >
219+
#| A screenshot of the Rstudio Git pane, showing the changed line
213220
#| with formidabel changed to formidable. The file R/adjective.R
214221
#| is staged for a commit, with the commit message Fix Spelling!
222+
#| out.width: "90%"
215223
knitr::include_graphics("img/pr-functions-address-comments.png", dpi = 300)
216224
```
217225

0 commit comments

Comments
 (0)