Skip to content

Week 11 recap GSoC 2025 - Documentation and Refactoring

Sunday, 17 August 2025  |  Ross Rosales (rossr)

Intro

After getting the Selection Action Bar into a working state over the past few weeks, this week I focused on creating documentation and refactoring code to improve clarity, maintainability and make sure other contributors can build off of this work without confusion.

Progress

Documentation

One of the most important parts of contributing to open source is writing about what you have built. Krita's documentation is maintained in a dedicated repository. This week I began drafting a merge request to add a page with instructions and UI images under the reference manual tools section.

My aim is to ensure that any Krita user can easily understand the feature through both the documentation and the code.

Refactoring

Another important part of contributing to open source is writing code that is easy to read and maintain for future contributors. My aim was to improve the structure of the code without changing its behavior. I did this by reducing duplication, using descriptive variable names, and replacing magic numbers with named constants.

Instead of manually creating and connecting each button, I introduced a helper function that takes configuration data (icon, tooltip, slot) and handles the setup in one place.
Create Button Helper

I also applied an extract method refactor, grouping the buttons and toolbar UI logic into their own functions.
setupButtons and drawActionBarBackground

Conclusion

This week reinforced the importance of writing both documentation and clean code. I learned that documentation ensures users understand your work, while refactoring ensures the code is clear and easy for contributors to improve.

Heading into the final week of GSoC, I am ready to share my contributions and overall learnings. My focus will be on gathering feedback and finalizing the feature!

Contact

To anyone reading this, please feel free to reach out to me. I’m always open to suggestions and thoughts on how to improve as a developer and as a person.
Email: ross.erosales@gmail.com
Matrix: @rossr:matrix.org