Skip to content

Commit

Permalink
Final commit before release 1.8.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
burkmarr committed Oct 24, 2018
1 parent 16702f0 commit a138a04
Show file tree
Hide file tree
Showing 65 changed files with 562 additions and 358 deletions.
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.8.0] - 2018-10-24
### Added
- Added PWA capability including app manifest ('manifest.json') and service worker ('sw.js') to enable depolyment of Identikit resources as mobile apps capable of being used away from the internet.
- Added a new visualisation ('vis6') which is a mobile-first multi-access key capable of using the PWA features to download resources for offline use.
- Updated documentation, especially 'Deploying your visualisations' and 'Getting started', to explain how to deploy PWA Identikit apps with vis6.
- Added a configuration option (tbv.opts.ignoreNegativeScoring) to instruct Identikit to ignore negative scores (issue 26). Documented in 'Deploying your visualisations'.
- Added a facility for knowledge-base developers to provide a downloadable PDF to describe their resource. If a file called 'info.pdf' is found in the knowledge-base folder, a download link is added to the main tool interface (issue #21).
- Added a mechanism for checking APIs of objects against template interfaces.
### Fixed
- Addressed typo is KB checking (issue #22).
- Addressed issue whereby clearing value in spin control (character input) with keyboard, but software treated value as zero rather than null (issue #24).
### Changed
- Implemented architectural changes to separate three levels of interface: overarching GUI, visualisations and user-input GUIs.
- Moved visualisation-specific CSS out of general CSS file (tombio.css) and into separate CSS files for individual tools.
- Multiple spaces in kb values (or translated values) caused problem. These are now removed as the KB is loaded (issue #25).
- Improved layout of images and their captions on help dialogs (issue #31).
- Updated D3 to version 5 (issue #32).
- Changed and added a number of top-level configuration options (documented in 'Deploying your visualisations').
### Removed
- Citation of individual tools removed (issue #29).

## [1.7.1] - 2018-06-11
### Fixed
- Addressed problem with 'close' and 'full-size' image controls not working in the side-by-side comparison tool when galleria image small.
Expand Down Expand Up @@ -84,7 +105,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
- Vertical orientation of character names in the two-column visualisation updated to make it work with Safari and IE.
- Added better handling of the image control in mobile devices - especially iPad - by adding pinch zoom and explicit display/hiding of image controls with a press gesture.
### Changed
### Changed
- Individual character scores on the single-column key visualisation are now rounded *down* to the nearest 0.1 to avoid confusion of non-perfect matches apparently scoring a perfect match.
- (Developers note) Moved definition of matching score colour ramp out of individual visualisations and into prototype visualisation module (visP).
- (Developers note) Moved knowledge-base integrity checks to a separate javascript module to promote code clarity.
Expand Down
13 changes: 13 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Release notes for existing knoweldge-base developers
These notes are intended to help existing knowledge-base developers move from one version of the FSC Identikit to another. These notes were first released with version 1.7.0 of the Identikit and will be updated on each succeeding release.

## Release 1.8.0
The main feature of release 1.8.0 is a new visualisation ('vis6') which is a 'mobile-first' multi-access key that is suitable for using on small-format devices such as smartphones. Using this visualisation and the new Progressive Web App (PWA) features of Identikit 1.8.0, you can build mobile-first multi-access keys which can be deployed as apps on smartphones and even used away from an internet connection.

### Updating to release 1.8.0
The procedure for updating to a new release of the Identikit is the same as demonstrated in this video: http://www.fscbiodiversity.uk/fullscreen/tombiovis-upgrade. (The video was made when version 1.4.1 was released and was still referred to then as *the Framework*.)

### Changes to *vis.html*
Once again, we've made a number of changes to the way Identikit initialisation options are handled. These are described in the document *Deploying your visualisations*. For the most part, the old ways of initialising things are still supported, but not recommended (i.e. they are *deprecated*). So the chances are that the copy if *vis.html* that you use to run the Identikit whilst developing and testing your knowlege-base will still work. But we nevertheless recommend that you update your vis.html (or whatever you use) to reflect the new configuration options.

### Addition of *vism.html*
This new template high-level page is a version of *vis.html* which is configured specifically to demonstrate the new mobile-first multi-access key on the provided *biscuits* knowledge-base. You can use this template to make a mobile-first multi-access key based on your own knowledge-base.

## Release 1.7.1
This was a minor update to address a couple of small bugs with 1.7.0. Knowledge-base developers moving to version 1.7.1 from earlier versions should consult the notes below for version 1.7.0.
## Release 1.7.0
Expand Down
Binary file modified documentation/Building a knowledge-base.docx
Binary file not shown.
Binary file modified documentation/Building a knowledge-base.pdf
Binary file not shown.
Binary file modified documentation/Character scoring.docx
Binary file not shown.
Binary file modified documentation/Character scoring.pdf
Binary file not shown.
Binary file modified documentation/Deploying your visualisations.docx
Binary file not shown.
Binary file modified documentation/Deploying your visualisations.pdf
Binary file not shown.
Binary file modified documentation/Documentation template.docx
Binary file not shown.
Binary file modified documentation/Getting started.docx
Binary file not shown.
Binary file modified documentation/Getting started.pdf
Binary file not shown.
Binary file modified documentation/Notes for coders.docx
Binary file not shown.
Binary file modified documentation/Notes for coders.pdf
Binary file not shown.
Binary file modified documentation/Quick-start guide.docx
Binary file not shown.
Binary file modified documentation/Quick-start guide.pdf
Binary file not shown.
Binary file modified kb/biscuits/biscuits.xlsm
Binary file not shown.
3 changes: 2 additions & 1 deletion kb/biscuits/config.csv
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ authors,metadata,yes,"Bell, C.",,
publisher,metadata,no,Field Studies Council,,
location,metadata,no,"Preston Montford, Shrewsbury",,
contact,metadata,no,,,
version,metadata,yes,1.7.1,,
version,metadata,yes,1.8.0,,
#Releases - keep track of the release history below this line. Most recent releases at the top. The version code in the 'value' column below this line should match that of the current release above it.,,,,,
release,history,no,1.8.0,10/24/2018,Minor changes.
release,history,no,1.7.1,6/1/2018,Minor fix to add new media fields.
release,history,no,1.7,6/1/2018,Modified by RB to complement version 1.7.0 release of Identikit.
release,history,no,1.0,11/22/2016,Modified by RB to illustrate some of the different features of knowledge representation.
Expand Down
Binary file added kb/biscuits/info.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"type": "image/png"
}
],
"start_url": "/vis.html",
"start_url": "vis.html",
"display": "standalone",
"background_color": "#3E4EB8",
"theme_color": "#2F3BA2"
Expand Down
13 changes: 7 additions & 6 deletions sw.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
//See comments at the end of description of caching strategy

var kbCacheName = "tombio-kb-cache-1";
var kbImgStdCacheName = "tombio-kb-img-std-cache-1";
var kbImgSmlCacheName = "tombio-kb-img-sml-cache-1";
var kbImgLrgCacheName = "tombio-kb-img-lrg-cache-1";
var kbTxtCacheName = "tombio-kb-txt-cache-1";
var genCacheName = "tombio-gen-cache-1";
var cacheno = 8;
var kbCacheName = "tombio-kb-cache-" + cacheno;
var kbImgStdCacheName = "tombio-kb-img-std-cache-" + cacheno;
var kbImgSmlCacheName = "tombio-kb-img-sml-cache-" + cacheno;
var kbImgLrgCacheName = "tombio-kb-img-lrg-cache-" + cacheno;
var kbTxtCacheName = "tombio-kb-txt-cache-" + cacheno;
var genCacheName = "tombio-gen-cache-" + cacheno;
var allCacheNames = [genCacheName, kbCacheName, kbImgStdCacheName, kbImgSmlCacheName, kbImgLrgCacheName, kbTxtCacheName]
var url = new URL(location);
var tombiokbpath = url.searchParams.get('tombiokbpath');
Expand Down
Binary file added test.zip
Binary file not shown.
2 changes: 0 additions & 2 deletions tombio/dependencies/d3-4.10.0/d3.v4.min.js

This file was deleted.

8 changes: 0 additions & 8 deletions tombio/dependencies/d3-4.4.0/d3.min.js

This file was deleted.

2 changes: 2 additions & 0 deletions tombio/dependencies/d3-5.7.0/d3.min.js

Large diffs are not rendered by default.

25 changes: 23 additions & 2 deletions tombio/guiLargeJqueryUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,29 @@
//An area for tools to add info
$("<div>").attr("id", "tombioGuiLargeJqueryUiFlashDisplay").css("display", "none").appendTo("#tombioGuiLargeJqueryUi");

//Tool drop-down
$("<select>").attr("id", "tombioGuiLargeJqueryUiVisualisation").appendTo("#tombioGuiLargeJqueryUi");
//Tool drop-down and PDF info button
var table = $("<table>").appendTo("#tombioGuiLargeJqueryUi");
var tr = $("<tr>").appendTo(table);
var td1 = $("<td>").appendTo(tr);
var td2 = $("<td>").appendTo(tr);
$("<select>").attr("id", "tombioGuiLargeJqueryUiVisualisation").appendTo(td1);

//Add Info PDF button if info.pdf file is found
$.ajax({
//https://forums.asp.net/t/1640966.aspx?Check+file+exist+on+server+using+Javascript
type: "HEAD",
url: tbv.opts.tombiokbpath + "info.pdf",
success: function (data) {
var img = $("<img>").attr("src", tbv.opts.tombiopath + "resources/pdf.png");
img.css("height", "25px");
img.css("position", "relative");
img.css("top", "-3px");
var a = $("<a>").attr("href", tbv.opts.tombiokbpath + "info.pdf");
a.append(img);
td2.append(a);
}
});


//Divs for taxa and controls
$("<div>").addClass("tombioNoSelect").attr("id", "tombioGuiLargeJqueryUiControlsAndTaxa").appendTo("#tombioGuiLargeJqueryUi");
Expand Down
82 changes: 58 additions & 24 deletions tombio/guiOnsenUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@
html += '<ons-toolbar>';

var tb = "";
tb += '<ons-toolbar-button id="tombioUiFullscreenMenuButton" onclick="tombiovis.gui.main.fn.requestFullscreen()">';
tb += '<ons-icon icon="md-fullscreen"></ons-icon>';
tb += '</ons-toolbar-button>';
tb += '<ons-toolbar-button id="tombioUiExitFullscreenMenuButton" onclick="tombiovis.gui.main.fn.exitFullscreen()" style="display: none">';
tb += '<ons-icon icon="md-fullscreen-exit"></ons-icon>';
tb += '</ons-toolbar-button>';
//tb += '<ons-toolbar-button id="tombioUiFullscreenMenuButton" onclick="tombiovis.gui.main.fn.requestFullscreen()">';
//tb += '<ons-icon icon="md-fullscreen"></ons-icon>';
//tb += '</ons-toolbar-button>';
//tb += '<ons-toolbar-button id="tombioUiExitFullscreenMenuButton" onclick="tombiovis.gui.main.fn.exitFullscreen()" style="display: none">';
//tb += '<ons-icon icon="md-fullscreen-exit"></ons-icon>';
//tb += '</ons-toolbar-button>';
tb += '<ons-toolbar-button id="tombioUiContextMenuButton" onclick="tombiovis.gui.main.openContext()">';
tb += '<ons-icon icon="md-more-vert"></ons-icon>';
tb += '</ons-toolbar-button>';
Expand Down Expand Up @@ -274,10 +274,15 @@

//Add handler for orientation change
ons.orientation.on('change', function () {
console.log("Orientation changed")
splitterSideHideShow();
resizeElements();
//Refresh the selected tool
tbv.f.refreshVisualisation();
//The timeout delay seems to be required otherwise the refresh method fires before divs have resized
setTimeout(function () {
tbv.f.refreshVisualisation();
mainMenuPos();
}, 1000);
});

//Check interface
Expand Down Expand Up @@ -331,10 +336,22 @@

//The option *values* currentVisInfo, kbInfo, visInfo & tombioCitation have software-wide meaning, not just this gui
icon = '<div class="left"><ons-icon icon="md-info" class="list-item__icon"></ons-icon></div>'

toolOptions.push($('<ons-list-item id="optCurrentVisInfo" value="currentVisInfo" class="html" data-class="info">' + icon + 'Using the...</ons-list-item>'));
toolOptions.push($('<ons-list-item value="kbInfo" class="html" data-class="info">' + icon + 'About the Knowledge-base</ons-list-item>'));
toolOptions.push($('<ons-list-item value="visInfo" class="html" data-class="info">' + icon + 'About FSC Identikit</ons-list-item>'));
toolOptions.push($('<ons-list-item value="tombioCitation" class="html" data-class="info">' + icon + 'Get citation text</ons-list-item>'));
toolOptions.push($('<ons-list-item id="optPdfInfo" style="display: none">' + icon + '<a href="' + tbv.opts.tombiokbpath + "info.pdf" + '">About this resource PDF</a></ons-list-item>'));

//Show the PDF Info option if info.pdf file is found
$.ajax({
//https://forums.asp.net/t/1640966.aspx?Check+file+exist+on+server+using+Javascript
type: "HEAD",
url: tbv.opts.tombiokbpath + "info.pdf",
success: function (data) {
$('#optPdfInfo').show();
}
});

//If developer's section added above, then add a header for standard reload and download
toolOptions.push($('<ons-list-header>Other</ons-list-header>'));
Expand Down Expand Up @@ -489,6 +506,21 @@
//Set initialised flag
tbv.v.initialised = true;
}

//Show/hide context menu button
var contextMenuNeeded;
console.log(selectedToolName);
Object.keys(tbv.gui.main.contextMenu.items).forEach(function (contextItem) {
console.log(tbv.gui.main.contextMenu.visContexts[contextItem])
if (tbv.gui.main.contextMenu.visContexts[contextItem].indexOf(selectedToolName) != -1) {
contextMenuNeeded = true;
}
})
if (contextMenuNeeded) {
$('ons-toolbar-button#tombioUiContextMenuButton.toolbar-button').show();
} else {
$('ons-toolbar-button#tombioUiContextMenuButton.toolbar-button').hide();
}
}
}

Expand Down Expand Up @@ -653,21 +685,13 @@
$('#tombioOnsMenu').attr('collapse', '');
}

//
console.log("vis width", $('#tombioOnsVisDisplay').width());
if ($('#tombioOnsVisDisplay').width() < 208) {
$('#tombioOnsToolsRight').hide();
$('#tombioOnsToolsLeft').show();
} else {
$('#tombioOnsToolsRight').show();
$('#tombioOnsToolsLeft').hide();
}
mainMenuPos();

splitterSideHideShow();

tbv.f.refreshVisualisation();
}

tbv.gui.main.contextMenu = {
//Create the context menu object
items: {}, //Links to each item in the menu
Expand Down Expand Up @@ -745,6 +769,16 @@
$('#tombioUiExitFullscreenMenuButton').hide();
}

function mainMenuPos() {
if ($('#tombioOnsVisDisplay').width() < 208) {
$('#tombioOnsToolsRight').hide();
$('#tombioOnsToolsLeft').show();
} else {
$('#tombioOnsToolsRight').show();
$('#tombioOnsToolsLeft').hide();
}
}

function splitterSideHideShow() {

//This function has several purposes.
Expand Down Expand Up @@ -813,13 +847,13 @@
html.append($("<p>").html(t));
html.append($("<b>").html(tbv.f.getCitation(tbv.d.softwareMetadata, "Software")));

//Generate the citation for the current tool
html.append($("<h3>").text("Citation for last selected visualisation tool"))
t = "This is the reference you can use for the last selected visualisation tool.";
t += " The tool version number is updated whenever there is a new release of the tool.";
t += " If you cite a tool, there's no need to cite the core software separately since it is implicit.";
html.append($("<p>").html(t));
html.append($("<b>").html(tbv.f.getCitation(tbv.v.visualisations[tbv.v.lastVis].metadata, "Software", tbv.d.softwareMetadata.title)));
////Generate the citation for the current tool
//html.append($("<h3>").text("Citation for last selected visualisation tool"))
//t = "This is the reference you can use for the last selected visualisation tool.";
//t += " The tool version number is updated whenever there is a new release of the tool.";
//t += " If you cite a tool, there's no need to cite the core software separately since it is implicit.";
//html.append($("<p>").html(t));
//html.append($("<b>").html(tbv.f.getCitation(tbv.v.visualisations[tbv.v.lastVis].metadata, "Software", tbv.d.softwareMetadata.title)));

//Generate the citation for the knowledge-base
html.append($("<h3>").text("Citation for knowledge-base"))
Expand Down
2 changes: 1 addition & 1 deletion tombio/kbchecks.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
//Check that all characters (column headers) on the taxa tab have corresponding values in the characters tab.
charactersFromTaxaTab.forEach(function (character, iCol) {
if (charactersFromCharactersTab.indexOf(character) == -1) {
errors.append($('<li class="tombioValid3">').html("There is no row on the <i>characters</i> worksheet for the character <b>'" + character + "'</b> represented by a column (column " + (iCol + 1) + ") on the <i>taxa</i> worksheet. All columns on the <i>taxa</i> tab must be represented by a row in the <i>characters</i> worksheet regardless of whether or not they are used. Names are case sensitive. Note that rows will not be seen unless the <b>Group</b> column has a value."));
errors.append($('<li class="tombioValid3">').html("There is no row on the <i>characters</i> worksheet for the character <b>'" + character + "'</b> represented by a column (column " + (iCol + 1) + ") on the <i>taxa</i> worksheet. All columns on the <i>taxa</i> tab must be represented by a row in the <i>characters</i> worksheet regardless of whether or not they are used. Names are case sensitive. Note that rows will not be seen unless the <b>Status</b> column has a value."));
characters = false;
}
})
Expand Down
Loading

0 comments on commit a138a04

Please sign in to comment.