Skip to content

Type property is now optional for Samples #3648

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

Conversation

michael-hawker
Copy link
Member

@michael-hawker michael-hawker commented Dec 31, 2020

This allows us to more easily create XAML Only samples and load them more efficiently.
Removed Dummy Pages for State Triggers as a Test

PR Type

What kind of change does this PR introduce?

  • Refactoring
  • Sample app changes

What is the current behavior?

All samples are required to have a Page within the project, even if it's not used.

What is the new behavior?

Consolidated any compiler needs within the XamlOnlyPage.xaml page, and made the Type property optional on Sample. We'll now load a .bind file directly in the SampleController if the sample doesn't have a backing page but still has a template.

This makes it easier to create samples that don't need extra features related to having a page (reacting to rendering, creating buttons, or having auxiliary content around the sample).

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

Other information

Updated Wiki with new Guidance here: CommunityToolkit/WindowsCommunityToolkit-wiki#17

This allows us to more easily create XAML Only samples and load them more efficiently.
Removed Dummy Pages for State Triggers as a Test
@michael-hawker michael-hawker added this to the 7.0 milestone Dec 31, 2020
@ghost ghost added the in progress 🚧 label Dec 31, 2020
@ghost
Copy link

ghost commented Dec 31, 2020

Thanks michael-hawker for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost requested review from azchohfi, Kyaa-dost and Rosuavio December 31, 2020 00:23
michael-hawker added a commit to CommunityToolkit/WindowsCommunityToolkit-wiki that referenced this pull request Dec 31, 2020
@ghost
Copy link

ghost commented Dec 31, 2020

Hello @michael-hawker!

Because this pull request has the auto merge :zap: label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 8 hours, a condition that will be fulfilled in about 7 hours 43 minutes. No worries though, I will be back when the time is right! 😉

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

Copy link
Member

@Sergio0694 Sergio0694 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🚀

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

Successfully merging this pull request may close these issues.

2 participants