LocalGov Drupal - Sprint 4 notes

Agile Collective is working with developers and managers at Croydon Council, Brighton & Hove City Council and a growing number of other councils to refactor existing Drupal 8 code and configuration into a more generic Drupal distribution for UK councils, aptly named LocalGov Drupal. In the spirit of the Local Digital Declaration we are working in the open and publishing our sprint notes as we go. We've just finished sprint 3.

What we've been doing

Sprint 4 added some new functionality with the introduction of an alert banner, services inward navigation and campaign pages as well as some bug fixes to previous work on step by step and guide pages.

Alert Banner

Councils often need to make an urgent alert that is eye catching to draw attention to specific information, such as a COVID-19 update. Dan Champion and Andy Broomfield spent significant time this sprint re-architecting the alert banner implementation from Brighton & Hove City Council.

LocalGov Drupal alert banner
LocalGov Drupal alert banner

The alert banner is designed to be displayed on all pages, if enabled, but does not ever have a page of its own. It is now built as a custom content entity, as it is not standard content. As a content entity, it is structurally relatively simple, with a title, description, link and status, but it needs does have a few complexities. A new alert must unpublish all other alerts (only one is allowed at a time), the appropriate caches must be expired when publishing a live alert and it includes a extra step when publishing, warning the content desiger that they are about to publish a site-wide alert, unpublishing all others. 

https://github.com/localgovdrupal/localgov_alert_banner

As this is a fairly discrete piece of functionality, it has no dependencies on any of the other LocalGov Drupal modules and can be installed on any site, something we are trying to support wherever possible.

Services inward navigation

Admin user experience is something we are trying to keep in mind as we continue this work and one area that has had some attention this sprint is in the referencing and linking of service pages. Just to recap, service pages are the main content type that constitutes the bulk of the content on a council’s website and are arranged into a hierarchy of services via service landing pages and service sub-landing pages. The service pages can be linked to from a service landing page, but all service pages must reference a service landing page. This means that a service area of a website might have lots of service pages that reference a given service landing page, but the service landing page might only link to a subset of these service pages. Got it? Good! We’re now trialling an approach to improving the admin user experience here by generating a list of service pages that reference a service landing page but are not linked to from this service landing page.

LocalGov Drupal services incoming links helper for content designers

In the screenshot above, the service page node and the Lorries node  are represented as small blocks at the top of the screen, both reference this service sub-landing page, but neither are linked to in the child pages section of the landing page. A content administrator can now see this unlinked content and drag the content onto an empty field to populate that field. Both the url and the link text of the ‘child pages’ field will get populated. We will need to do some further UX design and user testing to make sure this feels intuitive and is presented well, but early user testing suggests that this is already a welcome improvement.

Campaigns

The bulk of content pages on a council website is information about a service. Following guidance from gov.uk, councils are encouraged to publish such information to be as clear, consise and accessible as possible. This means without ideally images, media or other related content that is not directly relevant to the user need in question. This results in pages that are short, text based and have no images. Councils also need to create more image rich pages for a number of reasons. One of these is for a campaign, a time limited programme to promote a new service or encourage changes in behaviour. The campaign overview and child pages were created to service this need. The campaign overview page and campaign child pages allow the content designer to create an image based section with a slightly different look and feel and easy navigation between the pages with a campaign specific menu. An example of a campaign overview page is the wedding and civil partnerships page on Croydon Council’s website.

LocalGov Drupal campaign page

The campaign page content types from the BHCC and Croydon Council websites use the paragraphs module to allow the content designer to insert components of content such as text, image, text with image, quote, call-out box and links.

The original architecture used nested paragraphs to provide structural layout, such as two columns of text or a text block with an image aligned to the right. We considered moving to layout builder, now that it is in core. The ability to place blocks of content into flexible layouts is attractive, but the switch from editing a node form to editing in the front end was considered potentially disruptive to content designers who are already using the campaigns content types.

Instead of keeping the existing nested paragraphs, or moving all the way to front end editing in layout builder, we’ve decided to try a middle way, layout paragraphs. This is a relatively new module, evolving directly from entity reference with layouts. It allows us to define a number of layouts that are available to a paragraphs field, into which we can place paragraphs. The upshot of this is that a content designer can insert a layout, then insert paragraphs of content into each section of the layout.

Early reviews suggest that this is a welcome approach for content designers, combining the familiarity of content editing within the node edit form with the power of layout discovery and drag and drop to rearrange blocks of content. With the appropriate range of layouts and robust paragraph components layout paragraphs is an exciting approach to improving the admin user experience.

LocalGov Drupal layout paragraphs
Layout paragraphs in use within a node edit form of a campaign page

Retrospective

The most important meeting of the sprint is of course the retrospective, where we review what's going well, what could go better and make actions to make improvements for the team in the coming sprint. We allow up to an hour for the retrospective and interesting feedback is flowing well from all parts of the team, celebrating progress and suggesting ways to improve.

LocalGov Drupal retrospective board
Stickies on the retrospective board for sprint 4, using Jamboard

Next up

In the next sprint we're hoping to be joined with additional development resources as Bracknell Forest come aboard, initially focussing on theme architecture and paragraphs components to firm up the campaigns pages functionality and ensure it is flexible enough to meet their needs.

We will also start looking at directories, which should be interesting!

Back to blog