Yang-Tang/shinyjqui

jqueryui version? problem with jqui_resizable

baj12 opened this issue · 5 comments

baj12 commented

I cannot provide a reproducible example.

The example from the help page is working. When inspecting the source on Chrome I see that jqueryui-1.12.1/jquery-ui.min.js is used whereas in my not working shiny app jqueryui-1.13.2/jquery-ui.min.js is used. I have no clue where this is set in any of the shiny apps...

The symptom in my app is that the little triangle to resize is not showing. I don't see any related error messages and have otherwise no clue what to look for.

Any help is much appreciated.

baj12 commented

I just found out that on Windows it is still working.

Nice to know it works. A quick note about the jqueryui version, actually, shinyjqui library loads the jquery-ui.min.js in the shiny package. This means the jqueryui version in your app is depands on the version of shiny package you installed. If you use shiny 1.7.4 or above, it should load jqueryui-1.13.2

baj12 commented

Sorry, but on my MAC it still doesn't work.

Interesting info on jquery-ui.min.js .

Two questions:

  1. Since I believe that some other package is also loading this. How would you search a package whether it loads this ?

  2. Did you encounter this problem before? How should I go about debugging it?

Thanks for your kind support

For the first question, actually, shiny will handle this through a set of depandency functions from the htmltools package. According to the document, only the first appearance of the content (in document order) will be used, so, if you have two functions in a shiny app that need different versions of the same js library, shiny only loads the js version for the first one. In this page, you can find some introduction about how shiny handles its depandencies.

For debugging, you can switch on the debugging mode by calling options(shinyjqui.debug = TRUE), and some log output by shinyjqui will appear in your brower's console. Hope that infomation will help you indentify the root cause the problem.

baj12 commented

if I use the following code:

          library(profvis)
          library(shiny)
          profvis_ui("profiler")

then jqueryui-1.13.2 is used by shiny apparently otherwise 1.12.1. Latter one works with resize; the First one does not.