Skip to content

Re: Now allowing the custom nav bar to take up the whole space on iOS#2620

Merged
yogevbd merged 12 commits into
wix:masterfrom
SudoPlz:master
Feb 28, 2018
Merged

Re: Now allowing the custom nav bar to take up the whole space on iOS#2620
yogevbd merged 12 commits into
wix:masterfrom
SudoPlz:master

Conversation

@SudoPlz
Copy link
Copy Markdown
Contributor

@SudoPlz SudoPlz commented Feb 1, 2018

This is a second attempt to get this merged.
The first attempt was #2306 it got merged, and then it got reverted because @guyca said This pr caused buttons to be unresponsive, the custom view was positioned over the buttons preventing them from handling touch events..

I added normal buttons to the custom top bar screen on the example project, and all of the buttons seem to work fine.

The CustomTitleView is NOT positioned above the left or right buttons as you can see here:

I think reverting that PR was a mistake. Please merge that, it's crucial in order to actually expose the full potential of a Custom View in the top bar.

Thank you

krystofcelba and others added 7 commits January 23, 2018 03:19
1. Rename `DevCommandsHandlerProxy` to `DevHelperProxy` so it reflects the changes in RN. See facebook/react-native@d19afc7 .
2. Add few comments to show which code is used on `RN >= 0.52` and which on `RN <= 0.51`.
The custom nav bar on iOS was really just a custom view applied to the title of the navigation bar.
There were problems with this approach, because the navigation bar messes up the frame of the title very frequently, especially when the orientation is changing. That behaviour is accepted when the title is a label, but not when we have a custom component.

With this pull request the custom nav bar component can take up the full width of the navigation bar, no matter what orientation we're at.
@yogevbd yogevbd merged commit 93de04e into wix:master Feb 28, 2018
thanhzusu pushed a commit to thanhzusu/react-native-navigation that referenced this pull request Feb 28, 2018
* master: (88 commits)
  try rebuild in ci
  Closes wix#2777
  Re: Now allowing the custom nav bar to take up the whole space on iOS (wix#2620)
  Fix flickering modal on Android
  Apply title in resetTo (wix#2787)
  Save props in singleScreenApp
  fixes large titles (wix#2775)
  fix tests
  Update build tools version
  Set layout style after modal dismiss
  deep stack passProps fix
  save additional screens passProps
  deep stack for startTabBasedApp and startSingleScreenApp (wix#2770)
  Added ability to specify font size for tab bar labels on Android (wix#2754)
  [Android] Add ability to start app with deep stack (wix#2761)
  [iOS] Allow set view controllers to be called with multiple components (wix#2247)
  Document subtitle parameter for screen push (wix#2735)
  Fix EmptyStackException (wix#2746)
  Reject promise if push fails
  Set titleBarSubTitleTextCentered as navigator style for android (wix#2611)
  ...

# Conflicts:
#	android/app/src/main/java/com/reactnativenavigation/params/ScreenParams.java
#	android/app/src/main/java/com/reactnativenavigation/views/LightBox.java
chilinh added a commit to chilinh/react-native-navigation that referenced this pull request Mar 1, 2018
* r_master:
  fix travis publish
  debug travis deploy
  try rebuild in ci
  Closes wix#2777
  Re: Now allowing the custom nav bar to take up the whole space on iOS (wix#2620)
  Fix flickering modal on Android
  Apply title in resetTo (wix#2787)
  Save props in singleScreenApp
  fixes large titles (wix#2775)
  fix tests
  Update build tools version
  Set layout style after modal dismiss
  deep stack passProps fix
  save additional screens passProps
  deep stack for startTabBasedApp and startSingleScreenApp (wix#2770)
  Added ability to specify font size for tab bar labels on Android (wix#2754)
  [Android] Add ability to start app with deep stack (wix#2761)

# Conflicts:
#	android/app/build.gradle
#	android/gradle/wrapper/gradle-wrapper.properties
guyca added a commit that referenced this pull request Mar 3, 2018
@guyca
Copy link
Copy Markdown
Collaborator

guyca commented Mar 3, 2018

Hey @SudoPlz
I had to revert the PR as it broke our e2e. Still looking into this and will keep you updated

timxyz pushed a commit to 3sidedcube/react-native-navigation that referenced this pull request May 23, 2018
* develop: (340 commits)
  Makes sure subtitle text is tinted by navigation bar style
  Re: Now allowing the custom nav bar to take up the whole space on iOS (wix#2620)
  Fix flickering modal on Android
  Apply title in resetTo (wix#2787)
  Save props in singleScreenApp
  fixes large titles (wix#2775)
  fix tests
  Update build tools version
  Set layout style after modal dismiss
  deep stack passProps fix
  save additional screens passProps
  deep stack for startTabBasedApp and startSingleScreenApp (wix#2770)
  Added ability to specify font size for tab bar labels on Android (wix#2754)
  [Android] Add ability to start app with deep stack (wix#2761)
  [iOS] Allow set view controllers to be called with multiple components (wix#2247)
  Document subtitle parameter for screen push (wix#2735)
  Fix EmptyStackException (wix#2746)
  Reject promise if push fails
  Set titleBarSubTitleTextCentered as navigator style for android (wix#2611)
  Send bottomTabSelected event by tab index
  ...

# Conflicts:
#	android/app/src/main/java/com/reactnativenavigation/bridge/NavigationReactModule.java
#	android/app/src/main/java/com/reactnativenavigation/controllers/NavigationActivity.java
#	src/Navigation.js
#	src/deprecated/platformSpecificDeprecated.android.js
#	src/platformSpecific.android.js
reimertz pushed a commit to mavencook/react-native-navigation that referenced this pull request Sep 14, 2018
…wix#2620)

* Add support for react-native 0.52.0

* Refactore a bit

1. Rename `DevCommandsHandlerProxy` to `DevHelperProxy` so it reflects the changes in RN. See facebook/react-native@d19afc7 .
2. Add few comments to show which code is used on `RN >= 0.52` and which on `RN <= 0.51`.

* Now allowing the custom nav bar to take up the whole space on iOS

The custom nav bar on iOS was really just a custom view applied to the title of the navigation bar.
There were problems with this approach, because the navigation bar messes up the frame of the title very frequently, especially when the orientation is changing. That behaviour is accepted when the title is a label, but not when we have a custom component.

With this pull request the custom nav bar component can take up the full width of the navigation bar, no matter what orientation we're at.

* Added mix of native btns and custom component on the Custom TopBar screen of the example project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants