Skip to content

Commit

Permalink
tweak deprecate
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg committed Mar 15, 2024
1 parent 0d44cb7 commit 07278b5
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 38 deletions.
16 changes: 9 additions & 7 deletions R/f7Accordion.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
#'
#' @export
f7Accordion <- function(..., id = NULL, multiCollapse = deprecated(), side = c("right", "left")) {
lifecycle::deprecate_warn(
when = "1.1.0",
what = "f7Accordion(multiCollapse)",
details = "multiCollapse has been
removed from Framework7 and will be removed from shinyMobile
in the next release."
)
if (lifecycle::is_present(multiCollapse)) {
lifecycle::deprecate_warn(
when = "1.1.0",
what = "f7Accordion(multiCollapse)",
details = "multiCollapse has been
removed from Framework7 and will be removed from shinyMobile
in the next release."
)
}

side <- match.arg(side)
cl <- "list list-strong list-outline-ios list-dividers-ios inset-md accordion-list"
Expand Down
18 changes: 10 additions & 8 deletions R/f7Block.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,19 @@
#' @author David Granjon, \email{dgranjon@@ymail.com}
#'
#' @export
f7Block <- function(..., hairlines = TRUE, strong = FALSE, inset = FALSE,
f7Block <- function(..., hairlines = deprecated(), strong = FALSE, inset = FALSE,
tablet = FALSE, outline = FALSE) {
blockCl <- "block"

lifecycle::deprecate_warn(
when = "1.1.0",
what = "f7Block(hairlines)",
details = "hairlines has been
removed from Framework7 and will be removed from shinyMobile
in the next release."
)
if (lifecycle::is_present(hairlines)) {
lifecycle::deprecate_warn(
when = "1.1.0",
what = "f7Block(hairlines)",
details = "hairlines has been
removed from Framework7 and will be removed from shinyMobile
in the next release."
)
}

if (!inset && tablet) {
stop("inset must be TRUE when tablet is TRUE")
Expand Down
18 changes: 10 additions & 8 deletions R/f7Button.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,17 @@ updateF7Button <- function(inputId, label = NULL, color = NULL,
#'
#' @export
f7Segment <- function(
..., container = c("segment", "row"),
..., container = deprecated(),
shadow = FALSE, rounded = FALSE, strong = FALSE) {
lifecycle::deprecate_warn(
when = "1.1.0",
what = "f7Segment(container)",
details = "container has been
removed from Framework7 and will be removed from shinyMobile
in the next release."
)
if (lifecycle::is_present(subtitle)) {
lifecycle::deprecate_warn(
when = "1.1.0",
what = "f7Segment(container)",
details = "container has been
removed from Framework7 and will be removed from shinyMobile
in the next release."
)
}

containerCl <- "segmented"

Expand Down
31 changes: 22 additions & 9 deletions R/f7Navbar.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,29 @@
#' @example inst/examples/navbar/app.R
#'
#' @export
f7Navbar <- function(..., subNavbar = NULL, title = NULL, subtitle = NULL, hairline = TRUE,
shadow = TRUE, bigger = FALSE, transparent = FALSE, leftPanel = FALSE,
#' @importFrom lifecycle deprecated
f7Navbar <- function(..., subNavbar = NULL, title = NULL, subtitle = deprecated(), hairline = TRUE,
shadow = deprecated(), bigger = FALSE, transparent = FALSE, leftPanel = FALSE,
rightPanel = FALSE) {
lifecycle::deprecate_warn(
when = "1.1.0",
what = "f7Navbar(subtitle)",
details = "subtitle has been
removed from Framework7 and will be removed from shinyMobile
in the next release."
)
if (lifecycle::is_present(subtitle)) {
lifecycle::deprecate_warn(
when = "1.1.0",
what = "f7Navbar(subtitle)",
details = "subtitle has been
removed from Framework7 and will be removed from shinyMobile
in the next release."
)
}

if (lifecycle::is_present(shadow)) {
lifecycle::deprecate_warn(
when = "1.1.0",
what = "f7Navbar(shadow)",
details = "shadow has been
removed from Framework7 and will be removed from shinyMobile
in the next release."
)
}

navbarClass <- "navbar"
if (transparent) navbarClass <- sprintf("%s navbar-transparent", navbarClass)
Expand Down
2 changes: 1 addition & 1 deletion man/block.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/button.Rd

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

7 changes: 3 additions & 4 deletions man/navbar.Rd

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

0 comments on commit 07278b5

Please sign in to comment.