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

ViewStyleProps backfaceVisibility #3538

Closed
asklar opened this issue Oct 28, 2019 · 4 comments
Closed

ViewStyleProps backfaceVisibility #3538

asklar opened this issue Oct 28, 2019 · 4 comments
Labels
API: Completion Area: View Style Props https://reactnative.dev/docs/view-style-props enhancement Needs WinUI 3 Indicates that feature can only be done in WinUI 3.0 or beyond. Recommend: Not Planned Recommend that issue should be given Not Planned milestone.
Milestone

Comments

@asklar
Copy link
Member

asklar commented Oct 28, 2019

Set backfaceVisibility='hidden' on a square with text, it's a no-op. Rotate the item 180 degrees and see the text reversed (should not be shown)
image

@ghost ghost added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Oct 28, 2019
@asklar
Copy link
Member Author

asklar commented Oct 28, 2019

looks like this was an issue for Android until recently. See here facebook/react-native#15970

@chrisglein chrisglein added this to the vNext Milestone 4 milestone Oct 28, 2019
@chrisglein chrisglein added API: Completion Area: View Style Props https://reactnative.dev/docs/view-style-props Needs WinUI 3 Indicates that feature can only be done in WinUI 3.0 or beyond. and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Oct 28, 2019
@chrisglein
Copy link
Member

chrisglein commented Oct 28, 2019

Comp supports this but we believe XAML does not. Either needs us to go directly to Comp or add support to XAML in WinUI3.

@marlenecota marlenecota changed the title backfaceVisibility doesn't work ViewStyleProps backfaceVisibility Oct 31, 2019
@chrisglein chrisglein removed the vnext label Mar 18, 2020
@chrisglein chrisglein modified the milestones: 0.63 (M6), Backlog May 20, 2020
@kmelmon
Copy link
Contributor

kmelmon commented Aug 17, 2020

A possible solution here would be to stop using the "facade" animation properties and instead animate the underlying Composition Visual directly, by using ElementCompositionPreview.GetElementVisual(). This has the advantage of going further downlevel as well, but has a possible disadvantage: GetElementVisual is the "old" way of doing animations and isn't compatible with facades. Stephen Peters pointed out that the WinUI controls use facades on Content controls, so if someone were to wrap a WinUI control and also wrap the Content that goes inside the WinUI control, those controls will be locked into using facades. We don't currently have any such controls but it could happen someday.

From email conversation:

Keith says:
Thanks for pointing that out, Stephen! The problematic scenario would come up if these all happen:

  1. A new RNW control is created that wraps a WinUI control.
  2. The WinUI control uses facades on “itself”.
  3. The RNW app author uses the RN transform property on one of these wrapped controls.
    I don’t believe have wrapped any WinUI controls yet. But we could someday. I am mostly interested in Roslyn analyzer for NativeModuleBase #2 at this point. Stephen can you confirm if this is the case? Ie do we have any controls that use facades on the app-facing, “outermost” UIElement?

If the above can all happen, maybe we can just create an additional UIElement to parent the WinUI control.

Stephen says:
We don’t but we do have some controls which use facades on content put into their content presenter (I’ve argued that this is a mistake before but we’ve never fixed it) So if you wrapped one of these WinUI controls, exposed the content property and then the app author animates the content you could hit the issue.

@chrisglein chrisglein added the Recommend: Not Planned Recommend that issue should be given Not Planned milestone. label Aug 30, 2023
@chrisglein
Copy link
Member

Not something we plan to address on the Paper renderer as we move towards Fabric.
Fabric API completion is tracked here: #11144

@chrisglein chrisglein closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: Completion Area: View Style Props https://reactnative.dev/docs/view-style-props enhancement Needs WinUI 3 Indicates that feature can only be done in WinUI 3.0 or beyond. Recommend: Not Planned Recommend that issue should be given Not Planned milestone.
Projects
None yet
Development

No branches or pull requests

3 participants