-
Notifications
You must be signed in to change notification settings - Fork 1.4k
FontIcon markup extension #3110
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
FontIcon markup extension #3110
Conversation
Thanks 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 🙌 |
I'm wondering whether it'd be a good idea to also add relaying properties to the other available
Also, while I'm at it, I have 2 more equivalent markup extensions just like this one, but for I personally think that having markup extensions for these 3 icon types makes it much easier to set things up in XAML, and it also makes the resulting code cleaner and easier to read. @michael-hawker Should I open two PRs for those other 2 markup extensions as well? 😄 |
@Sergio0694 exposing more properties probably isn't a bad idea, if anything Feel free to submit PRs for the other ones as well. you could add the FontIconSource to this one, or just create separate smaller PRs (easier to review that way). :) |
@Sergio0694 just to clarify our UnitTests don't run in our CI yet, I should open an issue to track that. I can try and pull this down and see if I can run the tests. |
@Sergio0694 I was able to run your tests locally. Think you had some copy-paste bugs. I didn't notice them on the first look too. I'll point them out as GitHub suggestions. |
Co-Authored-By: Michael Hawker MSFT (XAML Llama) <[email protected]>
Co-Authored-By: Michael Hawker MSFT (XAML Llama) <[email protected]>
Co-Authored-By: Michael Hawker MSFT (XAML Llama) <[email protected]>
…io0694/WindowsCommunityToolkit into feature/font-icon-extension
@michael-hawker Added the two separate draft PRs, without tests for now:
|
Ok this last failure is weird, all tests are passing for me locally: I wonder if this is some .NET Native issue in Release with the unit test projects 🤔 EDIT: yeah it's failing for me in Release as well, it's not finding some types like EDIT 2: tried adding these to the <Type Name="Windows.UI.Xaml.Controls.FontIcon" Serialize="Required All" />
<Type Name="Windows.UI.Xaml.Controls.BitmapIcon" Serialize="Required All" />
<Type Name="UnitTests.Extensions.MockSwipeItem" Serialize="Required All" /> EDIT 3: also tried with For instance, here: |
@azchohfi @MattWhilden any ideas here on why the rd.xml isn't working? Can we try including the whole assembly for the Unit Test project? |
UnitTests/Extensions/Test_BitmapIconExtensionMarkupExtension.cs
Outdated
Show resolved
Hide resolved
@Sergio0694 this is all set now, eh? For future reference, we had to add dummy copies of the instances in the Unit Test app's XAML file so that the proper XamlTypeInfo would be generated for use by the XamlReader loading code in the tests. |
@michael-hawker Yeah this should be good to go as well now! 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me 🚀
This PR is part of the group being tracked in #3108.
Also includes changes originally from #3129 and #3130.
PR Type
What kind of change does this PR introduce?
What is the new behavior?
Some XAML markup extensions to create
FontIcon
-s,FontIconSource
-s andBitmapIcon
-s directly from XAML with no code behind, resulting in much cleaner code (see here).All additional info can be found in the linked issue.
PR Checklist
Please check if your PR fulfills the following requirements:
Icon has been created (if new sample) following the Thumbnail Style Guide and templatesOther information
I'm going to need some help in setting the tests up, since they keep failing on my end (despite the fact that the extension in question has been used by a number of apps for years), and I'm wondering whether there are additional steps I missed in cloning/setting up the repository.
If anyone has a minute to double check, I'd appreciate it! 😊
Because of this, I'm only marking this PR as a draft for now.
EDIT: seems like the tests are actually passing in the CI. At this point I really think I'm just missing some configuration steps to get them to work on my end as well 😆