Skip to content

Clipping refactoring - #1726

Merged
carldebilly merged 44 commits into
masterfrom
dev/cdb/clipping
Nov 5, 2019
Merged

carldebilly merged 44 commits into
masterfrom
dev/cdb/clipping

Conversation

@carldebilly

@carldebilly carldebilly commented Oct 4, 2019 •

Copy link
Copy Markdown
Member

Bugfix / Refactoring / Enhancement

Refactored the way the clipping is calculated on Uno

All controls were clippings to its bounds when it's not how it's working on WinUI:

  • A control is clipped to its bound when its desiredSize is close or greater and its arrangeSize
  • A canvas will never got clipped
  • A scrollviewer (ScrollViewerPresenter) will always clip to its bounds
  • A ContentControl won't clip if there's a RenderTransform on its content
  • Any control capable of CornerRadius will clip when its value is > 0.0

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • [ ] Docs have been added/updated which fit documentation template (for bug fixes / features)
  • Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Wasm UI Tests are not showing unexpected any differences. Validate PR Screenshots Compare Test Run results.
  • Contains NO breaking changes (Canaries has been setup to reduce breaking changes)
  • Updated the Release Notes
  • Associated with an issue (GitHub or internal)

Related Issues

Related PRs (merged)

@carldebilly carldebilly added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 4, 2019
@carldebilly carldebilly self-assigned this Oct 4, 2019
@carldebilly
carldebilly force-pushed the dev/cdb/clipping branch 2 times, most recently from 0c6d094 to 71fafe0 Compare October 11, 2019 15:44
@github-actions github-actions Bot added the area/automation Categorizes an issue or PR as relevant to project automation label Oct 11, 2019

@jeromelaban jeromelaban left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This PR requires a feature branch first.

Comment thread src/Uno.UI/UI/Xaml/UIElement.iOS.cs Resolved
Comment thread src/Uno.UI/UI/Xaml/UIElement.wasm.cs Resolved
@jeromelaban

jeromelaban commented Oct 22, 2019 •

Copy link
Copy Markdown
Member

@carldebilly

carldebilly commented Oct 22, 2019 •

Copy link
Copy Markdown
Member Author

@jeromelaban Nope. This PR is about what is happening outside the content. The problem showed on gitter is more about a wrong measurement (Measure() phase), so the text got arranged slightly too tight. You should ask to @zipswich to open a new issue.

@zipswich

Copy link
Copy Markdown

The problem showed on gitter is more about a wrong measurement (Measure() phase), so the text got arranged slightly too tight. You should ask to @zipswich to open a new issue.

I am not sure if it is worth the effort to investigate this because it happens only under very rare circumstances.

@carldebilly
carldebilly force-pushed the dev/cdb/clipping branch 2 times, most recently from 770c6e2 to 1b00ae4 Compare October 22, 2019 17:33
@carldebilly

This comment has been minimized.

@zipswich

This comment has been minimized.

@carldebilly
carldebilly marked this pull request as ready for review October 30, 2019 17:52
@carldebilly carldebilly changed the title [DRAFT] [WIP] Clipping refactoring Clipping refactoring Oct 30, 2019
@carldebilly carldebilly added platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform area/tests 🧪 Categorizes an issue or PR as relevant to tests platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform kind/api-change-breaking kind/enhancement New feature or request kind/regression Something was working, now it isn't kind/bug Something isn't working and removed area/automation Categorizes an issue or PR as relevant to project automation labels Oct 30, 2019
@carldebilly

carldebilly commented Nov 5, 2019 •

Copy link
Copy Markdown
Member Author

Published in v2.0.512-dev.3728 https://www.nuget.org/packages/Uno.UI/2.0.512-dev.3728

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.

davidjohnoliver added a commit that referenced this pull request Nov 25, 2019
Calling this method instead of SetNeedsLayout means that OnInvalidateMeasure() is called for types that override it.

This fixes a bug introduced by #1726 (somehow) whereby changing TextBlock.Foreground and setting the TextBlock to Collapsed in the same synchronous pass would not result in the new Foreground showing when the TextBlock was made visible again.
davidjohnoliver added a commit that referenced this pull request Nov 25, 2019
Calling this method instead of SetNeedsLayout means that OnInvalidateMeasure() is called for types that override it.

This fixes a bug introduced by #1726 (somehow) whereby changing TextBlock.Foreground and setting the TextBlock to Collapsed in the same synchronous pass would not result in the new Foreground showing when the TextBlock was made visible again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/tests 🧪 Categorizes an issue or PR as relevant to tests kind/bug Something isn't working kind/enhancement New feature or request kind/regression Something was working, now it isn't platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants