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

fix: Fixes #211 (After opening the keyboard the android UI shrinks) #218

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

lauriharpf
Copy link
Contributor

Issue: #211

What I did

Removed

How to test

The steps to reproduce this issue on the Android emulator were:

  1. Run the React Native examples (under examples/native) on Android
  2. Open the story Navigator.
  3. Select the "Basic" story.
  4. Open "Addons -> Controls"
  5. Click on the "first" field so that the keyboard comes up.
  6. Click back to "Navigator"

What happened

The story list in the navigator gets truncated a lot (seems to only occupy ~50% or so of the screen) after Step 5.

What happens now after the fix

The story list doesn't get truncated; it looks the same it did after Step 1.

Other

  • Does this need a new example in examples/native? no
  • Does this need an update to the documentation? no

The code this PR removes was introduced in e413ec2 . While testing (both on Android and iOS), I didn't notice any issues caused by removing this code. It is of course possible that there is a case that I've missed, but the code this PR removes clearly causes an issue in a common use case.

UX with this branch

with_fix.mov

UX in the next-6.0 branch (=without this fix)

before_fix.mov

… shrinks). The steps to reproduce this issue on the Android emulator were:

0. Run the React Native examples (under examples/native) on Android
1. Open the story Navigator.
2. Select the "Basic" story.
3. Open "Addons -> Controls"
4. Click on the "first" field so that the keyboard comes up.
5. Click back to "Navigator"

## What happened
The story list in the navigator gets truncated a lot (seems to only occupy ~50% or so of the screen) after Step 5.

## What happens now after the fix
The story list doesn't get truncated; it looks the same it did after Step 1.
@lauriharpf lauriharpf requested a review from dannyhw as a code owner July 13, 2021 15:03
@dannyhw
Copy link
Member

dannyhw commented Jul 13, 2021

How does this behave when using an input in the preview (as part of a story)?

Thanks again for your contribution :)

@dannyhw dannyhw added the 6.5 label Jul 13, 2021
@dannyhw dannyhw linked an issue Jul 13, 2021 that may be closed by this pull request
Copy link
Member

@dannyhw dannyhw left a comment

Choose a reason for hiding this comment

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

I tried it out and its working fine for me. Great work 👍

@@ -459,7 +459,7 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de
FBLazyVector: 7b423f9e248eae65987838148c36eec1dbfe0b53
FBReactNativeSpec: 60baaee9d10a9d225389062decbbf2b0bd6420ce
FBReactNativeSpec: ba3bc03e12cb0bea22d69a8a9458eaf3e92521a8
Copy link
Member

Choose a reason for hiding this comment

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

there is a bug with react native 64.1 where this hash is different on every machine, it's probably better not to commit these changes for now (FBReactNativeSpec). Maybe we should add the podfile lock to the ignore?

Copy link
Member

Choose a reason for hiding this comment

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

Since this isn't really a blocker I merged anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the heads-up, wasn't aware of this! 👍

I've been under the impression that version controlling Podfile.lock is a good idea (https://stackoverflow.com/questions/44028199/why-should-you-include-podfile-lock-under-version-control), but not sure how important it is in a React Native project 🤔 .

In any case, definitely no reason to commit the FBReactNativeSpec hash changes if it always changes from machine to machine at the moment - will keep that in mind!

@dannyhw dannyhw merged commit e37f3ec into storybookjs:next-6.0 Jul 13, 2021
@lauriharpf
Copy link
Contributor Author

How does this behave when using an input in the preview (as part of a story)?

Duh, you mentioned that in the issue description but I totally forgot. Sorry!

Glad to hear it worked for you. I could still make another PR that contains a story with a TextInput or two - those could be useful in confirming that functionality such as this works as intended? 🤔

@dannyhw
Copy link
Member

dannyhw commented Jul 13, 2021

How does this behave when using an input in the preview (as part of a story)?

Duh, you mentioned that in the issue description but I totally forgot. Sorry!

Glad to hear it worked for you. I could still make another PR that contains a story with a TextInput or two - those could be useful in confirming that functionality such as this works as intended? 🤔

@lauriharpf I tried it out and it seems fine to me. I could commit the input example I already made though

@lauriharpf
Copy link
Contributor Author

@lauriharpf I tried it out and it seems fine to me. I could commit the input example I already made though

Sounds great, please do! 👍 🥇

@lauriharpf lauriharpf deleted the fix/android-ui-shrinking branch July 13, 2021 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[6.0] After opening the keyboard the android UI shrinks
2 participants