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

Text input not apearing on a flyout modal #13377

Open
AhmedRyad22 opened this issue Jun 23, 2024 · 5 comments
Open

Text input not apearing on a flyout modal #13377

AhmedRyad22 opened this issue Jun 23, 2024 · 5 comments
Labels
Area: Flyout Area: Layout Area: Paper Area: TextInput bug Needs: Attention 👋 An issue that had been tagged "Needs: Author Feedback" has received activity (label applied by bot) Old Architecture Broad category for issues that apply to the RN "old" architecture of Cxx Modules + Paper
Milestone

Comments

@AhmedRyad22
Copy link

Problem Description

Text input behaves in a stange way.
when you put a flyout modal that contains a Text input, initialy you get it working, after that when you continue working and get back to it you dont find it there, or somtimes just when you close the modal and open it again you dont find it there, it just doesnt show up,

Screenshot 2024-06-23 094530

Screenshot 2024-06-23 094220

<Flyout
        isOpen={CredentialsModal}
        onDismiss={() => {
          setCredentialsModal(false);
        }}>
        <View
          className={clsx(
            'w-[400px] p-6 space-y-4 rounded',
            colorScheme === 'dark' ? 'bg-neutral-900' : 'bg-neutral-200',
          )}>
          <View>
            <TextInput onChangeText={setAccessKey} placeholder="Access key" />
          </View>
          <View>
            <TextInput onChangeText={setSecreetKey} placeholder="Secret key" />
          </View>
          <View className="mt-4 flex-row space-x-1">
            <View className="flex-1">
              <Button
                onPress={async () => {
                  Managedrives.testConnection(accessKey, secreetKey);
                }}
                title="Testez les accès"
              />
            </View>

            <View className="flex-1">
              <Button
                onPress={() => {
                  // setMountModal(false);
                }}
                title="Enregistrez les accès"
              />
            </View>
          </View>
        </View>
      </Flyout>

By the way im using naitvewind for styling,

PS: i tried using react native stylesheet and got the same results

Steps To Reproduce

  1. a flyout menu with the code provided above.

Expected Results

the text input to apear each time

CLI version

13.6.6

Environment

System:
  OS: Windows 11 10.0.22631
  CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
  Memory: 2.55 GB / 15.81 GB
Binaries:
  Node:
    version: 18.20.2
    path: C:\Program Files\nodejs-18\node.EXE
  Yarn:
    version: 3.6.4
    path: ~\AppData\Roaming\npm\yarn.CMD
  npm:
    version: 9.3.1
    path: C:\Program Files\nodejs-18\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    AllowAllTrustedApps: Enabled
    Versions:
      - 10.0.18362.0
      - 10.0.19041.0
      - 10.0.22621.0
IDEs:
  Android Studio: Not Found
  Visual Studio:
    - 17.10.34928.147 (Visual Studio Community 2022)
Languages:
  Java: 19.0.2
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.2
    wanted: 0.74.2
  react-native-windows:
    installed: 0.74.7
    wanted: 0.74.7
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Community Modules

"@react-native-async-storage/async-storage": "^1.23.1",
"@react-native-picker/picker": "^2.7.6",
"nativewind": "^2.0.11",
"react-router-native": "^6.23.1",

Target Platform Version

10.0.19041

Target Device(s)

Desktop

Visual Studio Version

Visual Studio 2022

Build Configuration

Debug

Snack, code example, screenshot, or link to a repository

No response

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) label Jun 23, 2024
@chrisglein chrisglein added Area: Flyout Area: TextInput Area: Paper Old Architecture Broad category for issues that apply to the RN "old" architecture of Cxx Modules + Paper labels Jun 24, 2024
@chrisglein
Copy link
Member

We'd like to reconstruct your repro so we can investigate. Is it possible to share more of your component here (hooks and such, full JS file, or best yet a full standalone repo) so we can best replicate it?

@chrisglein chrisglein added Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Jun 24, 2024
@AhmedRyad22
Copy link
Author

Certaintly here is a public repo containing the project

https://github.com/AhmedRyad22/react-native-windows-flyout-bug

Screen.Recording.2024-06-25.091627.mp4

and here is a video to showcase the issue.

thank you in advance

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 An issue that had been tagged "Needs: Author Feedback" has received activity (label applied by bot) and removed Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) labels Jun 25, 2024
@AhmedRyad22
Copy link
Author

notice when i added the new text content the first text input disapeared

@chrisglein
Copy link
Member

notice when i added the new text content the first text input disapeared

When you add the Text element, that would be pushing the 2 TextInput elements down, right? If you remove it again... they come back maybe?

I have a hypothesis here, which is that the Flyout doesn't handle dynamic content sizing (it stays at whatever size it gets from first layout) and so when your content shows/hides, it stays with the old size, which is going to clip the content. Given the layout rules, the buttons maybe prioritized over the main dialog content area... which means the bottom buttons stay but the content gets clipped. Does that match the behavior you're seeing? If so, that's a limitation of Flyout on the current Paper renderer that we expect to address with the upcoming Fabric renderer. Which doesn't help you today, but helps with our future tracking.

Some background: #7601

Is the resizing of the content here something you have to support in your final production app, or just during development?

@chrisglein chrisglein added Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) and removed Needs: Attention 👋 An issue that had been tagged "Needs: Author Feedback" has received activity (label applied by bot) labels Jun 27, 2024
@AhmedRyad22
Copy link
Author

hello, thank you for your response,

the issue is not really related to dynamic content, here you can see that when you build the app or when you launch it again, the text input will not be displayed in the flyout.

( i simulated the build or new luanch by reloading JS server )

Screen.Recording.2024-06-30.113449.mp4

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 An issue that had been tagged "Needs: Author Feedback" has received activity (label applied by bot) and removed Needs: Author Feedback The issue/PR needs activity from its author (label drives bot activity) labels Jun 30, 2024
@chrisglein chrisglein added this to the Next milestone Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Flyout Area: Layout Area: Paper Area: TextInput bug Needs: Attention 👋 An issue that had been tagged "Needs: Author Feedback" has received activity (label applied by bot) Old Architecture Broad category for issues that apply to the RN "old" architecture of Cxx Modules + Paper
Projects
None yet
Development

No branches or pull requests

2 participants