Skip to content

Commit

Permalink
Merge branch 'f7-v8.3.2' of github.com:RinteRface/shinyMobile into f7…
Browse files Browse the repository at this point in the history
…-v8.3.2
  • Loading branch information
DivadNojnarg committed Mar 24, 2024
2 parents 7c57886 + 62a4d9c commit a299a0b
Show file tree
Hide file tree
Showing 17 changed files with 72 additions and 71 deletions.
2 changes: 1 addition & 1 deletion R/f7-inputs.R
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ updateF7Select <- function(inputId, selected = NULL,
#' @param maxlength Maximum items to select when multiple is TRUE.
#' @param virtualList Enable Virtual List for smart select if your select has a lot
#' of options. Default to FALSE.
#' @param ... Other options. See \url{https://v5.framework7.io/docs/smart-select.html#smart-select-parameters}.
#' @param ... Other options. See \url{https://framework7.io/docs/smart-select#smart-select-parameters}.
#'
#' @rdname smartselect
#'
Expand Down
4 changes: 2 additions & 2 deletions R/f7ActionSheet.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#' The currently selected button may be accessed via input$<sheet_id>_button. The value is
#' numeric. When the action sheet is closed, input$<sheet_id>_button is NULL. This is useful
#' when you want to trigger events after a specific button click.
#' @param ... Other options. See \url{https://v5.framework7.io/docs/action-sheet.html#action-sheet-parameters}.
#' @param ... Other options. See \url{https://framework7.io/docs/action-sheet#action-sheet-parameters}.
#' @param session Shiny session object.
#'
#' @rdname actionsheet
Expand Down Expand Up @@ -57,7 +57,7 @@ f7ActionSheet <- function(id, buttons, grid = FALSE, ..., session = shiny::getDe
#' @param id Unique id. This gives the state of the action sheet. input$id is TRUE
#' when opened and inversely. Importantly, if the action sheet has never been opened,
#' input$id is NULL.
#' @param options Other options. See \url{https://v5.framework7.io/docs/action-sheet.html#action-sheet-parameters}.
#' @param options Other options. See \url{https://framework7.io/docs/action-sheet#action-sheet-parameters}.
#' @param session Shiny session object.
#' @rdname actionsheet
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/f7Fab.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ updateF7Fab <- function(inputId, label = NULL,
#' Framework7 FAB morphing
#'
#' \code{f7FabMorphTarget} convert a tag into a target morphing.
#' See \url{https://v5.framework7.io/docs/floating-action-button.html#fab-morph}.
#' See \url{https://framework7.io/docs/floating-action-button#fab-morph}.
#'
#' @rdname fabs
#'
Expand Down
2 changes: 1 addition & 1 deletion R/f7List.R
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ f7ListGroup <- function(..., title) {
#'
#' @param id Unique id.
#' @param target Related list element. CSS selector like .class, #id, ...
#' @param ... Other options (see \url{https://v5.framework7.io/docs/list-index#list-index-parameters}).
#' @param ... Other options (see \url{https://framework7.io/docs/list-index#list-index-parameters}).
#' @param session Shiny session object.
#' @export
#'
Expand Down
13 changes: 6 additions & 7 deletions R/f7Page.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,25 @@
#' If a name is specified it must be accepted either by \link[gplots]{col2hex} or
#' \link{getF7Colors} (valid Framework 7 color names).
#' \item \code{pullToRefresh}: Whether to active the pull to refresh feature. Default to FALSE.
#' See \url{https://v5.framework7.io/docs/pull-to-refresh.html#examples}.
#' See \url{https://framework7.io/docs/pull-to-refresh#examples}.
#' \item \code{iosTranslucentBars}: Enable translucent effect (blur background) on navigation bars for iOS theme (on iOS devices).
#' FALSE by default.
#' }
#' Touch module options \url{https://v5.framework7.io/docs/app.html#app-parameters}:
#' Touch module options \url{https://framework7.io/docs/app#param-touch}:
#' \itemize{
#' \item \code{tapHold}: It triggers (if enabled) after a sustained, complete touch event.
#' By default it is disabled. Note, that Tap Hold is a part of built-in Fast Clicks library,
#' so Fast Clicks should be also enabled.
#' \item \code{tapHold}: It triggers (if enabled) after a sustained, complete touch event.
#' By default it is enabled. See \link{f7TapHold} for usage.
#' \item \code{tapHoldDelay}: Determines how long (in ms) the user must hold their tap before the taphold event is fired on the target element.
#' Default to 750 ms.
#' \item \code{iosTouchRipple}: Default to FALSE. Enables touch ripple effect for iOS theme.
#' }
#' Navbar options \url{https://v5.framework7.io/docs/navbar.html#navbar-app-parameters}:
#' Navbar options \url{https://framework7.io/docs/navbar#navbar-app-parameters}:
#' \itemize{
#' \item \code{iosCenterTitle}: Default to TRUE. When enabled then it will try to position
#' title at the center in iOS theme. Sometime (with some custom design) it may not needed.
#' \item \code{hideOnPageScroll}: Default to FALSE. Will hide Navbars on page scroll.
#' }
#' Toolbar options \url{https://v5.framework7.io/docs/toolbar-tabbar.html#toolbar-app-parameters}:
#' Toolbar options \url{https://framework7.io/docs/toolbar-tabbar#toolbar-app-parameters}:
#' \itemize{
#' \item \code{hideOnPageScroll}: Default to FALSE. Will hide tabs on page scroll.
#' }
Expand Down
30 changes: 5 additions & 25 deletions R/f7TapHold.R
Original file line number Diff line number Diff line change
@@ -1,37 +1,17 @@
#' Framework7 tapHold module
#'
#' \link{f7TapHold} is triggered after long press on an element, from the server.
#' Framework7 has a so called "tap hold" event. If tapHold is enabled in \link{f7Page}, it triggers
#' after a sustained, complete touch event. \link{f7TapHold} is triggered from the server.
#'
#' @param target Element to apply the tapHold event on. Must be a jQuery selector,
#' such as "#id" or ".class", ".class1, .class2", "a"...
#' @param callback Javascript callback.
#' @param session Shiny session object.
#'
#' @export
#'
#' @examples
#' if (interactive()) {
#' library(shiny)
#' library(shinyMobile)
#' @example inst/examples/tapHold/app.R
#'
#' shinyApp(
#' ui = f7Page(
#' title = "Taphold",
#' f7SingleLayout(
#' navbar = f7Navbar(title = "f7TapHold"),
#' f7Button(inputId = "pressme", label = "Press me")
#' )
#' ),
#' server = function(input, output, session) {
#' observe({
#' f7TapHold(
#' target = "#pressme",
#' callback = "app.dialog.alert('Tap hold fired!')"
#' )
#' })
#' }
#' )
#' }
#' @export

f7TapHold <- function(target, callback, session = shiny::getDefaultReactiveDomain()) {

message <- dropNulls(
Expand Down
2 changes: 1 addition & 1 deletion R/f7Tooltip.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ f7Tooltip <- function(tag, text) {
#' @param id Tooltip target id.
#' @param selector jQuery selector. Allow more customization for the target (nested tags).
#' @param options List of options to pass to the tooltip.
#' See \url{https://v5.framework7.io/docs/tooltip.html#tooltip-parameters}.
#' See \url{https://framework7.io/docs/tooltip#tooltip-parameters}.
#' @param session Shiny session object.
#' @export
#' @rdname tooltip
Expand Down
4 changes: 2 additions & 2 deletions R/update-app.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ updateF7App <- function(options, session = shiny::getDefaultReactiveDomain()) {
#'
#' \code{updateF7Entity} allows to update any Framework7 instance from the server.
#' For each entity, the list of updatable properties may significantly vary. Please
#' refer to the Framework7 documentation at \url{https://v5.framework7.io/docs/}.
#' refer to the Framework7 documentation at \url{https://framework7.io/docs/}.
#'
#' @param id Element id.
#' @param options Configuration list. Tightly depends on the entity.
#' See \url{https://v5.framework7.io/docs/}.
#' See \url{https://framework7.io/docs/}.
#' @param session Shiny session object.
#' @export
#'
Expand Down
22 changes: 22 additions & 0 deletions inst/examples/tapHold/app.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
library(shiny)
library(shinyMobile)

app <- shinyApp(
ui = f7Page(
title = "Taphold",
f7SingleLayout(
navbar = f7Navbar(title = "f7TapHold"),
f7Button(inputId = "pressme", label = "Press me")
)
),
server = function(input, output, session) {
observe({
f7TapHold(
target = "#pressme",
callback = "app.dialog.alert('Tap hold fired!')"
)
})
}
)

if (interactive() || identical(Sys.getenv("TESTTHAT"), "true")) app
4 changes: 2 additions & 2 deletions man/actionsheet.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/f7ListIndex.Rd

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

13 changes: 6 additions & 7 deletions man/f7Page.Rd

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

33 changes: 17 additions & 16 deletions man/f7TapHold.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/fabs.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/tooltip.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/updateF7Entity.Rd

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

2 changes: 1 addition & 1 deletion vignettes/shinyMobile.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ options <- list(

As stated above, you may choose between 3 skins and 2 color themes. There is a third option called __filled__ that allows to fill the navbar and toolbar if enabled. The __color__ options simply changes the color of elements such as buttons, panel triggers, tabs triggers, ...
`{shinyMobile}` brings a lot of different colors. __hideOnPageScroll__ allows to hide/show the navbar and toolbar which is useful to focus on the content. The __tapHold__ parameter ensure that the "long-press" feature is activated. __preloader__ is useful in case you want to display a loading screen.
Framework7 has many more [options](https://v5.framework7.io/docs/app#app-parameters) which can be passed through this __options__ parameter.
Framework7 has many more [options](https://framework7.io/docs/app#app-parameters) which can be passed through this __options__ parameter.

# Gadgets

Expand Down

0 comments on commit a299a0b

Please sign in to comment.