Contributing to Uno Platform – From Novice to Expert

In the open-source world, one of the most fulfilling experiences is contributing to a project that you’re passionate about. If you’ve been eyeing Uno Platform as your next potential contribution target, you’re in the right place. This guide will walk you through every step of contributing to Uno Platform, from understanding the project’s structure to making your first code contribution.

Uno Platform is a large project, and figuring out where to start can be overwhelming. But don’t worry, we’ve got you covered. Whether you’re a seasoned developer or a novice looking to dip your toes in the water, there’s a place for you in the Uno Platform community.

Remember, contributing to an open-source project is not just about writing code. You can add value in many ways, from reporting issues and providing feedback to improving documentation.

So, let’s dive in and explore how you can become an active part of the Uno Platform community.

Jump to:

About Uno Platform
For those new to Uno Platform, it allows for creating pixel-perfect, single-source C# and XAML apps that run natively on Windows, iOS, Android, macOS, Linux, and Web via WebAssembly. It offers Figma integration for design-development handoff and a set of extensions to bootstrap your projects. Uno Platform is free, open-source (Apache 2.0), and available on GitHub.

Section 1: Getting Started

  1. Code of Conduct

    • Before diving in, please familiarize yourself with our commitment to an open and welcoming community. Read the Code of Conduct to ensure a harassment-free environment.
  2. Where to Begin

    • Gain insights into Uno’s architecture and platform-specific details for Android, iOS, WebAssembly, and macOS. Start here for a comprehensive overview.
  3. Resources

Section 2: Uno Platform Repositories on GitHub

The Uno platform repository is a comprehensive hub containing everything that makes up the core Uno project. It is a massive repository, housing several projects, intricate workflows, and a plethora of tests running to validate each feature. This section offers a detailed walkthrough of the Uno platform repository, providing a better understanding of its structure and the particulars of working with it.

Uno Platform Repos

The Uno Platform GitHub organization page is a comprehensive hub containing everything that makes up the platform. There are many repositories, so it is beneficial to understand what the main ones represent.

The main repository is the core Uno Platform repository, named Uno. This repository contains all the source code for Uno Platform itself.

The Uno Gallery is a sample application showcasing many of Uno Platform’s features. It is a great starting point for new contributors, as it lets you get to know Uno in a platform-agnostic way before diving into the internals.

The Uno Toolkit UI is a collection of custom controls built for Uno Platform that are not part of the default WinUI code base. This repository will interest you if you like to design custom controls and none of the built-in ones fits your needs.

The Uno Extensions is a set of helpers, extensions, and tools designed to aid in building your Uno Platform application. If you have developed a helpful utility or extension that makes app development easier, consider contributing it here, as others might also benefit from it!

If you love customizing the appearance of your apps, check out the Uno Themes library, which contains various themes that can be applied to the in-app controls.

The Uno Templates library generates new Uno Platform applications when you create a new project in Visual Studio or write .NET New in the console.

Uno Playground is a web-based application that allows you to experiment with the Uno Platform without installing it on your device.

The Uno Samples repository contains many samples of Uno Platform features and UI that you can use as a starting point for your application.

Lastly, we have the Uno.WASM.Boostrap repo contains a library that takes care of running WASM apps in the browser and Uno.Resiszetizer that is used for resizing SVGs to match different screen sizes and APIs for your target devices.

List of Uno Platform repos

The Repository Structure:

The repository is organized into several folders, each serving a specific purpose. The GitHub folder contains the issue templates that define the list of issue templates on GitHub. The build folder is responsible for building everything in CI. It’s complex, with many operations happening during the CI. Then there’s the documentation folder, housing all the necessary documentation. The most interesting part is the source folder, which contains the source code. Within this folder is a large assortment of projects, each focusing on different aspects of the Uno platform.

Working with the Source Code

The source code in the repository is extensive and includes many different projects—for instance, the Uno.UI folder contains many projects, including the Windows runtime project that houses non-UI APIs such as the accelerometer or GPS geolocator.
There are also several runtime libraries for the specific flavor of the Skia project, each containing platform-specific code. And if you’re interested in building or learning about building C-Sharp code generators, the generators folder is a great place to go and investigate.

Section 3: How to Contribute to Uno Platform

To start contributing, finding an issue that matches your expertise and interests is a good first step. The best way to do this is to filter issues in a repository by the ‘good first issue’ label. This label is manually added to issues that are simple and can be handled by new contributors. However, keep in mind that not all ‘good first issue’ labels indicate that the issue will be easy to resolve. Some may be more complex, so you can choose one you feel comfortable tackling.

Once you’ve chosen an issue, you can clone the repository, fork it, and create a custom branch for your changes. When naming your commit, be sure to follow the conventional commits format. After committing your changes to your new branch, push it. You’ll then be able to head back to GitHub to see the changes on your fork and create a pull request.

After marking your PR as ready for review, a team member will check it and provide feedback. If the PR is practical and makes sense, it will be merged into the Uno Platform, and you’ll have your first Uno Platform commit. [Guidelines for Pull-Requests]

Navigating Open Source Issues for First-Time Contributors

As a newcomer to an open-source project, selecting an issue to tackle can be daunting. Finding a starting point might seem overwhelming with many reported issues and an expansive code base. However, understanding the labeling system used in repositories can make the process easier, particularly the ‘good first issue’ label.

The 'Good First Issue' Label

Take a look into the list of currently open good first issues – these are all issues that have been identified by our core team as suitable for new contributors, with a well-defined scope and a relatively gentle learning curve. Generally, these issues are easier and provide an excellent starting point for beginners. However, it’s important to note that some issues labeled as good first might still be challenging unless they match your experience. Thus, picking something that aligns with your interests and skill level is crucial.

Section 4: Understanding the Main Uno Platform Repository

The core Uno Platform repository is massive, housing hundreds of projects, intricate workflows, and many tests running to validate each feature. This section offers a detailed insight into the repository, providing a better understanding of its structure and the particulars of working with it.

The Repository Structure

The root of the repository is organized into several folders, each serving a specific purpose. The .github  folder contains the issue templates that define the list of issue templates on GitHub. The build folder is responsible for building everything in CI. It’s complex, with many operations executing during CI. Then there’s the docs folder, housing all the necessary documentation. The most interesting part is the src folder, which contains the source code.

Working with the Source Code

The source code in the repository is extensive and includes many different projects. The most crucial are:

  • Foundation – contains foundational classes and utilities
  • UWP – contains non-UI APIs such as accelerometer or geolocator
  • UIcontains UI APIs and controls
  • SamplesApp – sample app we use to validate Uno features and run UI and runtime testing


But there are tens of others, so to make it easier to understand, please see the video included at the end of the article, specifically around the 53-minute mark – https://www.youtube.com/watch?v=6h3r0Uk750M&t=3177s

Targeting Specific Platforms

The platform is extensive and includes many platforms: Android, iOS, Mac OS, Mac Catalyst, Skia WPF, Skia GTK, Skia Linux Framebuffer, WebAssembly, and Windows. Loading all of these targets at once in Visual Studio would be overwhelming. Instead, you can use the cross-targeting props file to pick a specific platform that you want to build against. See https://platform.uno/docs/articles/uno-development/building-uno-ui.html#building-unoui-for-a-single-target-platform for more details.

Did You Know?
Uno Platform is tackling the long-standing issue of underfunded open-source projects. Recognizing the struggles of maintainers in the .NET ecosystem, we launched a sponsorship-matching initiative for contributors. At the same time, this move is not a silver bullet. Still, it aims to empower individual developers, shedding light on the complexity of the challenge posed by large corporations benefiting from underfunded OSS work.

Section 5: Writing Code

Code Conventions:

    • Ensure your code aligns with Uno’s conventions and patterns. Explore Uno’s code conventions and common practices for a smooth coding experience.

Implementing New Features:

Samples App Exploration:

Building and Debugging:

    • Get hands-on with building and debugging Uno using helpful guides like Building Uno.UI and Debugging Uno.UI. Special instructions for macOS development are available here.

Adding Tests:

    • Strengthen Uno’s stability by contributing to the testing suite. Learn about the different types of tests and how to add one with Guidelines for creating tests.

Creating Pull Requests:

    • Understand the Git basics, follow the Conventional Commits format, and read the Guidelines for pull requests before submitting your contribution..

Contributing to Uno Platform 101: From Novice to Expert!

Section 6: Engage & Share

Community & Team Support:

    • Join Uno’s Discord channel (#uno-platform) to discuss issues, share experiences, and connect with the community.

Spreading the Word:

    • Contribute beyond code by providing feedback, reporting bugs, presenting Uno at user groups, or writing a blog post. Let the world know about your Uno journey via Twitter or LinkedIn.

Conclusion

You are now equipped to participate actively in the Uno Platform community. Once you’re ready to start contributing, the first step is to head to the Uno Platform’s GitHub page and then take a plunge! Whether you’re fixing bugs, implementing new features, or simply sharing your Uno experience, your contribution matters. 

Remember, it’s normal to feel overwhelmed when diving into a new area of the code, but with time and practice, it gets easier. Don’t be afraid to ask questions and seek help from other team members. And most importantly, choose areas that interest you and where you can make the most impact.

Next Steps

To upgrade to the latest release of Uno Platform, please update your packages to 4.10 via your Visual Studio NuGet package manager! If you are new to Uno Platform, following our official getting started, guide is the best way to get started. (5 min to complete)

Martin Zikmund

Martin Zikmund

Follow Martin on Twitter

Tags: