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

TeachingTip: Fix bug where empty title/subtitle was not respected in ApplyTemplate leading to gap #3397

Conversation

marcelwgn
Copy link
Contributor

@marcelwgn marcelwgn commented Oct 9, 2020

Description

Add checks when in ApplyTemplate to collapse the textblocks if necessary.

Motivation and Context

Closes #1396

How Has This Been Tested?

Add new API test

Screenshots (if appropriate):

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Oct 9, 2020
@StephenLPeters
Copy link
Contributor

Go ahead and change the member variable name.

@StephenLPeters
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@marcelwgn
Copy link
Contributor Author

Go ahead and change the member variable name.

Done :)

@StephenLPeters StephenLPeters added area-TeachingTip team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Oct 9, 2020
@marcelwgn
Copy link
Contributor Author

The test failure was a layout cycle issues which was caused by directly changing visibility of elements inside OnApplyTemplate. I switched to visual states for that now and updated the TeachingTip testhooks function to get the Title/Subtitle textblock through GetTemplateChild instead of requesting that once in OnApplyTemplate. That way, we are able to store two elements less inside the TeachingTip that aren't used beside the test hooks.

@zadjii-msft
Copy link
Member

I'm looking forward to this landing so the Terminal can use this too - I don't think we're going to always need a TeachingTip with both a title and subtitle, so right now we always end up with some weird space.

Hopefully we can see this land in 2021 ☺️

@StephenLPeters
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@StephenLPeters
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@StephenLPeters StephenLPeters merged commit 4a8c540 into microsoft:master Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TeachingTip team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TeachingTip Title takes space even when there is no content.
3 participants