Drupal Planet

My LocalGov Drupal contributions for week-ending September 6th, 2024

Beautifully crafted digital products and experiences that matter.

One of those weeks where we got lots and lots of smaller issues cleared up, and a new module released, and a very quirky bug discovered.

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

Meetings and Meet-ups

  1. Merge Tuesday: Lots of talk this week about supporting Drupal 11 and what we need to do for our automated tests to work for it, while also supporting Drupal 10.
  2. Accessibility Meetup: Michael from Big Blue Door gave a really interesting presentation on the tools he uses for checking the accessibility of their websites, notably Axe, Wave, and Lighthouse, as well as manual testing and keyboard navigation testing.
  3. Tech Group Drop-in: We had two big juicy topics today, nice to get down and dirty with tricky stuff - media downloads and empty regions + caching.

Code Contributions

  1. Christopher had a really nice PR created for me to test on Monday morning. The PR would allow our accordion patterns to have more than one item open at a time and also add a toggle to 'Show all/Hide all' accordions. Each of these features can be turned on/off for individual accordion containers. Very nice.
  2. Lee suggested that the LGD Dashboard I built a couple of weeks back should have a link for "Good first issue", so now it does.
  3. We've had an issue for a while now about removing the 'Files' tab from the list of tabs you see on the admin/content page. A lot of content editors are clicking on it expecting that's where their "Files" are, which it is, except what they are actually looking for is their "Media" items. We had a PR to remove this tab altogether, but that will break existing sites, and some users might want to visit it. So. we now have a PR to set the "Files" tab to be a sub-item of the "Media" tab. That makes sense I think.
  4. I had forgotten we had a module called "LocalGov Extra Layouts". Justine created it originally when she needed a 4-column layout, but we then added 4-column layout to the LocalGov Paragraphs module. The other layouts in the LocalGov Extra Layouts module are probably still useful to other councils - 33:66, 66:33, 2x2x2x2, etc. I did some work on these to close out an issue created by Andy saying the module had not been added to packagist (it is now, along with its own shiny composer.json file) - this was the issue that brought this module back to my eyes.
  5. Then I did some work to tidy up the code - fix the package name, tidy up the CSS, remove the redundant template, etc.
  6. LocalGov Extra Layouts had no release branch and no tests, so I created an issue to fix this and then a PR for it to use the shared workflows approach we have.
  7. What module would be complete without a README.md? Well, here's a PR for LocalGov Extra Layouts to now have one.
  8. Issue number 1 for the LocalGov Drupal Dashboard was to create a button that would copy the clone command for a repo to your clipboard. And now we have it.
  9. Whilst there, I did a little clean up of the table layout and the general cards layout.
  10. I had a good chat with Sarah from Blackburn with Darwen Borough Council and we think we've discovered a bug in the path alias settings for publications. I haven't got it fully uncovered yet, and I certainly don't have a fix for it yet, but I've some notes written up about it, and we'll get it solved from there.
  11. Following that call, I put together a video to demonstrate the bug. Hopefully that will help us to get a fix for it quickly.
  12. Zach posted a PR to link the SVGs on publication cover pages to their respective files. We got it reviewed and merged.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

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

Beautifully crafted digital products and experiences that matter.

This week was all about catching up on notifications and open PRs from last week, and creating a mega amount of new PRs.

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

Having spent most of last week's time working on the new LocalGov Drupal Dashboard, I had a bit of a backlog of issues, PR, notifications, etc on GitHub to read through, respond to, update. Not the most glamourous part of open source development, but you need to keep on top of the repos you are the maintainer for. And then ... a gem pops up. Christopher proposed a new module, built it, and put it on GitHub for us to review. The module is a jobs listings portal, something we probably should have built before now, but it's never too late.

Meetings and Meet-ups

  1. Merge Tuesday: We spent most of the MT time reviewing the 13 PRs I opened for the $is_syncing issue that I spent half of Monday working on.
  2. Tech Group Drop-in: This was a really juicy meeting this week, discussing Big Pipe/Cachability/Empty Regions/Supported CSS ... and some other items that were a little less taxing on the brain.

Code Contributions

  1. We have much better tabbing order now for keyboard users when tabbing from the services menu toggle to the services menu. Now when you get to the last item and click tab, it will tab back to the main menu area. Previously it was tabbing to the main content area. Better accessibility is better for everyone.
  2. Sticking with the theme of accessibility, Maria posted an issue demonstrating that headings in the footer regions were black on a dark grey background, failing contrast conformity for WCAG guidelines. So I created a PR to add variables for headings in footer regions, and we can then easily set these in our variables.css files for --color-pre-footer-heading, --color-footer-heading, and --color-post-footer-heading.
  3. Sometimes reviewing PRs is fun, for example when you get a MEGA pull request to update the docs site from VuePress 1 to VuePress 2. Thanks to Lee for creating this PR, it's not one I was relishing creating. 🙂
  4. Keelan opened an accessibility issue over a year ago where JAWS screenreader was reading out the decorative ">" symbol in our start buttons. We couldn't reliably reproduce/fix it at the time, but thanks to the nifty new CSS "alt text" property for the CSS "content" attribute, we now can. I created a PR for it, hopefully that's one more accessibility fix we'll have in our codebase soon.
  5. We've had an issue pop up a few times recently with config being imported and install hooks being run at the same time causing issues. We figured out it's because we are not sufficiently checking to see if config is being imported before we do our manipulations. Stephen created an issue for this, and then I created 13 pull requests to fix the issue everywhere it might arise. This was quite boring, but necessary.
  6. Erik posted a whopper of an issue, in great detail, showing some shortcomings we have in LocalGov base for trying to detect if a region is empty or not before we render it. We're using the same approach we created for the Umami theme in Drupal core, but no matter what you do something has to give - either we lose caching on some blocks, or we lose the ability to use Big Pipe on others, etc. I'm not sure exactly how we'll solve this, but I'm really looking forward to the conversation. Perhaps you can jump in to it too here.
  7. I've been making some moves to try standardise some of our components. The first I've been tackling is our "Previous/Next" component. We use the same thing on blogs, step-by-steps, etc but have different templates for them all. I have a number of them now using the same template. Thanks to Christopher for creating a PR to add publications prev/next to the list, which I reviewed and merged.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

Placeholders are often a bad UX pattern

Placeholder that looks like a disabled field

When the value of the placeholder is the same as the value you need in the field, it just looks like a disabled field.

I had an issue today where Google Tag manager wasn't loading on a site for me on a Drupal site. I checked the settings over-and-over again, but couldn't see any issue.

Eventually I realised that we were missing the hostname. How did I miss this? Well, the hostname field had a placeholder which was exactly the value of the hostname needed, so it actually looked like it was filled in and the field value couldn't be changed (like a disabled field)

Here's an example of where placeholders can be a bad UX pattern. Maybe if the placeholder said "Add hostname here", it might be better. But again, it's not actually needed since the form label says "Hostname" and the description under the field tells me what I needed to do.

How did I find out that it was a placeholder and not an unchangeable value? When I tried to save the page after changing a different value, the page wouldn't save. Checking the browser's console told me "The invalid form control with name=‘hostname’ is not focusable."

Not a very helpful message but at least it inspired me to try to click on the field and then "Hey, presto!" the default value disappeared (since it was a placeholder, not a default value), allowing me to enter the hostname, save the form, and save the day!

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

My Drupal Core Contributions for week-ending August 23rd, 2024

The Confident Logo, Drupal Agency led by Mark Conroy

I've been spending some time recently trying to get the Umami demo message from toolbar into the navigation module.

I finished up last week with the HTML for the message being set in the navigation menu block, via a preprocess hook.

Ivan, another co-maintainer of the Umami profile, had a suggestion that we hook_preprocess_layout in stead, so I've updated the MR to do just that. 

While there I created a new library demo-profile-warning and am using that to style the warning message.

Hopefully that's enough to start moving that issue forward, so I can then get back to the original issue which started all this, removing toolbar and enabling navigation module in Umami.

As well as the above, Ivan also has a really interesting MR in development to use Web Components for rendering the status messages in Umami. I gave that a review, I think I'd love to use it, so am looking forward to it being completed and merged.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

My LocalGov Drupal contributions for week-ending August 23rd, 2024

Beautifully crafted digital products and experiences that matter.

This week I built a LocalGov Drupal dashboard, so we can better keep track of all our projects.

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

Meetings and Meet-ups

  1. Merge Tuesday: We had the usual people in attendance, and some interesting conversations about running tests against both LGD and microsites by default so things we fix in LGD don't break something in microsites.
  2. Tech Group Drop-in: We spent most of the time on this call today discussing how to create Drupal modules for people who were somewhat new to Drupal and did a deep dive into creating a content type with paragraphs fields to create a "School term calendar". Not what I was expecting from the meeting, but very energising to be part of it.

Code Contributions

I have been doing some pretty hard-core contributing to LocalGov Drupal over the past few months, thanks to the kind sponsorship of Big Blue Door. This week I decided to go a little bit easier on myself and have some light-hearted fun with an idea I've been toying around with in my mind for a few weeks.

The idea is to build a dashboard type website to list all the repos for LocalGov Drupal. Then create a card item for each repo giving a link to the repo, it's issues, PRs, and other stats. As well as that, I'd like to be able to quickly filter out repos, or sort them by "most open PRs" and things like that.

I spent a day making a start on this and got pretty far. I'll try get to more of it in the coming weeks. You can view the code for it on GitHub and check out the live website.

Update: people in LGD land liked the idea a lot, so I spent another half a day adding some requested features, such as

  • Show all items as a grid
  • Show all items as a list
  • Show all items as a table
  • Add links to all approved PRs
  • Add links to all non-approved PRs

I'm really happy with how it's come on so far. And there's a lot of chatter about new possibilities for it. Hopefully this will be the start of a cool new Dashboard initiative for us.

One thing that might arise in the future and cause a definite need for this dashboard is if we move all our code to Drupal.org. We won't have an "Organisation" like we have on GitHub so this dashboard will give us the central focus for trying to keep track of 70+ projects.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

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

Beautifully crafted digital products and experiences that matter.

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.

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

I only got around to working on LocalGov Drupal for one day this week, but we have some really nice work done in this. I'm especially happy with item 4 below which fixes some accessibility issues.

Meetings and Meet-ups

  1. Tech Group Drop-in: I was the only core maintainer at this week's meeting, which was kinda scary and kinda cool all at the same time. We discussed publications, permissions, deployments, upgrades and ... why do we have so many updates!

Code Contributions

  1. I have an MR for the Preview Link module so we can copy the preview link to our clipboard. A new release of Preview Link module has meant that my patch no longer applies, but the merge conflict is just one line, so it should only take a second to fix. Right? Wrong - I've no idea what happened but it was one of those days when trying to run the core linting tests on my MR caused my DDEV to crash and crash and crash. Well, I eventually got DDEV working again, but couldn' get the core JS tests to run against the patch. You win some, you lose some.
  2. We have a "sticky header" PR open for LocalGov Base for a while now. It's close to being ready for merging, except we have an accessibility issue where links might be behind the sticky header so you can't see what you are focussed on. The bigger issue is I can't replicate it in order to get a fix for it. I'd be happy if you could do so and comment on the issue.
  3. Rupert from Chicken created a pretty nifty issue in LocalGov Base to add a new variable that reverse CMSs could use to render breadcrumbs. The specific use-case is for the ModernGov templates, but anyone else could also use it - such as Netcall. And true to form with Rupert, it wasn't just an issue he created but also a pull request to go with it.
  4. Maria reported a humdinger of an issue concerning accessibility and focus-order for items in the header/services menu. I created a PR to fix them, let's hope we get this merged soon, better accessibility is better for everyone.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

My Drupal Core Contributions for week-ending August 16th, 2024

Code Enigma Logo

Here's what I've been working on for my Drupal contributions this week. Thanks to Code Enigma for sponsoring the time to work on these.

I'm a bit sad this week, it's the last week of my 10-week sponsorship from Code Enigma. I'd love to keep up this momentum, so if you or your agency or organisation wants to help me to keep making Drupal better for everyone, please get in touch via mark@mark.ie. You can read about the benefits of it for you in my recent blog post.

Last week I worked on updating tests that were failing because of the new MR I have to add the navigation module to the Umami profile. Once they were all done another issue arose - the placement of the Umami "this is for demo only" message is not where it should be.

The good folks at the navigation initiative have a design for it, and we'll need to get that implemented before we can merge the work I had been doing.

So, that's what I spent this week working on. I got a nice MR eventually (after going back-and-forth deciding if I should preprocess the block the navigation menu is in or the menu itself). I decided to preprocess the block and have the HTML I want for it worked out now. Next week, I'll try get to writing the CSS for it and finishing it off.

Need Drupal hosting services? Chat to Code Enigma.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

My Drupal Core Contributions for week-ending August 9th, 2024

Code Enigma Logo

Here's what I've been working on for my Drupal contributions this week. Thanks to Code Enigma for sponsoring the time to work on these.

Last week I was working on a merge request to add the new navigation module to the umami profile. If this is to be merged, then we won't need the toolbar module any more. So I updated that merge request to not install the toolbar module and to also remove toolbar-related permissions from authors and editors.

But after that, things got weird. Well, not weird, but more difficult. We have a message that shows on the toolbar to say "This site is intended for demonstration purposes.", but since we don't have a toolbar any more, well ... what happens to the message? Also, we have tests to make sure the message is in the toolbar, so those tests are now failing.

The options, as I see it, are:

  1. Remove the test for the text “This site is for demonstration …” and remove the text “This site is for demonstration …”.
  2. Place the text “This site is for demonstration …” somewhere else and update the test.

Update:

I think I have this is a good position now.

  1. Remove toolbar from modules to enable in demo_umami.info.yml
  2. Add navigation to modules to enable in demo_umami.info.yml
  3. Move "This site is intended for demonstration purposes" message from toobar to page_top
  4. Rename toolbar-warning library and classes to 'demo-profile-warning' and classes
  5. Remove access toolbar from permissions in testDemonstrationWarningMessage test
  6. Update permissions for author and editor
  7. Update the CSS so there's less of it, it's easier to read and we have the same CSS for small screens and large screens

I'm really looking forward to getting this merged to core, a much larger issue than I had originally intended it to be.

Thanks to <a href='https://www.codeenigma.com/'>Code Enigma</a> for sponsoring my time to work on this.

 

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

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

Beautifully crafted digital products and experiences that matter.

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.

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.

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).

Sponsorship slot available for Drupal contribution credits

Sponsor Drupal development. Get issue credits and lots of marketing

I have a small window of time available if you'd like to get credits for sponsoring Drupal contributions.

For the past number of months I've been sponsored by Code Enigma to work on Drupal core. That sponsorship is coming towards its end, though we both hope to renew it in the not-too-distant future. 

In the mean time, I have a small window of opportunity for someone else to sponsor Drupal contribution time. Contact me at mark@mark.ie if you'd like to chat about it.

Thank YOU so much for all the publicity, not why we did it but extremely welcome nonetheless! :-)

Greg Harvey, Code Enigma

What do you get from it?

  • Issue credits on Drupal.org for all my work
  • A message on each of my comments on Drupal.org to thank you for sponsoring my time to work on that issue
  • A blog post each week detailing what I have been working on
  • A mention in my weekly newsletter about your sponsorship
  • A shout out on Twitter/Mastodon/LinkedIn each week, linking to what you have sponsored
  • Extra blog posts and/or videos about larger features I work on

I really like how Mark Conroy has been documenting his contributions to Drupal. It makes sponsoring him more appealing to organizations and individuals.

Dries Buytaert, Drupal Founder and Project Lead

Ready?

I expect this slot to go quickly, so get in contact to secure it via mark@mark.ie.

Work completed to far

Over the past 8 weeks, here's what I completed from the Code Enigma sponsorship:

Join the "Something nice ..." newsletter

The full title is "Something nice, something quirky, something else".

I send an email once a week with something nice, something quirky, and something else that I think is interesting (all with a web development theme, of course).