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

TabView continuous expansions fix #6954

Merged
merged 3 commits into from
Apr 12, 2022
Merged

Conversation

RBrid
Copy link
Contributor

@RBrid RBrid commented Apr 8, 2022

Description

The Geometry size for the SelectedBackgroundPath would sometimes exceed its container size by a fraction of a pixel causing that container to expand by that fraction. The Geometry would subsequently increase by that small amount again causing an infinite loop of ever increasing sizes.

For horizontal expansions, we decrease the geometry width by 1 / scaleFactor.
For vertical expansions, we decrease the geometry height by 1 / scaleFactor compared to Reverting product change made for 'TabView gap between active tab and active content fix #6644' by RBrid · Pull Request #6936 · microsoft/microsoft-ui-xaml (github.com).

I confirmed both horizontal and vertical expansions are no longer occurring after just swapping the Microsoft.UI.Xaml.dll on the repro'ing machine.
(The horizontal expansion was occurring while using the FitToContent TabWidthMode.)

Since I was in there I also fixed the misnamed previousAvailableSize class field, and since I heavily used TabView debug tracing during this investigation, I am adding the infrastructure for using the convenient TABVIEW_TRACE_INFO type of macros for future debugging.

@RBrid RBrid requested review from ojhad, karkarl and ranjeshj April 8, 2022 22:49
@RBrid RBrid self-assigned this Apr 8, 2022
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Apr 8, 2022
@RBrid
Copy link
Contributor Author

RBrid commented Apr 8, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ojhad ojhad added team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Apr 8, 2022
@RBrid RBrid merged commit e5054a8 into main Apr 12, 2022
@RBrid RBrid deleted the user/regisb/TabViewExpansionsFix branch April 12, 2022 20:04
kmahone pushed a commit that referenced this pull request May 4, 2022
* Reverting product change made for 'TabView gap between active tab and active content fix #6644'

* TabView expansions fix
@ghost
Copy link

ghost commented Jun 2, 2022

🎉Microsoft.UI.Xaml v2.8.0-prerelease.220601001 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-TabView team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants