Week Beginning 26th August 2024
This week I returned to working for the Books and Borrowing project, spending about a day creating a new version of the public data that incorporated some large additions to the Orkney dataset that one of the researchers has been working on over the past few months. It takes quite a bit of time to prepare the data for publication, which results in a new version of the site’s Solr index plus the generation of several other cached files. I also had a chat with project PI Katie about a potential publication about the project’s online resource. We’re probably going to speak more about this next week.
Also this week the updates I’d made to the DSL’s Solr index last week went live and I also fixed an issue with the sparkline tooltip text in the search results on touchscreens, which one of the DSL team had spotted. This issue was that the search results are block-level links – pressing on anywhere within the area of a result triggers the loading of the entry. As the sparkline is within this block pressing on it was also triggering the load. As there is no ‘hover-over’ on touchscreens the sparkline tooltip can only be triggered by pressing on it, which also triggers the page load.
Thankfully there was a quick fix for this: a small amount of JavaScript that ensured that pressing on the sparkline no longer triggers the page load. You can still press anywhere else in the result block to load the entry, while pressing on the sparkline now makes the sparkline tooltip appear and nothing more. I tested this out on my iPad and Android phone and it’s working fine for me.
I also spent about a day making updates to the new Speak For Yersel regions (these regions are not yet publicly available). Following pilot testing of the regions I’d been given rather lengthy lists of things to change for Ireland and Northern Ireland. These ranged from changing the question and answer option text to replacing or deleting entire questions or swapping the sound files for new versions.
One of the researchers also wanted the order for the Ireland survey questions to be randomised each time the survey loads and in order to implement this I had to update the database structure and the survey setup script to add in an ‘random question order’ option when creating each survey. I then needed to update the script that pulls questions into the survey so that the order was randomised when this option has been set. And as the question number that is displayed in the top-right of the question pane was dependent on the fixed ‘question order’ field stored in the database I had to ensure this data was reset after the question data was randomised and before it was used in the front-end. So there was quite a lot to update, but it’s all working now.
Also this week I responded to questions about WordPress plugins from Petra Poncarova about her Erskine site (https://erskine.glasgow.ac.uk/) and Amy Wilcockson about the Robert Fergusson site (https://robert-fergusson.glasgow.ac.uk/).
I spent the remainder of the week beginning work on the front-end for the Robert Burns correspondence map. I’d completed work on the CMS for this project several months ago and since then a researcher has populated it with data about locations, people and correspondence and it’s now time to see how all of this will work on an interactive map. Some of my time was devoted to planning how the resource will function and some further time was spent setting up the basic infrastructure and an initial map.
For now the map uses the six-inch Ordnance Survey maps (1843-1882) from the NLS and the same base-map as I used on Gerry McKeever’s Regional Romanticism map (https://regionalromanticism.glasgow.ac.uk/paul-jones/), although this may change. Currently the map appears within the layout of the site, with a ‘full screen’ option in the top left, but I may change this to make the default view take up the entire browser window, as with the Paul Jones map linked to above.
I decided that I wanted to try and have a map menu that appeared across the full width of the bottom of the map, but was unable to find a Leaflet plugin that offered this. It’s likely that this is because Leaflet plugins have to be added to a specific container that is associated with either the top left or right or bottom left or right of the Leaflet map – there doesn’t appear to be anything that expands across the full width of the map. I tried to implement a layout that would break out of these confines but didn’t manage to find a CSS solution within the Leaflet framework so instead I created my own pane using jQuery. This currently takes up the bottom third of the map, has a semi-transparent background and has a button that slides the panel down and hides it, and another button that slides the panel up and reinstates it, as you can see in the following screenshot:
The menu is currently empty but it’s here that I will place the timeslider to limit the data to specific dates, plus options to filter the map by categories and people. Currently every location in the system is displayed as a red dot on the map, but as of yet there is no information about correspondents and correspondence. I will add lines between locations to show correspondence and I still need to figure out how I’m going to add correspondents and display the information about each correspondence. I’ll continue with this next week.
