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

TeachingTips display correctly when IsOpen is set early. #619

Merged
merged 6 commits into from
May 8, 2019

Conversation

StephenLPeters
Copy link
Contributor

When IsOpen is set to true for targeted tips which have targets which are not yet fully loaded we would display in the incorrect position because TransformToVisual does not return a proper value.

When IsOpen is set to true and we haven't applied the TeachingTip template, and are not able to synchronously apply the template the tip would crash because we assumed the presence of certain template parts.

This change fixes both of these issues by delaying the TeachingTip's opening and closing until after the CompositionRendering event. We also make less assumptions about the presence of template parts.

Finally I've included the newest GSL headers for use across the project.

… are missing template parts because of retemplating or attempts to open at unplanned points.

Also delay the opening of the tip when IsOpen is set to true until after the next rendering tick to make setting isOpen from markup work.

Finally add a copy of the GSL headers to the project so we can utilize these helpers.
@StephenLPeters StephenLPeters requested a review from a team as a code owner April 25, 2019 21:24
Copy link
Member

@jevansaks jevansaks left a comment

Choose a reason for hiding this comment

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

🕐

-Remove the GSL nuget dependency
-Add a TrySetCenterPoint
-Move StrictThis declaration to the lambda capture.
Copy link
Member

@jevansaks jevansaks left a comment

Choose a reason for hiding this comment

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

:shipit:

@StephenLPeters StephenLPeters added the auto merge This PR will be merged once all checks pass label May 6, 2019
@jevansaks jevansaks added the needs-cherrypicktorelease PR tagged for cherry-pick to the current release branch (but not yet picked) label May 7, 2019
@StephenLPeters StephenLPeters merged commit 804cd52 into master May 8, 2019
@StephenLPeters StephenLPeters deleted the user/stpete/TeachingTipOpenedEarly branch May 8, 2019 20:13
@jevansaks jevansaks removed the needs-cherrypicktorelease PR tagged for cherry-pick to the current release branch (but not yet picked) label May 30, 2019
jevansaks pushed a commit that referenced this pull request May 30, 2019
* Clean up some teaching tip code to ensure that we don't crash when we are missing template parts because of retemplating or attempts to open at unplanned points.

Also delay the opening of the tip when IsOpen is set to true until after the next rendering tick to make setting isOpen from markup work.

Finally add a copy of the GSL headers to the project so we can utilize these helpers.

* Remove a commented out line of code

* Undo changes to dispatch helper.

* Delete some unused header defs

* Respond to CR feedback.
-Remove the GSL nuget dependency
-Add a TrySetCenterPoint
-Move StrictThis declaration to the lambda capture.
@msft-github-bot
Copy link
Collaborator

🎉Microsoft.UI.Xaml v2.1.190606001 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TeachingTip auto merge This PR will be merged once all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants