microsoft / microsoft/react-native-windows
Root-level perspective transform causes blurry Popups and Flyouts
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
PopupViewManager and FlyoutViewManager attempt to work around a z-index shadowing issue by forcing a translation along the Z axis. This interacts poorly with the PerspectiveTransform3D set on the React root view (ReactControl), causing Popups and Flyouts to scale and text to become blurry as their Z position increases.
The code in ReactControl.cpp and ReactRootControl.cpp says:
// Xaml's default projection in 3D is orthographic (all lines are parallel)
// However React Native's default projection is a one-point perspective.
// Set a default perspective projection on the main control to mimic this.
However, while React Native's "transform" property supports a perspective setting, its not required. An orthographic transform should be possible.
I suspect this root-level transform should be removed in favor of components independently setting perspective if needed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ReactControl.cpp and ReactRootControl.cpp, reading the root-level PerspectiveTransform3D setup and its relationship to PopupViewManager and FlyoutViewManager's Z translation. Trace how the root projection affects Popups and Flyouts, then verify that removing or changing the root-level perspective prevents scaling and blurry text while preserving independently requested perspective transforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, react-native
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100