Common JQuery library for use by all extensions

ui::webdialog
ui::htmldialog
libraries
jquery

#1

Continuing the discussion from How to pass values to HtmlDialog?:

I’m not entirely against having better management for libraries. (A few of us have played a bit with this in the past, ie, shoehorning the SketchupExtension class into wrapping a library that can be used by multiple extensions.)


Since, the Trimble Connect extension has been shipping along with SketchUp (v2016+,)
it has included at least JQuery v1.11.1 library.

jquery_path = Sketchup.find_support_file(
  "jquery.js", "Plugins/su_trimble_connect/js/third-party" 
)

Thomas Thomassen’s TT_Lib2 ships with JQuery v1.8.3 (as well as his Vertex Tools):

jquery_path = Sketchup.find_support_file(
  "jquery.js", "Plugins/TT_Lib2/webdialog/js" 
)

His SKUI library has at least JQuery v1.10.2 and several other JS libraries.
It is used for “testup” but only developers would likely install that.
Developers need to package it up with their extensions. I don’t see any end user installable RBZ archive.

His Selection Toys also has several named versions of JQuery. (v1.3.2 and v1.4)
Search path “Plugins/tt_selection_toys/webdialog/js



How to pass values to HtmlDialog?
#2

HtmlDialog doesn’t need the cross platform ‘goodness’ that jQuery was designed for…

suppling it minified would be of zero benefit to someone wishing to learn to use it and as shipping a static copy has little benefit to most SU users so it would just be bloat…

there is no way every developer would want to use the same version, so let those who wish to supply [ and maintain ] choose the own versions…

it would be better to have a API methods for building common UI elements for HtmlDialog/CEF usage…

those wishing jQuery and or backwards compatibility can continue to ‘roll there own’…

as I suggest 5 or more years ago, SU should ship with a custom version of Shoes

SKUI seemed to promise that ease of usage until IMHO it went off the rails with jQuery…

I also feel it’s existence will shuffle any requests for an alternative to the bottom of the pile…

john


#3

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.