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

Remove GetEffectiveFlowDirection and defer flow direction handling to platforms #9558

Merged
merged 9 commits into from
Aug 27, 2022

Conversation

hartez
Copy link
Contributor

@hartez hartez commented Aug 19, 2022

Description of Change

Automates reversal of RTL layouts during platform arrange for iOS and Android (basically works like Windows now).
Removes all cross-platform RTL layout code (since the platforms handle it). Updates automated tests accordingly.
Propagates iOS LTR/RTL settings when FlowDirection is MatchParent (this wasn't happening at all before).
Consolidates code to update text alignment on iOS when FlowDirection changes.
Adds FlowDirection propagation tests for iOS (skips the other platforms because they do this automatically).

Issues Fixed

Fixes #8175 (in that it removes ShouldArrangeLeftToRight entirely).

This is an alternative to #9326/#9327.

@hartez
Copy link
Contributor Author

hartez commented Aug 19, 2022

Leaving this as draft until I can get around to updating all the public API files and removing the now-unused extension methods.

@hartez hartez force-pushed the remove-geteffectiveflowdirection branch 2 times, most recently from a9a6985 to 607086b Compare August 23, 2022 14:58
@hartez hartez marked this pull request as ready for review August 23, 2022 19:37
@PureWeen PureWeen self-requested a review August 25, 2022 14:56
@@ -45,9 +45,6 @@ public partial class EntryHandler : IEntryHandler

static EntryHandler()
Copy link
Member

@PureWeen PureWeen Aug 25, 2022

Choose a reason for hiding this comment

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

Can we just delete the entire static ctor now?

Same question for LabelHandler/LayoutHandler/PickerHandler/SearchBarHandler

@PureWeen
Copy link
Member

@hartez the arranging on CollectionView looks to be better now but the sizing seems off now in RTL mode

The Left image is this PR
The Right image is without this PR

image

@hartez
Copy link
Contributor Author

hartez commented Aug 25, 2022

Hmmm... the problems on Android in the CollectionView go away if I remove the Border from the template.

@hartez
Copy link
Contributor Author

hartez commented Aug 25, 2022

@PureWeen The Android problems should be fixed - looking at the iOS issues now.

@hartez hartez force-pushed the remove-geteffectiveflowdirection branch from d4ae573 to 8ccaa7f Compare August 26, 2022 22:02
Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

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

@hartez hartez merged commit 4d25505 into main Aug 27, 2022
@hartez hartez deleted the remove-geteffectiveflowdirection branch August 27, 2022 03:27
@PureWeen
Copy link
Member

PureWeen commented Sep 8, 2022

#9701
#9702

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance issue in LayoutExtensions.ShouldArrangeLeftToRight
3 participants