Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved common code to shared project #10

Merged
merged 6 commits into from
Dec 7, 2021

Conversation

Arlodotexe
Copy link
Member

@Arlodotexe Arlodotexe commented Dec 7, 2021

First time setup of a shared project to be used between the various sample app heads (both UWP and other platforms). Part of #1 and needed for #6.

  • Introduced a shared project that an empty UWP project can reference for a common zero-config deployment.
  • Created a "Common" folder in root to contain shared code.
  • Moved / renamed .\App.UWP.props to .\Common\Labs.Uwp.props -- the Labs.Wasm.props for Uno will come later.
  • Manually cleaned and recreated the existing sample app (fixed props reference issues)
  • Ensured that each project and solution still loads and builds correctly.

The all-solution now looks like:
image

The CanvasLayout solution now looks like:
image

@XAML-Knight
Copy link

Looks good - the next steps (for Issue #6) to bring in a WebAssembly head are listed here on the Uno site (it's a bit of a clunky manual process at the moment): https://platform.uno/docs/articles/migrating-apps.html

@michael-hawker
Copy link
Member

I would think the MainPage as the first sample page (until we have the magic navigation infrastructure up) shouldn't it be in the sample app project vs. the hidden shared project?

@Arlodotexe
Copy link
Member Author

Arlodotexe commented Dec 7, 2021

I would think the MainPage as the first sample page (until we have the magic navigation infrastructure up) shouldn't it be in the sample app project vs. the hidden shared project?

That depends on how we plan on pulling in the pages for the all-samples app. If we place each sample page in its respective app project, we're no longer able to reference it from the WASM projects nor the all-samples app.

So since we need both 1) a slimmed-down, single sample app that compiles quickly (Uno-Quickstart style) and 2) the ability to reference sample pages from both single-sample apps and all-sample apps.

The solutions are to either:

  • Have a multi-target (uwp/uno) library project in each sample that we can reference from both. For sample magic, we can reference sample lib projects as needed (single-sample apps would have only 1 reference, all-sample would have them all), and have our main app code pull in sample pages automatically using either data from an assembly attribute + a little reflection, or a static registry class + a factory method.
  • Or, include all the sample pages in the shared project. For sample magic, the user will have to manually add them to a list of all samples, and we'll need a way to manually distinguish single-sample vs all-sample builds.

I prefer option 1 for various reasons, but 'm not sure option 2 would be possible for single-sample apps since it means all sample pages would be in the shared project, and thus all references need to exist at build time 🤔

@Arlodotexe
Copy link
Member Author

Arlodotexe commented Dec 7, 2021

@michael-hawker I'll address these things in another PR when I set up the sample page correlation.
Since there are no other comments to address here, to unblock everyone else (and since we're in a private repo), I'll go ahead and merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants