microsoft / microsoft/react-native-windows

Picker's popup has a parallax effect

Open
#3,842 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Flyout Area: Layout Area: Picker bug Partner: Stream Workstream: Component Parity
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Environment
  1. react-native -v:
    react-native-cli: 2.0.1
    react-native: 0.60.6
  2. npm ls rnpm-plugin-windows:
    rnpm-plugin-windows@0.3.5
  3. npm ls react-native-windows:
    react-native-windows@0.60.0-vnext.91
  4. node -v:
    v10.15.0
  5. npm -v:
    6.13.1

Then, specify:

  • Target Platform Version(s): 10.0.18362.0
  • Target Device(s): Desktop
  • Visual Studio Version: 2017
  • Build Configuration: Debug
Steps to Reproduce
  1. Create a Picker
  2. Observe that the picker's popup changes based on its position in the window:
  • If the Picker is in the top-left corner of the app window, the popup will be up and to the left
  • If the Picker is in the top-right corner of the app window, the popup will be up and to the right
  • If the Picker is in the bottom-left corner of the app window, the popup will be down and to the left
  • If the Picker is in the bottom-right corner of the app window, the popup will be down and to the right

Example code:

import * as RN from "react-native";

render() {
    return (
          <RN.Picker>
               <Picker.Item label="Any" value="Any" />
          </RN.Picker>
     );
}
Expected Behavior

I expected the popup to appear directly on top of the Picker regardless of the Picker's position in the app window.

Actual Behavior

The popup does not appear directly on top of the Picker depending on the Picker's position in the app window:

  • If the Picker is in the top-left corner of the app window, the popup will be up and to the left
  • If the Picker is in the top-right corner of the app window, the popup will be up and to the right
  • If the Picker is in the bottom-left corner of the app window, the popup will be down and to the left
  • If the Picker is in the bottom-right corner of the app window, the popup will be down and to the right
Screenshots

Top left:
topleft

Top right:
topright

Bottom left:
bottomleft

Bottom right:
bottomright

If this parallax effect is expected behavior, is there a way to disable it?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided Picker example on React Native Windows using the stated environment and desktop target. Start from the Picker entry point and trace how the popup position is determined; the report names no source file or test. Done means the popup appears directly over the Picker regardless of its window position, with coverage added if an appropriate test location is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, react-native
Domain
desktop, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.