X Tutup
The Wayback Machine - https://web.archive.org/web/20201218001955/https://github.com/gitpoint/git-point/pull/857
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: Keyboard issue fix #857

Open
wants to merge 6 commits into
base: master
from
Open

Conversation

@Arjun-sna
Copy link
Contributor

@Arjun-sna Arjun-sna commented Dec 19, 2018

Question Response
Version? v1.4.1
Devices tested? oneplus 5..
Bug fix? yes
New feature? no
Includes tests? no
All Tests pass? yes
Related ticket? #799

Screenshots

Before After
before after

Description

@coveralls
Copy link

@coveralls coveralls commented Dec 19, 2018

Coverage Status

Coverage increased (+0.2%) to 49.092% when pulling 93a883c on Arjun-sna:keyboard_issue_fix into 5d503c1 on gitpoint:master.

Arjun-sna added 2 commits Dec 19, 2018
place file at proper locatio
add test for new component keyboardawarecontainer
@Arjun-sna Arjun-sna changed the title Keyboard issue fix fix: Keyboard issue fix Dec 26, 2018
Copy link
Member

@chinesedfan chinesedfan left a comment

@Arjun-sna Nice HOC. Played in simulator and looked good, except sometimes when entered new issue screen without the keyboard, the screen will scroll up.

new-issue-keyboard

if (Platform.OS === 'android') {
this.props.onKeyboardStateChange('hide', e);
}
});

This comment has been minimized.

@chinesedfan

chinesedfan Dec 28, 2018
Member

How about adding listeners by platform? Seems clearer and only 2 listeners at the same time, instead of 4.

if (Platform.OS === 'ios') {
    this.keyboardShowListener = Keyboard.addListener(xx, e=> ...);
    this.keyboardHideListener = Keyboard.addListener(xx, e=> ...);
} else if (Platform.OS === 'android') { ... }

This comment has been minimized.

@Arjun-sna

Arjun-sna Dec 28, 2018
Author Contributor

Got it. Will work on that.

This comment has been minimized.

@chinesedfan

chinesedfan Jan 8, 2019
Member

Curious about different event names for different platforms. Can you explain a bit more?

src/issue/screens/new-issue.screen.js Outdated Show resolved Hide resolved
src/issue/screens/new-issue.screen.js Outdated Show resolved Hide resolved
src/issue/screens/new-issue.screen.js Outdated Show resolved Hide resolved
src/issue/screens/new-issue.screen.js Outdated Show resolved Hide resolved
src/issue/screens/new-issue.screen.js Outdated Show resolved Hide resolved
src/issue/screens/new-issue.screen.js Outdated Show resolved Hide resolved
src/issue/screens/new-issue.screen.js Outdated Show resolved Hide resolved
bug fix and PR comments addressed
@Arjun-sna
Copy link
Contributor Author

@Arjun-sna Arjun-sna commented Dec 28, 2018

@chinesedfan added a commit addressing all the change requests. 🔨

Copy link
Member

@chinesedfan chinesedfan left a comment

@Arjun-sna Apologize for my late feedbacks.

}
}

KeyboardAwareContainer.defaultProps = {

This comment has been minimized.

@chinesedfan

chinesedfan Jan 8, 2019
Member

You can write static properties inside the class.

constructor(props) {
super(props);
this.keyboardWillShowSub = null;
this.keyboardWillHideSub = null;

This comment has been minimized.

@chinesedfan

chinesedfan Jan 8, 2019
Member

Do the right flow type annotations like following? Sorry that I'm a flow expert and I don't know how to import EmitterSubscription.

  keyboardWillShowSub: EmitterSubscription;
  keyboardWillHideSub: EmitterSubscription;

By the way, to make eslint happy, we need update our .eslintrc.

    "react/sort-comp": [
      "error",
      {
        "order": [
          "static-methods",
 +        "type-annotations",
} = this.state;

return (
<ViewContainer>
<KeyboardAwareContainer
style={{ flex: 1 }}

This comment has been minimized.

@chinesedfan

chinesedfan Jan 8, 2019
Member

As new-issue screen has been written with styled components, you'd better convert it, too.

}

render() {
return <View style={this.props.style}>{this.props.children}</View>;

This comment has been minimized.

@chinesedfan

chinesedfan Jan 8, 2019
Member

styled components

@chinesedfan
Copy link
Member

@chinesedfan chinesedfan commented Jan 9, 2019

What's more, #447 (comment) mentioned that RN 0.55 would introduce an official way to solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.
X Tutup