Code Monkey home page Code Monkey logo

shinyurl's People

Contributors

aoles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shinyurl's Issues

Error in DataTables while suppressing input

Firstly:
While supressing input renderDtOutput_rows_current using .: .renderDtOutput_rows_current package DataTables (R package DT) returns error.

Secondly:
shinyURL catches every input - including currently rendered rows, e.g.:
renderDtOutput_rows_current=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
so you can imagine what happens when you render 1000 rows...

Can you add argument to omit specific inputs?

Shiny Module UI elements

Hi,
Great work on the package, it is really useful.

I have an app which is using shiny modules to generate a load of selectizeInput elements. The normal UI elements are captured and restored by the URL no problem, but the inputs which are modules do not seem to be. I don't know if this is possible for the future?

http://shiny.rstudio.com/articles/modules.html

URL doesn't restore when selectInput with multiple = T is used

Hi,

I have a Shiny app with selectInput(multiple = TRUE). When I get the URL, I can see the multiple values for the select input in the URL. But, when I paste the URL into browser again, the restore won't happen. Everything gets reset to the original values.

I am rendering selectInput inside renderUI function. Is that the reason why the state is not restored? Every time the selectInput will be reloaded? The choices for selectInput are dynamic and based on the other input . So, its important that I put it in renderUI(). Can you please help me out here?

On the other hand, I have selectInput without multiple attribute and this is also rendered using renderUI function. The restore works perfectly fine with any value being selected in the select input.

Thanks.

ERROR: package or namespace load failed for 'shinyURL'

Any clue why shinyURL fails to load in a server environment?
The library loads and the functionality works nicely in my RStudio development environment.
When I deploy to a remote server running shiny, I get the "load failed" error. Log files literally disappear on error, suggesting a crash.
Interactive R on the remote server loads shinyURL just fine.

URL doesn't restore state when the field is a SelectInputList with multiple=T where list has only one member

Hi Aoles,

Thanks for this great package, exactly what I was looking for!

I do seem to have an issue however. If my UI has selectizeInput fields which allow multiple sections (multiple=T), but only one value in the field, then the URL generated by ShinyURL doesn't fully restore the session. I think it's because that for list fields, they require the array reference, even if only one member.

So for example, here is my field definition:

selectizeInput("filter_choices", "Active Filters", filterChoiceList,
options=list(placeholder="Choose fields to filter on"),
multiple = T)

Here is the URL generated if I only have one value in "filter_choices" ...

http://127.0.0.1:6777/?yval=Assignee_Group&Assignee=&metric=average_age&dates=16437,16853&date_type=opened_between&filter_choices=business_unit&business_unit=CAT&xval=ClosedMonth&metric_cutoff=0,178

This doesn't work. However, if I manually edit it to include "[1]" for the list fields with only one value ...

http://127.0.0.1:6777/?yval=Assignee_Group&Assignee=&metric=average_age&dates=16437,16853&date_type=opened_between&filter_choices[1]=business_unit&business_unit[1]=CAT&xval=ClosedMonth&metric_cutoff=0,178

This works perfectly and restores the Shiny session.

Note, that if there are multiple choices in these list fields everything works perfectly, the issue is limited to when there is only one value in a multiple selection list field.

In summary, I think perhaps the generated URL needs the "[1]" when only one value is specified for multiple=T selectInput fields.

Thanks!

Bookmarking with URL now available in shiny core

Just thought that it might be worth mentioning in the README or elsewhere that some of the functionality of this add-on is available in shiny core, using enableBookmarking = "url" (since version 0.14, released sept 2016)

I have no doubt that this plugin served to inspire :)

Thank you, this worked like a dream

Andrzej,
This is not an issue, this is a thank you. I was expecting it to talk all afternoon to get something functional for passing URLs around but with shinyURL it took 15 minutes. Many thanks for sharing a nice tool!
Edward

Error while compiling

Hi,
Here is the error:

Warning: Unhandled error in observer: invalid argument type
observe({
    inputValues = reactiveValuesToList(session$input, all.names = FALSE)
    inputValues = inputValues[!unlist(lapply(inputValues, function(x) inherits(x, 
        "shinyActionButtonValue")), use.names = FALSE)]
    idx = grep("_mouse_(over|out)$", names(inputValues))
    if (length(idx) > 0) 
        inputValues = inputValues[-idx]
    names = sort(names(inputValues))
    addValues = NULL
    i = 1L
    while (i <= length(names)) {
        n = names[i]
        idx = grep(sprintf("^%s[0-9]+", n), names)
        if (length(idx) == 0L) {
            i = i + 1L
        }
        else {
            value = inputValues[[n]]
            names = names[-c(i, idx)]
            if (is.null(value)) 
                value = ""
            values = as.list(value)
            names(values) = sprintf("%s[%s]", n, seq_along(value))
            addValues = c(values, addValues)
        }
    }
    inputValues = inputValues[names]
    inputValu [... truncated]
ERROR: [on_request_read] connection reset by peer

I am using Rmardkown

QR code for URL

Thank you for this nice shiny package. It would be more insteresting to add an option to generate a URL QR code of current status of shiny app.

use history.replaceState instead of widget

hi,

the broswers history.replaceState method updates the URL visible in the adressbar of the browser. I think it would be great to simply update the adressbar of the browser, instead of showing an extra UI element with the URL.

Question about navbar url in web server developed by shiny! Urgently!!!

My web server developed by shiny. However I found that there are the same url when I choose the different navbar/tabpanel in my web server. Can someone help me please? It's difficult for me to solve this problem. I just need every different url when I choose different panel in my server. Thank you very much!

Installation failed

Hi there,

It appears to be impossible to install this package from a windows workstation.
devtools installed.
R 3.4.3
The resulting message after trying to load and install sources from github is "Installation failed : Timeout was reached: connection timed out after 10015 milliseconds"

As far as I can remember I had strictly no problem during my last installation using an Ubuntu distro.

Any help would be greatly appreciated,
Olivier

Remove unwanted parameters in URL

I would like to hear if there is any possibility to remove system generated parameters from the URL. I'm getting quite few ss-net-opt-* values which make it hard to read the required URL. I know from the documentation that by putting . in front of the variable it will not be included. In my case I have no idea where the ss-net-opt-* parameters are coming from which makes it hard to exclude them.

Any suggestions are appreciated.

Regards, Sigurgeir

url not ignoring table contents

when going to a table the url gets populated with all the contents of the table, is there a way to make the js ignore predetermined objects? or can this bug only be fixed globally?

this is the url output:
http://127.0.0.1:3966/?table_rows_current=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32&table_cell_clicked=&table_search=&table_search_columns[1]=&table_search_columns[2]=&table_search_columns[3]=&table_search_columns[4]=&table_search_columns[5]=&table_search_columns[6]=&table_search_columns[7]=&table_search_columns[8]=&table_search_columns[9]=&table_search_columns[10]=&table_search_columns[11]=&table_rows_selected=&table_rows_all=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32&tab=table&table_state=

when running a bigger app with lots of objects the url gets too long

library(shinyURL)
library(DT)

shinyApp(
  ui = fluidPage(
    titlePanel("Mtcars Data"),
    sidebarLayout(
      sidebarPanel(
        shinyURL.ui(ZeroClipboard.swf = "//cdn.jsdelivr.net/zeroclipboard/2.2.0/ZeroClipboard.swf")
      ),
      mainPanel(
        tabsetPanel(id = "tab", 
                    tabPanel("table", DT::dataTableOutput('table'))
        )
      )
    )
  ),
  server = function(input, output) {
    shinyURL.server()
    output$table=DT::renderDataTable(mtcars,
                                     extensions = c('Buttons',
                                                    'Scroller',
                                                    'ColReorder',
                                                    'FixedColumns'), 
                                     filter='top',
                                     options = list(  deferRender = TRUE,
                                                      dom='t',
                                                      scrollX = TRUE,
                                                      pageLength = 50,
                                                      scrollY = 500,
                                                      scroller = TRUE,
                                                      dom = 'Bfrtip',
                                                      colReorder=TRUE,
                                                      fixedColumns = TRUE,
                                                      buttons = c('copy', 'csv', 'excel', 'pdf', 'print','colvis')
                                     ))

  }
)

Usage of app in practice

Just tried this out for first time on one of my apps and works fine but have few comments

I suppose it would sometimes be useful to view the full URL, but only as an option (perhaps with default=TRUE)
The circumstances I would want to use this would include on twitter so a button which opens
a tweet with the tinyurl shown would be an interesting enhancement
Another circumstance I can envisage is that a user would always want to go to some defaults of that app. So a swift way of bookmarking would also be useful

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.