OK, OK, I'm reconsidering this :-) I've always though of whimsy as a collection of independent tools; on the theory that I could get more people to be involved if all they needed to be concerned about was a standalone tool. Many of the tools have a unique look and feel, for example, the board agenda tool.
Now that I see that you are trying to do, I can see the merits of having a common location for things like the bootstrap library. In particular, I note that the https://whimsy.apache.org/members/non-participants page is inlining a copy of bootstrap as the assets weren't checked in and file permissions on whimsy-vm3 don't permit the web server to create these files (allowing scripts to create files in the apache httpd docroot can lead to hacking). What I want to think a bit more about is enabling that without harming the ability to develop and test standalone tools. What I will probably do is update wunderbar to check to see if the DOCUMENT_ROOT environment variable is set, and if so, check to see if there is an assets directory there containing a suitable copy of the script or stylesheet to be served. - Sam Ruby On Wed, Apr 5, 2017 at 9:54 PM, Sam Ruby <[email protected]> wrote: > The assets directories are maintained by wunderbar. If you delete > those files, they will be recreated. If they can't be recreated (due > to file permissions), they will be rendered inline. > > Each of the versions of bootstrap should match the one found in this > directory: > > https://github.com/rubys/wunderbar/tree/master/lib/wunderbar/vendor > > The basic idea is that a tool simply does a require > 'wunderbar/bootstrap' and wunderbar worries about what files (css, js, > etc) are needed to make that happen. It will even insert the > necessary <script> and <link rel="stylesheet"> lines into your HTML. > > In the case of bootstrap, this is done here: > > https://github.com/rubys/wunderbar/blob/master/lib/wunderbar/bootstrap.rb > > - Sam Ruby > > > > - Sam Ruby > > On Wed, Apr 5, 2017 at 9:19 PM, Shane Curcuru <[email protected]> wrote: >> Does anyone mind if I work on cutting down on the number of different >> bootstrap libraries and CSS/JS files that we have in the repo? >> >> Whimsy serves a lot of users - it would be nice to have a little bit of >> similarity in appearance, along with some simple nav hints back to the >> homepage or related tools, and even perhaps helpful documentation. But >> trying to figure out how to add that when some directories have three >> different bootstraps makes my head hurt. >> >> Related: is there any reason that each directory needs it's own copies >> of everything? I.e. would any additional config/maintenance be needed >> if /members and /committers tools mostly used the same bootstrap >> (presuming the right version is used), but in /www/css or the like? >> >> I'll test each page before changing anything, and would focus on simple >> fixes first, but wanted to know if this was a dumb idea for some reason >> first. >> >> ./www/board/agenda/public/assets/bootstrap-min.css >> ./www/board/agenda/public/assets/bootstrap-min.js >> ./www/board/agenda/public/assets/bootstrap-theme.min.css >> ./www/board/agenda/views/bootstrap.html.rb >> ./www/board/agenda/views/pages/bootstrap.js.rb >> ./www/incubator/assets/bootstrap-min.css >> ./www/members/assets/bootstrap-min.css >> ./www/members/assets/bootstrap-min.js >> ./www/members/css/bootstrap-combobox.css >> ./www/members/css/bootstrap.min.css >> ./www/members/js/bootstrap-combobox.js >> ./www/members/js/bootstrap.min.js >> ./www/roster/public/assets/bootstrap-min.css >> ./www/roster/public/assets/bootstrap-min.js >> ./www/roster/public/assets/bootstrap-theme.min.css >> ./www/status/assets/bootstrap-min.css >> ./www/status/assets/bootstrap-min.js >> ./www/status/css/bootstrap.min.css >> ./www/status/js/bootstrap.min.js >> ./www/test/icla/public/assets/bootstrap-min.css >> ./www/test/icla/public/assets/bootstrap-min.js >> ./www/test/icla/public/assets/bootstrap-theme.min.css >> >> -- >> >> - Shane >> https://www.apache.org/foundation/marks/resources
