deprecated position arg to tabsetPanel; updated NEWS

This commit is contained in:
Barbara Borges Ribeiro
2016-04-07 22:15:15 +01:00
parent 0bdc8f0b2b
commit 1cee5d4b41
3 changed files with 27 additions and 20 deletions

13
NEWS
View File

@@ -1,5 +1,18 @@
shiny 0.13.2.9001
--------------------------------------------------------------------------------
* Added an error sanitization option: `options(shiny.sanitize.errors = TRUE)`.
To err on the side of security, the default is `TRUE` (i.e. sanitized errors,
with most error messages being generic). This changes the look of an app
when erros are printed (but the console remains the same).
* BREAKING CHANGE: The long-deprecated ability to pass a `func` argument to
many of the `render` functions has been removed.
* Added the option of passing arguments to an `xxxOutput()` function through
the corresponding `renderXXX()` function via an `outputArgs` parameter to the
latter. This is only valid for snippets of Shiny code in an interactive
`runtime: shiny` Rmd document (never for full apps, even if embedded in an
Rmd).
* Added the ability for the client browser to reconnect to a new session on
the server, by setting `session$allowReconnect(TRUE)`. This requires a

View File

@@ -607,10 +607,8 @@ tabPanel <- function(title, ..., value = title, icon = NULL) {
#' tab will be selected.
#' @param type Use "tabs" for the standard look; Use "pills" for a more plain
#' look where tabs are selected using a background fill color.
#' @param position The position of the tabs relative to the content. Valid
#' values are "above", "below", "left", and "right" (defaults to "above").
#' Note that the \code{position} argument is not valid when \code{type} is
#' "pill".
#' @param position This argument is deprecated; it has been discontinued in
#' Bootstrap 3.
#' @return A tabset that can be passed to \code{\link{mainPanel}}
#'
#' @seealso \code{\link{tabPanel}}, \code{\link{updateTabsetPanel}}
@@ -630,25 +628,23 @@ tabsetPanel <- function(...,
id = NULL,
selected = NULL,
type = c("tabs", "pills"),
position = c("above", "below", "left", "right")) {
position = NULL) {
if (!is.null(position)) {
shinyDeprecated(msg = paste("tabsetPanel: argument 'position' is deprecated;",
"it has been discontinued in Bootstrap 3."))
}
# build the tabset
tabs <- list(...)
type <- match.arg(type)
tabset <- buildTabset(tabs, paste0("nav nav-", type), NULL, id, selected)
# position the nav list and content appropriately
position <- match.arg(position)
if (position %in% c("above", "left", "right")) {
first <- tabset$navList
second <- tabset$content
} else if (position %in% c("below")) {
first <- tabset$content
second <- tabset$navList
}
# create the content
first <- tabset$navList
second <- tabset$content
# create the tab div
tags$div(class = paste("tabbable tabs-", position, sep=""), first, second)
tags$div(class = "tabbable", first, second)
}
#' Create a navigation list panel

View File

@@ -5,7 +5,7 @@
\title{Create a tabset panel}
\usage{
tabsetPanel(..., id = NULL, selected = NULL, type = c("tabs", "pills"),
position = c("above", "below", "left", "right"))
position = NULL)
}
\arguments{
\item{...}{\code{\link{tabPanel}} elements to include in the tabset}
@@ -22,10 +22,8 @@ tab will be selected.}
\item{type}{Use "tabs" for the standard look; Use "pills" for a more plain
look where tabs are selected using a background fill color.}
\item{position}{The position of the tabs relative to the content. Valid
values are "above", "below", "left", and "right" (defaults to "above").
Note that the \code{position} argument is not valid when \code{type} is
"pill".}
\item{position}{This argument is deprecated; it has been discontinued in
Bootstrap 3.}
}
\value{
A tabset that can be passed to \code{\link{mainPanel}}