My LocalGov Drupal contributions for week-ending August 9th, 2024

Here's what I've been working on for my LocalGov Drupal contributions this week. Thanks to Big Blue Door for sponsoring the time to work on these.

Beautifully crafted digital products and experiences that matter.

Need LocalGov Drupal services? Give Big Blue Door a shout.

Meetings and Meet-ups

  1. Merge Tuesday: Merge Tuesday this week was a monster merge-a-ton, although no new releases for any projects came of it.
  2. Technical Governance Group: Our monthly meeting about how we keep track on what we do from a technical point of view for LocalGov Drupal. This month we chatted a lot about "what do we do when someone wants to add a new feature to LGD?"
  3. Tech Group Drop-in: This week's meeting was very technical. We talked about ddev set ups, running update hooks manually, composer and all that goodness that I like to let other people think about.

Code Contributions

Netcall Module Ai Widget

The big one this week was working on a new feature for a new module. Yep, I was working on a new feature for a module that isn't even released just yet!

I've spent some time over the past two weeks working on a module to allow councils to integrate the Netcal AI Widget into their LocalGov Drupal sites. It's a simple enough module to allow you set the workspaceId and partitionId so the AI Widget will appear on all pages of your site. That's the module that is not released just yet, but is almost ready. 

The new feature I was working on was to add a new field on the settings page so that you can override what AI Widget shows on what page or what site section. I did this with a textarea where you can add a list of partition ids and paths for them to appear on, placing one on each line, like this:

par123|/news
par123|/news/*
par456|/events
par789|services/*

The above will mean that partition par123 will be used on the /news page and also any other pages under news, and partition par456 will be used on the /events page only, and par789 will appear on all pages under /services but not services itself.

Here's the PR for the new module and also this new feature.

Elections Module

We got a stable release of the elections module out the door one day before the last parliamentary election in the UK. We are now making this better in preparation for any upcoming elections. I spent some time this week working on the elections module.

  1. Fix an error being thrown by the elections libraries trying to load a file that was removed during a major refactor back in June.
  2. Improve the layout of items on the election summary page.
  3. We've an issue that has been bugging us for a while, whereby our results in charts are in the form of decimals ranging from 0.0 to 1.0. So if a political party wins 3 seats, we report that they have won 0.3 seats. We have a PR now to make sure we use rounded-whole numbers instead.
  4. A small fix so the number of votes uses a comma when separating hundreds from thousands, e.g. we want 10,000 instead of 10000 ... and now we have it!
  5. We had a level A accessibility issue from our election summary table by not having any table header for the hold/gain column. That's fixed now.
  6. A major issue with the elections module is that if you have more than 5 political parties in your constituency you will only see the first 5 alphabetically when on small screen devices. The fix was pretty simple, but tracking down the reason for it took a bit of time.

I have 4 more elections issues assigned to me. Hopefully I'll get to the rest of them next week.

Smaller items

  1. I got through quite an amount of reviewing PRs, especially some for the docs site that Joeri has created. Thanks for helping to make our docs better, Joeri.
  2. One of the larger PRs I reviewed was for removing js-cookie from LocalGov Alert Banners, thanks to Adnan's work. What this threw up however was another issue - unrelated - about the alert banner module, namely full page alerts were not covering the full page.
  3. And here's a nice PR to fix that alert banner issue.

Filed Under:

  1. Drupal Planet
  2. Drupal
  3. Open Source
  4. LocalGov Drupal