-
Notifications
You must be signed in to change notification settings - Fork 703
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
Add new TextBlock styles #4108
Add new TextBlock styles #4108
Conversation
YAY 10X style typography has arrived! Now to cajole the Windows 10 Settings team into updating the inbox app into using them (or just moving to the 10X app ASAP) 😁 |
</Style> | ||
|
||
<Style x:Key="CaptionTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}"> | ||
<Setter Property="FontSize" Value="12" /> |
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.
We should not hard code 12, please use TextBoxIconFontSize
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.
Having a TextBlock style depend on a TextBox resource sounds a bit confusing to me.
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.
I didn't notice the difference between block and box.
You can create a new keyed resource
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.
Added new lightweight styling resources for all font sizes.
</Style> | ||
|
||
<Style x:Key="BodyTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource BaseTextBlockStyle}"> | ||
<Setter Property="FontSize" Value="14" /> |
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.
Don't hard code this value
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.
Would you like me to create themeresources for all the font sizes defined in the styles or just specific ones?
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.
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.
Added new resources now though I think that either way doesn't make a big difference.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.
<x:Double x:Key="CaptionTextBlockFontSize">12</x:Double> | ||
<x:Double x:Key="BodyTextBlockFontSize">14</x:Double> | ||
<x:Double x:Key="BodyStrongTextBlockFontSize">14</x:Double> | ||
<x:Double x:Key="SubtitleTextBlockFontSize">20</x:Double> | ||
<x:Double x:Key="TitleTextBlockFontSize">20</x:Double> | ||
<x:Double x:Key="TitleLargeTextBlockFontSize">40</x:Double> | ||
<x:Double x:Key="DisplayTextBlockFontSize">68</x:Double> |
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.
@licanhua is this really necessary? We didn't have the font sizes called out in generic.xaml. Seems like we're adding another layer of obfuscation for ... maybe no good reason?
<x:Double x:Key="BodyTextBlockFontSize">14</x:Double> | ||
<x:Double x:Key="BodyStrongTextBlockFontSize">14</x:Double> |
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.
Even if we keep these resources, I don't think we need distinct onces for body vs body strong. They're both body size (14), with "strong" referring to font weight. The font size for anything called "body" should stay in sync. So I would simply delete BodyStrongTextBlockFontSize and use BodyTextBlockFontSize inside the body strong style.
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.
Fixed that in the new styles project, left the old styles project as is since we don't want to interfere with existing styles and as such need to either introduce a lightweight styling resource for the BodyStrongTextBlock fontsize or leave them out of that completely.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@chingucoding looks like we have a failure in the visual baseline comparision. |
@ranjeshj Updated the verification files now and merged with master. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@chingucoding Can you update the master files from the build pipeline, or cherry-pick this commit from user/canhua/text |
Updated verification files now @licanhua. |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@kmahone Is there anything you/we could do to make the infra more resilient against this:
Or is this just something we have to accept to happen occasionally? |
@chingucoding we hit that issue from time to time where the REST call that we make fails due to random server side issues. I was able to work around this by adding some retry logic to the script, but that is in the WinUI3 fork and has not been back-ported to the WinUI2 repo. If you are interested in making the change, I can share the updated script with you. |
Sure, if I can help with backporting and it's not too complicated, feel free to share the updated script with me and I'll create a PR for this! |
I've attached an updated version of AzurePipelinesHelperScripts.ps1, that includes simple implementations of Download-FileWithRetries, Invoke-RestMethodWithRetries and Download-StringWithRetries. Update OutputTestResults.ps1, ProsessHelixFiles.ps1 and UpdateUnreliableTests.ps1 so that they call these functions instead of Invoke-RestMethod, DownloadFile and DownloadString. The Azure DevOps rest apis are usually pretty stable, so only the calls to the Helix apis need to be updated. |
Thanks for sharing @kmahone , I'll try to get this over the weekend and create a PR. |
Excellent. Thanks for jumping on this! It should make the test passes more reliable. |
* Add new TextBlock styles and update test page for textbox to include samples * Update 2.5 file * Add lightweight styling resources * CR feedback * Update verification files * Update verification files
Description
Adding new TextBlock styles and update the TextBox test page to include TextBlock samples of the new style.
Motivation and Context
Closes #4106
How Has This Been Tested?
Tested manually
Screenshots (if appropriate):