Enhancing User Experience in Wagtail Open Source: Fixing an Unhandled Error

TemidayoTemidayo
2 min read

Introduction

As a contributor to the Wagtail Open Source Project, I had to work on an input validation problem. This was recent. It also offered me an opportunity to delve deeper into Django. This problem falls into the category of UI testing. This is a type of testing done to ensure a website behaves as expected during user interactions. Specifically, the issue is about input validation for tags. Tags are important component in content management systems like Wagtail.

The Problem: Unhandled Errors with Django Taggit

Wagtail, a content management system, relies on Django Taggit for managing tags. But, there is an issue with taggit. Django Taggit lacks input validation for tags longer than 100 characters. You might wonder why this is a big deal. Well, when a user enters a tag exceeding this limit, it results in an unhandled error. For users, this could pose a frustrating experience. For developers, it implies writing more custom code.

In the world of open-source projects, such problems need attention. In Wagtail's case, when a user inputs a tag longer than 100 characters, it would lead to a 500 network error. This issue is ell documented in the GitHub repositories of both Django Taggit and Wagtail. You can find them here:

  1. Django Taggit Issue

  2. Wagtail Issue

The Solution: Fixing the Unhandled Error

The good news is that these issues can be fixed, and that's exactly what I set out to do. I aimed to improve the user experience for anyone using Wagtail. While it's rare a users would enter tags longer than 100 characters, addressing such issues is crucial to enhance the resilience and robustness of the Wagtail Open Source Project.

I created a pull request in the Wagtail repository to tackle this issue head-on. In this pull request, I introduced input validation for tags, ensuring that tags exceeding the 100-character limit is handled without causing a network error. This improvement improves the user experience. It also strengthens Wagtail community of developers and contributors.

You can find the pull request here: https://github.com/wagtail/wagtail/pull/11119

Conclusion

In open-source projects, UI testing issues can have an impact on user experience and the project's reliability. Identifying and addressing such problems can make open-source projects more accessible and reliable.

0
Subscribe to my newsletter

Read articles from Temidayo directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Temidayo
Temidayo

Temidayo Azeez is a technical writer and software engineer. He loves programming, learning about new technologies, and making open source contributions. He enjoys good music too.