Docs: clarify varSelectInput() purpose and fix typo#4391
Draft
samuelbharti wants to merge 1 commit into
Draft
Conversation
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
c763970 to
fc234f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 makeselectInput()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 plainselectInput()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 existingselectize.jsparagraph.devtools::check()passes.