Skip to content

Docs: clarify varSelectInput() purpose and fix typo#4391

Draft
samuelbharti wants to merge 1 commit into
rstudio:mainfrom
samuelbharti:samuelbharti/review-shiny-issue-2334
Draft

Docs: clarify varSelectInput() purpose and fix typo#4391
samuelbharti wants to merge 1 commit into
rstudio:mainfrom
samuelbharti:samuelbharti/review-shiny-issue-2334

Conversation

@samuelbharti
Copy link
Copy Markdown
Contributor

Fixes #2334

Summary

varSelectInput()'s documentation didn't explain why the input exists — only that it returns a symbol. Per @jcheng5 in the issue thread, its sole purpose is to make selectInput() ergonomic for tidy-evaluation contexts (e.g. ggplot2::aes(!!input$var)) by returning a symbol directly. This PR adds a short paragraph stating that purpose up front and pointing readers to the existing "Server value" section for the mechanics, and recommends plain selectInput() when a symbol is not needed.

It also fixes a grammatical typo ("to instead of" → "instead of") in the same docstring's description of selectize.js.

No behavior changes; documentation only.

Verification

  • ?varSelectInput (or the pkgdown reference page) shows the new explanatory paragraph after the title block and before the existing selectize.js paragraph.
  • The "to instead of the basic select input element" sentence now reads "instead of the basic select input element."
  • devtools::check() passes.

Explain that `varSelectInput()` is a `selectInput()` convenience wrapper
that returns the selected column name as a symbol for use with tidy
evaluation, and use plain `selectInput()` when a symbol is not needed.
Also fix the "to instead of" -> "instead of" typo in the existing
description of selectize.js.

Fixes rstudio#2334
@samuelbharti samuelbharti force-pushed the samuelbharti/review-shiny-issue-2334 branch from c763970 to fc234f4 Compare May 28, 2026 19:49
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.

varSelectInput: typo in documentation, and would also help to make it clear why it's needed

1 participant