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

Fix documentation typos #49

Merged
merged 4 commits into from
Sep 12, 2024
Merged
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
6 changes: 6 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ shinytest2::test_app("tests/test_dashboard")
# For code styling
styler::style_pkg()
lintr::lint_package()

# To check for typos
spelling::spell_check_package()

# and if needed
spelling::update_wordlist()
```

If you get a lot of lintr errors, particularly around things not being defined, make sure to load the package first using Ctrl-Shft-L or `devtools::load_all(".")`, then run again. There's a known issue with lintr not picking up on bindings until packages are loaded.
Expand Down
8 changes: 5 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: dfeshiny
Title: DfE R-Shiny Standards
Version: 0.4.1
Title: DfE R Shiny Standards
Version: 0.4.1.9000
Authors@R: c(
person("Rich", "Bielby", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-9070-9969")),
Expand All @@ -27,7 +27,8 @@ Suggests:
rmarkdown,
shinytest2,
devtools,
testthat (>= 3.0.0)
testthat (>= 3.0.0),
spelling
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Expand All @@ -38,3 +39,4 @@ VignetteBuilder: knitr
Depends:
R (>= 2.10)
LazyData: true
Language: en-US
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# dfeshiny (development version)

# dfeshiny 0.4.1

* Fix bug in `external_link()` where visually hidden text was not visually
Expand Down
2 changes: 1 addition & 1 deletion R/cookies.R
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ Shiny.addCustomMessageHandler('analytics-consent', function(msg){
#' "ABCDE12345"
#'
#' @family cookies
#' @return a html div, containing standard cookises content for a public R
#' @return a HTML div, containing standard cookies content for a public R
#' Shiny dashboard in DfE
#' @export
#' @inherit cookies examples
Expand Down
4 changes: 2 additions & 2 deletions R/custom_disconnect_message.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#'
#'
#' @description
#' Create the html overlay panel to appear when RSConnect disconnects
#' Create the HTML overlay panel to appear when RSConnect disconnects
#'
#' @param refresh the text to appear that will refresh the page when clicked
#' @param links A list of mirrors or alternative links to the dashboard
Expand All @@ -12,7 +12,7 @@
#'
#' @importFrom htmltools tags tagList
#'
#' @return A html overlay panel that appears when RSConnect disconnects for a
#' @return A HTML overlay panel that appears when RSConnect disconnects for a
#' public R Shiny dashboard in DfE
#' @export
#'
Expand Down
8 changes: 4 additions & 4 deletions R/external_link.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' to warn users of the behaviour.
#'
#' This also adds "This link opens in a new tab" as a visually hidden span
#' element within the html outputted to warn non-visual users of the behaviour.
#' element within the HTML outputted to warn non-visual users of the behaviour.
#'
#' The function will error if you end with a full stop, give a warning for
#' particularly short link text and will automatically trim any leading or
Expand All @@ -33,7 +33,7 @@
#' * [Government digital services guidelines on the use of links](
#' https://design-system.service.gov.uk/styles/links/)
#'
#' * [Anchor tag html element and its properties](
#' * [Anchor tag HTML element and its properties](
#' https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
#'
#' * [WCAG 2.2 success criteria 2.4.4: Link Purpose (In Context)](
Expand Down Expand Up @@ -86,14 +86,14 @@
#' shiny::tags$li(
#' external_link(
#' "https://www.python.org/",
#' "Python documenation",
#' "Python documentation",
#' add_warning = FALSE
#' )
#' ),
#' shiny::tags$li(
#' external_link(
#' "https://nextjs.org/",
#' "Next.js documenation",
#' "Next.js documentation",
#' add_warning = FALSE
#' )
#' )
Expand Down
2 changes: 1 addition & 1 deletion R/support_panel.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' Explore Education Statistics)
#' @param form_url URL for a feedback form for the dashboard
#'
#' @return a html div, containing standard support content for a public R Shiny
#' @return a HTML div, containing standard support content for a public R Shiny
#' dashboard in DfE
#' @export
#'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ If this works, then you will need to look for where that "GITHUB_PAT" variable i
For analytics to function on your dashboard, you will need to:

- request a Google Analytics key from the [explore education statisics platforms team](mailto:[email protected])
- create a html file with the javascript required for your dashboard to connect to Google Analytics
- create a HTML file with the javascript required for your dashboard to connect to Google Analytics
- add the line: `tags$head(includeHTML(("google-analytics.html"))),` to the ui.R file.

To create the latter, we provide the function `dfeshiny::init_analytics()`. You should run this code from the R console providing your Google Analytics code as follows (replacing `ABCDE12345` with the code obtained from the [explore education statistics platforms]([email protected]) team):
Expand Down
36 changes: 36 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
ABCDE
Analytics
CMD
Codecov
DfE
GDS
Lifecycle
README
RSConnect
UI
WCAG
analytics
authorisation
behaviour
customised
dfe
ees
favicons
grey
init
javascript
js
lockfile
md
navlistPanel
pkgdown
renv
repo
standardised
statisics
styler
tabPanel
tabnabbing
ui
uk
www
2 changes: 1 addition & 1 deletion man/cookies_panel_ui.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/custom_disconnect_message.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/external_link.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/support_panel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions tests/spelling.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if (requireNamespace("spelling", quietly = TRUE)) {
spelling::spell_check_test(
vignettes = TRUE, error = FALSE,
skip_on_cran = TRUE
)
}
2 changes: 1 addition & 1 deletion tests/testthat/test-init_analytics.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test_that("Numeric throws error", {
expect_error(init_analytics(1234567890))
})

test_that("GA key pulls into html", {
test_that("GA key pulls into HTML", {
output <- capture.output(init_analytics("TESTYTESTY", create_file = FALSE))

# Expect the id to pull through on line 15
Expand Down