Week Beginning 18th November 2019

On Monday I’d arranged another Arts Developer Coffee meeting, and for the first time all four of the current developers in the College of Arts were able to attend (that’s me, Luca Guariento, Stevie Barrett and David Wilson).  It was a great opportunity to catch up with them all and discuss our work and some of the issues we’re currently dealing with.

I divided my time between several projects this week.  I spent some time on DSL duties.  This involved making updates to the new version of the API that I developed a few months ago, that uses the most up to date version of the DSL data and a new instance of Apache Solr that I set up.  Ann had gone through the search facilities and had noted some discrepancies between this new version and the live site, so I addressed these.  Firstly, the new version of the quick search if the ‘autocomplete’ list was ignored and the search form was submitted was running a ‘match the characters anywhere in a headword’ search, meaning lots of results were being returned that were possibly not very relevant.  I updated this to ensure an exact match would be executed in such circumstances instead.  The other change I made was to the advanced search, which was previously ordering results by entry ID.  This meant that for a search that returned a lot of results only DOST results would be returned before the ‘maximum results’ limit was reached.  Instead I changed the Solr query to use Solr’s ‘relevance’ score instead, which uses various methods to rank results.  Strangely the returned result-set was still in a different order to the ‘live’ site, which also uses Solr’s ‘relevance’ score, which I can only assume is because the methods in which this score is generated have changed between versions of Solr.

I also got stuck into the creation of a new means of ordering SND and DOST entries for browse purposes.  The original browse lists supplemental entries after the main entries and doesn’t disregard non-alphanumeric characters when working out browse order, which leads to some rather odd placements of entries.  After a bit of toing and froing with Ann about how the new browse should work I spent some time on Friday writing a script that would order the data-sets.  The output consists of a table with one row per entry, listing the ID, Headword and POS of each, and also the ‘stripped’ version of the headword (i.e. no non-alphanumeric characters), the generated browse order and the generated POS Num, which is based on a table that Thomas Widmann had created.

In order for yogh to get positioned correctly after ‘Y’ and before ‘Z’ I’ve replaced the character with ‘yz’ in the stripped column (the stripped column will never be seen so this doesn’t really matter).  There was also an ash character in DOST, which I’ve converted to ‘ae’.  The ordering algorithm reorganises entries by the ‘stripped’ column initially.  If this column is the same as another then the ‘POS Num’ column is used to order things.  If this number is also identical then the IDX column (the numerical part of the ID column) is used.  This seems to work pretty well.  E.g. for ‘aiker’ in the SND output there are 3 rows for ‘n.1’, ‘,n.2’ and ‘n.3’.  These are all given the ‘POS Num’ of ‘1’, so the IDX field is checked and the entries are ordered correctly because by IDX order ‘n.1’ comes before ‘n.2’ which comes before ‘n.3’.

Also this week I met with Thomas Clancy and Gilbert Markus to discuss the Place-names of Kirkcudbrightshire project.  I’m going to be putting the finishing touches to the front-end for this project soon and we met to discuss what updates might need to be made.  I also added some new parishes to the underlying database.

On Thursday this week there were some issues with the server that hosts the majority of our project websites, which meant I couldn’t work on the projects I had intended to work on.  Instead I continued to look into overhauling the Digital Humanities Network website.  I began to set up the content management system for the data and migrated some of the underlying tables across to work with.  I also spent some time thinking about what new data regarding projects would need to be recorded and how this might be stored.

I spent the rest of the week continuing to make updates to the SCOSYA website.  We had received feedback from a user testing session on Monday and I spent some time reading through all of this and thinking about the various issues that had cropped up.  Generally the feedback was hugely positive, but there were some usability issues that kept cropping up.  I met with Jennifer on Tuesday to discuss these, and implemented a number of changers after that.  This included making the community voices popups narrower on smaller screens and larger with a bigger font size on bigger screens and making the atlas area narrower so it’s easy to scroll up and down the page.  I also needed to change the way the sidebar opens and closes.  There was an issue where pointer events were not being passed to the map in the area underneath the sidebar, meaning you couldn’t open popups in this space, and on mobile devices this space was basically the whole map.

I had to update the JavaScript to get this to work (rather than just updating the stylesheet which I did initially, but introduced new problems).  Previously the left-hand menu would only get resized if the contents ended up bigger than the height of the atlas.  In such cases the menu would be set to a bit less than the height of the atlas, with a scrollbar used to reach the parts that didn’t fit.  If a different menu item was clicked on that resulted in a shorter menu the menu area was not resized, as the contents would automatically take up less space anyway.  However, this left the menu as a transparent area taking up the full height of the atlas, an area where any map-based actions (e.g. opening markers) would not function, as the menu area was set to intercept the pointer events in order for scrolling to work.

What happens now is whenever the page loads or a section of the menu is opened or closed the JavaScript tallies up the height of all of the visible menu items (the headers plus the open body).  If this total is greater than the atlas height then the menu is set to be a bit smaller than the atlas height and a scrollbar appears as before.  But if the total is less than the atlas height then the menu is now resized to the height of all the visible elements combined, so that it no longer takes up the full height of the atlas as a transparent area that intercepts pointer events.  It’s a much more elegant solution and works very well.

I also updated the base map for the atlas to add in place-names, something that we had made a decision to exclude previously.  We had some feedback that suggested our bare, minimalist map made it difficult for people to understand where places were, so I reinstated the names.  Everyone is actually very happy with how the names look, so we’re going to leave them in.  I also updated a number of marker locations that didn’t have quite the right name (e.g. Boness instead of Bo’ness).

In addition I updated the atlas so that the choice of age group and markers or points is no longer remembered, but always defaults to ‘all’ and ‘markers’ when moving between examples.  I added a ‘choose another story’ link that now appears at the top of every slide in a story, rather than just the first and I’ve added a button to the top of the first story slide that opens the left-hand menu and reloads the ‘how do people speak in…?’ map.  I also added more explanatory text above the atlas, as feedback suggested people were not understanding how to use the interactive map.  I’ve added text explaining how to show and hide the left-hand menu, how to move about the map and how to zoom in and out.  I made the ‘show transcription’ links in the community voices popups buttons rather than links and fixed the links in the tabular dialect samples page, which were pointing to an older version of the atlas that no longer exists.  I made the border round the atlas blue to make it clearer where the atlas area ends and the rest of the page begins, as the previous light grey border was a bit hard to see and fixed an issue with the map popups when viewing a story pane that displays data for ‘young’ or ‘old’, whereby the sentence for ‘all’ and the other age group was still appearing when it shouldn’t.  I also applied a number of these fixes to the linguists’ atlas as well.  Here’s a screenshot of how the public atlas now looks:

The UCU strike begins on Monday next week so I will not be back into work until Thursday the 5th of December, unless the situation changes.