Announcing the Windows Community Toolkit Labs!
Announcing the Windows Community Toolkit Labs (Beta) 🧪
We’re happy to announce the Windows Community Toolkit Labs is how we will be developing all new features for the Windows Community Toolkit. It is meant to be a safe space to collaborate and engineer solutions from the prototyping stage all the way through polished finalized component. It will make it easier to contribute to the Windows Community Toolkit, try out new features still in development, and cooperate together on the development process.
This new ‘Labs’ repository will house all our discussions about new ideas and development as well as initial ‘experiments’ (as we call them). Each experiment represents a new component (or set of related components) that will start its journey from an initial implementation to a well-tested feature working through a defined set of criteria and quality gates along the way.
Experiments are encapsulated to focus on not only the code itself, but documentation, samples, and tests. Code can be contributed and incrementally built by multiple authors as needed, and automatically gets bundled in a simple consumable NuGet package. Feedback can be provided by our developer community as components mature before being added for broader distribution within our main Windows Community Toolkit repository. A centralized template provides everything needed to get started writing a component within Labs!
Everything’s also been built to support developing components not only with our existing UWP technology, but with the new Windows App SDK / WinUI 3 and Uno Platform in mind as well, all with a single code base! That’s right, our plan with a future 8.0 release of the Windows Community Toolkit is to have packages that make it easy to develop and migrate across all these technologies! We plan to work with the Uno Platform team to integrate their existing fork into our main repository.
We’ll be rolling out the adoption of our new processes slowly as we stabilize and finalize this new code base. We want to be careful about adding new experiments until we test our template, to minimize churn on experiments. In the meantime, we welcome folks looking to help with the infrastructure of Labs itself, see our issue list here.
If you want to get right to the action, you can find the Windows Community Toolkit Labs Sample App right here in your browser!
About Uno Platform
For those new to Uno Platform – it allows for creation of pixel-perfect, single-source C# and XAML apps which 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 and Open Source (Apache 2.0) and available on GitHub.
At a Glance – What’s New? 🔍
- Why Windows Community Toolkit Labs?
- How does Labs resolve these problems?
- What’s in the Windows Community Toolkit Labs?
- Using Labs experiments in your App
- What’s next for Labs?
- The Future – Windows Community Toolkit 8.0
We’ve done a lot with the toolkit over the past few years, including adding Arm64 support, the .NET Community Toolkit, and the MVVM Toolkit. We’ve also broadened our organization and supported the initial release of the Windows App SDK.
Our Toolkit family has grown, as have the folks that rely on the Toolkit, like our own first-party applications. Not only that, but we see technology changing and the migration towards WinUI 3 in the Windows App SDK. With all these things in mind, we needed to step back and evaluate how we build and support the toolkit moving forward over the coming years. Our quality bar has been raised where it is hard to develop/prototype new components with our community and review them when the final destination becomes part of our final releases when committed.
On top of that, if you didn’t know, we currently support the Windows App SDK with a completely independent branch of the Windows Community Toolkit. Everything is built first for UWP and then has been manually ported and integrated into this other branch by the Toolkit team. This is not sustainable. Huge shout out to Alexandre Chohfi for maintaining this effort for us from the onset of Project Reunion to the Windows App SDK 1.0 release! 🦙💗
You may have also noticed the slow-down of changes in the main Windows Community Toolkit as well this year, it has been for this reason as well. We want to merge the streams together (I ain’t afraid of no ghosts! [Sorry 🙈]), and only maintain a single codebase for the Toolkit moving forward. We’ve been trying to minimize changes in the toolkit since our current 7.1.2 release where our UWP and WinUI 3 code was aligned. However, creating Labs has taken a bit longer, so we intend to do another migration of bug fixes to our WinUI branch and release a 7.1.3 update in August.
Windows Community Toolkit Labs provides us the means to take features from ideas and prototypes all the way to finalized components in a collaborative and low-barrier environment. We can make changes in Labs, try out new ideas, and not worry about having code needing to be completely ‘shippable’ to make its way to the repository like we do today.
This lets us gather feedback from developers, collaborate with folks easily on the component, tests, and documentation, as well as reduce the overhead on reviewing monolithic PRs. We can then abstract quality gates as part of this process and incrementally review and move components from the prototyping stage towards a production quality component that we know our thousands of developers using the Toolkit can depend on.
The current Toolkit codebase has many components within it, so developing a new one can be a bit daunting. Even more so once factoring in tests, samples, and documentation.
Our approach with Labs has been to focus on the core developer experience. Everything in Labs is built around providing a focused development environment, so a developer can just pull up their own component and work on everything from the component itself, to tests, samples, and docs all in one easy to access place.
We’ve also made writing docs and samples part of the core development experience, so they can be easily worked on over time as a component is being built to showcase its usage in different bite-sized scenarios, instead of an afterthought.
And last but not least, Labs has been built with enabling us to write a component once and have it work across all our UWP XAML based platforms, i.e. UWP, WinUI 3, and Uno Platform! Every experiment in Labs lets you seamlessly run and test your component against UWP and WinUI 3 or run samples in your browser with WebAssembly on Uno Platform.
That’s a great question! Since we leverage Uno Platform, you can try out the Windows Community Toolkit Labs Sample App right in your browser!
We have a number of experiments setup already. You can find our experiment list here, it includes:
CanvasLayout– A prototype virtualized canvas view on top of
Canvaswhich supports basic manipulation out-of-the-box.
SettingsCard– A component for providing a consistent settings experience for your application.
PropertySizer, and the newly refactored
GridSplitter. This base class provides a consistent experience across these user-focused manipulation controls for a variety of different scenarios and interactions.
GridSplitternow has better behavior fixing a long-standing bug and more WPF polyfill properties like
KeyboardIncrementas well as
RightToLeftflow handling and support for
IsEnabled. The cursor will now update on WinUI 3 as well!
StackedNotificationsBehavior– A Behavior for the WinUI
InfoBarcontrol to provide a messaging interface like the Toolkit’s
With more coming soon!
Head on over to our Labs repo and find out all about how to try out these experiments within your own projects.
It’s really all a matter of adding our Preview Package feed to your NuGet configuration:
All these new experiment packages from Labs will start with
CommunityToolkit.Labs.Uwp.* for UWP and
CommunityToolkit.Labs.WinUI.* for Windows App SDK. Uno Platform developers can download the same package which is appropriate for their Xamarin (UWP) or MAUI (Windows App SDK) based runtime as well!
NOTE: Even though the packages contain
.Uwp.the namespace will be consolidated under
CommunityToolkit.Labs.WinUIwhen used within your code/XAML still, the package name is just for differentiation of your underlying runtime on NuGet.
We’ve learned a lot building labs over these last few months. There’s still things to do beyond creating experiments. We’d like to focus on ensuring we’ve got any bugs out of our infrastructure first over the next few weeks before adding new ones.
If you’d like to get involved and help us with labs, take a look at our issue list and jump into the discussions. Let us know if it’s something you think you can help us resolve in the underlying infrastructure.
After we ship the 7.1.3 release of the Toolkit, we’ll start opening Labs to new experiments and focusing on moving new development there as we work to restructure the existing Toolkit infrastructure, see below!
Any new feature work for the Toolkit should start occurring within our new Windows Community Toolkit Labs space.
Our plan is to now adopt our new technology within Labs across the entire Windows Community Toolkit repository. This will involve a lot of restructuring and churn. We hope the release of the 7.1.3 hotfix in August will help tide us over for a few months as we transition the repo and integrate the existing components within their new environment.
Please bear with us during this time. If you are interested in helping us tackle migrating specific components, please let us know in our planning issue to help coordinate with our team. We’ll be updating it with a breakdown of how we’ll approach this and which components are being addressed and by whom as things progress later this year. Our plan is to focus on merging our branches and supporting running components on UWP, WinUI 3, and WebAssembly with Uno Platform. We also intend to use this effort to improve our samples and documentation as part of our ongoing consolidation of our docs to their new home.