As I discussed in #415, I'm considering changes to rosindex that would involve more javascript-driven data search and filtering. Prior to doing that, I want to update the existing javascript to current versions. Hence this PR. I did not squash the branch because it might be useful to see changes in smaller increments. However, some of the earlier commits are incomplete, so they should not be landed without the full branch.
There were a few minor changes to overcome regressions caused by the updates. However, the use of venn.js (and the related d3.js) required more extensive changes, as the previous version we were using was copied from a commit immediately prior to a major, breaking API change.
As part of this, I want to have a clear pattern for access and managing externally-written js files. To that end, the changes include:
a standardized way to reference js
There were many existing patterns within rosindex for this. I standardized on a variation of the method currently used for jquery. That is, original file is stored in js/package_name/package_name-x.x.x.js, link to file in html is js/package_name.js where that is an ln -s softlink to the versioned file in js/package_name. I also included a reference comment, written by me, at the top of downloaded files to show their source.
Also, by using a standard pattern like this for externally-written files, it is clearer the distinction between them and the locally-developed files.
As mentioned in #422, using symbolic links like this has its issues with updates. I included code to work around this looking forward, but if you build with this PR, and then try to rebuild with the existing ros2 branch, you will experience failures. The workaround is to delete _site prior to building.
licenses
The MIT license that is used by most of these files has the clause: "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." I located the licenses and included them to meet this requirement.
The changes in this PR (along with others) are incorporated into my development build at index.rosdabbler.com
Fixes #422
As I discussed in #415, I'm considering changes to rosindex that would involve more javascript-driven data search and filtering. Prior to doing that, I want to update the existing javascript to current versions. Hence this PR. I did not squash the branch because it might be useful to see changes in smaller increments. However, some of the earlier commits are incomplete, so they should not be landed without the full branch.
There were a few minor changes to overcome regressions caused by the updates. However, the use of venn.js (and the related d3.js) required more extensive changes, as the previous version we were using was copied from a commit immediately prior to a major, breaking API change.
As part of this, I want to have a clear pattern for access and managing externally-written js files. To that end, the changes include:
There were many existing patterns within rosindex for this. I standardized on a variation of the method currently used for jquery. That is, original file is stored in
js/package_name/package_name-x.x.x.js
, link to file in html isjs/package_name.js
where that is anln -s
softlink to the versioned file injs/package_name
. I also included a reference comment, written by me, at the top of downloaded files to show their source.Also, by using a standard pattern like this for externally-written files, it is clearer the distinction between them and the locally-developed files.
As mentioned in #422, using symbolic links like this has its issues with updates. I included code to work around this looking forward, but if you build with this PR, and then try to rebuild with the existing
ros2
branch, you will experience failures. The workaround is to delete_site
prior to building.The MIT license that is used by most of these files has the clause: "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." I located the licenses and included them to meet this requirement.
The changes in this PR (along with others) are incorporated into my development build at index.rosdabbler.com