unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.94k stars 724 forks source link

Ways to Automate WinUI Control Updates #4440

Open robloo opened 4 years ago

robloo commented 4 years ago

What would you like to be added:

Currently WinUI controls are imported manually. Right now that is unavoidable. However, long-term we need to automate as much as possible. Areas of automation that are possible right now are:

  1. Change detection
    • We should be recording in a ledger some place, for each control directory, which commit it was last manually updated for. This would allow a script to check if a new WinUI commit modified a directory and flag code that needs to be updated. It should be possible over time to gradually make this more granular than simply by directory. `ColorPicker : SHA'
  2. Strings / translation updates should automatically be copied over. We don't change these at all.
  3. XAML should automatically be copied over. There might be some special cases but for the most part XAML is copy pasted.
  4. Generate .Properties.cs (and maybe an .Events.cs) file directly from the IDL in WinUI.
  5. WinUI API tests and control test pages may be copied over automatically with minor modification.

Doing the above will actually catch a significant number of issues before they happen and ensure code is synced with WinUI. This is especially important as long-term Uno will essentially just be a c++ -> c# conversion of controls with no special code.

Why is this needed:

For which Platform:

Anything else we need to know?

This is really to open the discussion. I don't plan on working on this myself in the foreseeable future.

jeromelaban commented 4 years ago

Thanks for the report. Yes, this should be something needed mid-term.