Week Beginning 12th June 2017

I continued to work on the redevelopment of the Historical Thesaurus website this week, which took up the bulk of my time.  Marc, Fraser and I have made some really good progress on this and by the end of the week we had most of the new version complete, apart from adding in new content to some of the ‘About’ pages.  I think it’s looking really great and the tree browse in particular makes accessing the content so much quicker and easier.

The first major item I attempted to implement was the facility to open the tree at a specific category rather than at the top level.  Being able to do this was absolutely vital for the new design as if I couldn’t figure out a way to do it we wouldn’t be able to go from a search result or citation to a specific category and the tree view would therefore be pretty useless.

Initially I attempted to generate the full, open tree structure on the server side and to return this to the ‘fancytree’ plugin but figuring out a script that would generate the full, nested JSON structure where children arrays are children of children of children etc was taking too long for me to figure out.

Instead I turned my attention to the tree itself and wondered whether instead of generating the entire, potentially horribly complicated structure on the server-side I could instead work out which tree elements should be expanded and simulate the expanding of branches in JavaScript.  This is the solution that is currently live.  For example, if you load a subcategory the ‘browse’ loads with the maincat loaded and the page then scrolls down to the subcategory.  Whilst this is taking place the JavaScript fires off a request to get the hierarchy from the parent category upwards, which returns the catIDs of all of the parents.  The JavaScript then simulates the clicking of these nodes – e.g. first loading ‘The World’ and once it’s loaded it then loads ‘Food and Drink’ etc.  Once the full tree is expanded the relevant maincat is then highlighted in the tree.  This all works rather well.

I also make lots of other, smaller updates, namely: I fixed a gap that appeared under the arrow showing selected nav menu item; I ensured that the resizing of the tree / category section on narrow screens worked; I fixed the formatting of the random category ‘reload’ button; I updated the search page to remove the tabs and to add in proper PoS abbreviations to the parts of speech buttons; I reimplemented the ‘Jump to category number’ feature, and gave it the proper PoS abbreviations; I created one specific page for the tree, rather than there being a separate ‘browse’ and ‘search’ page.  The system highlights the appropriate nav menu item based on what the user is looking at.  I fully integrated the search with the tree view – you can go back to search results or clear your search and breadcrumbs now appear on the tree page.  The ‘Select category’ search results now display the proper PoS abbreviations and search word highlighting is now working in the tree.

I also added an ‘autocomplete’ function for the ‘label’ search – so now if you start typing in a label all of the labels in the system that match your text appear in a selectable list.  I also fixed the issue I mentioned last week whereby ‘T7’ categories looked like they had child categories and then gave an error when you tried to expand them.  I added the ‘cite’ popup to the tree view too, appearing beside each maincat and subcat.  I also upgraded the version of jQuery UI that the site uses and implemented a new ‘search’ option beside each work that opens a pop-up that allows the user to search for the word in the HT, the OED and TOE.

I added in a little function to display the HT version and added a call to this wherever the version is displayed, so that in future we will only have to update the version in one place.  I updated the tooltip styles to match the new colours Marc has been working on.  I fixed a bug whereby if a search word had a space in it the category pane failed to load in the tree view.  I slightly altered the category pane so there is no padding between the heading and the border and I tweaked the appearance of the PoS boxes on the search page and have made the ‘clear search boxes’ link into a button.  I also implemented a completely new structure for the ‘About’ pages, which included incorporating my Sparklines and also embedding Flikr photo galleries in the ‘photo gallery’ page rather than just linking out to that site.  I also added in a ‘top’ button that appears on screen when the user is mid-way down a page and updated the way dates are searched for in the advanced search.  There is now a ‘standard’ and ‘advanced’ date search option.  It has certainly been a productive week!

In addition to the above I spent about a day working on the poem database for The People’s Voice project, which I have now completed.  This included making some updates to the search facility and implementing the ‘view record’ page.  You can now click on a search / browse result to view the information about a poem.   I think all of the information about each poem is displayed, other than sound files as there are none in the system yet.  Currently the page is split into two panes.  The left-hand pane includes all of the information about the poem (authors, publication details, library details etc) while the right-hand pane contains the researcher’s comments.  Poem title and franchise appear above these panes.  Information that can be searched for appears as blue links (e.g. author, year of publication).  Clicking on one of these links performs a search for this information.

I also upgraded all of my WordPress sites to the latest version of WordPress that was recently released, fixed an issue Rob Maslen was having with his blog and met with Jennifer Smith, Gary Thoms and Niels Cadee from the library to discuss managing the research data for the SCOSYA project.

Next week I will continue to tweak the new HT website and I might have a go at updating the Thesaurus of Old English site as well, depending on what other things crop up.