Skip to content

Fix for "jumping" title view during push/pop transitions#2384

Merged
gran33 merged 2 commits into
masterfrom
fix_jumping_titleview
Dec 21, 2017
Merged

Fix for "jumping" title view during push/pop transitions#2384
gran33 merged 2 commits into
masterfrom
fix_jumping_titleview

Conversation

@artald
Copy link
Copy Markdown
Contributor

@artald artald commented Dec 20, 2017

This fixes an issue with a custom title-view (which has a title and a subtitle) appearing at the left side of the nav-bar instead of the center during a transition animation: when a screen with this title-view is being pushed or when you pop back to it.

This happens because the title-view is being created again when RCCViewController appears. There's probably no point in setting the title-view again with the same data when it already has it. The title view setup is done anyway in RCCNavigationController.

This can be easily reproduced by calling this.props.navigator.setSubTitle({subtitle: 'a subtitle'}); from the constructor of a pushed screen (in the example project screens/types/Push.js for example)

… subtitle) appearing at the left side of the nav-bar instead of the center during a transition animation: when a screen with this title-view is being pushed or when you pop back to it.

This happens because the title-view is being created again when RVVViewController appears. There's probably no point in setting the title-view again with the same data when it already has it. The title view setup is done anyway in RCCNavigationController.

This can be easily reproduced by calling "this.props.navigator.setSubTitle({subtitle: 'a subtitle'});" from the constructor of a pushed screen.
@artald artald requested a review from gran33 December 20, 2017 19:19
@gran33 gran33 merged commit 3f7f6c2 into master Dec 21, 2017
@guyca guyca deleted the fix_jumping_titleview branch December 22, 2017 15:56
guyca added a commit that referenced this pull request Dec 24, 2017
…le and a subtitle) appearing at the left side of the nav-bar instead of the center during a transition animation: when a screen with this title-view is being pushed or when you pop back to it. (#2384)"

This reverts commit 3f7f6c2.
guyca added a commit that referenced this pull request Dec 24, 2017
… iOS" (#2404)

* Revert "Improve getCurrentlyVisibleScreenId on iOS with drawers. (#2052)"

This reverts commit 2c30a52.

* Revert "introducing navbar shadow on iOS (#2339)"

This reverts commit 8fd496e.

* Revert "This fixes an issue with a custom title-view (which has a title and a subtitle) appearing at the left side of the nav-bar instead of the center during a transition animation: when a screen with this title-view is being pushed or when you pop back to it. (#2384)"

This reverts commit 3f7f6c2.

* Revert "Now allowing the custom nav bar to take up the whole space on iOS (#2306)"

This reverts commit 74a02cc.
chilinh added a commit to chilinh/react-native-navigation that referenced this pull request Jan 2, 2018
* r_master:
  fixes wix#2353
  Update third-party-libraries-support.md
  [docs] Update minimum officially supported RN version
  Don't override LightBox ReactRootView id
  Update example app to rn51
  Revert "fix images name (wix#2451)"
  Revert "Upgrade example proj to rn51 (wix#2452)"
  Upgrade example proj to rn51 (wix#2452)
  fix images name (wix#2451)
  fixed buttons text attributes revert on press
  Fix a uncommented line (wix#2226)
  Support re-enabling top bar elevation (wix#2229)
  Document how to use index.js as entry point (wix#2412)
  Revert "Now allowing the custom nav bar to take up the whole space on iOS" (wix#2404)
  Improve getCurrentlyVisibleScreenId on iOS with drawers. (wix#2052)
  introducing navbar shadow on iOS (wix#2339)
  This fixes an issue with a custom title-view (which has a title and a subtitle) appearing at the left side of the nav-bar instead of the center during a transition animation: when a screen with this title-view is being pushed or when you pop back to it. (wix#2384)
krystofcelba pushed a commit to krystofcelba/react-native-navigation that referenced this pull request Jan 4, 2018
… subtitle) appearing at the left side of the nav-bar instead of the center during a transition animation: when a screen with this title-view is being pushed or when you pop back to it. (wix#2384)

This happens because the title-view is being created again when RVVViewController appears. There's probably no point in setting the title-view again with the same data when it already has it. The title view setup is done anyway in RCCNavigationController.

This can be easily reproduced by calling "this.props.navigator.setSubTitle({subtitle: 'a subtitle'});" from the constructor of a pushed screen.
krystofcelba pushed a commit to krystofcelba/react-native-navigation that referenced this pull request Jan 4, 2018
… iOS" (wix#2404)

* Revert "Improve getCurrentlyVisibleScreenId on iOS with drawers. (wix#2052)"

This reverts commit 2c30a52.

* Revert "introducing navbar shadow on iOS (wix#2339)"

This reverts commit 8fd496e.

* Revert "This fixes an issue with a custom title-view (which has a title and a subtitle) appearing at the left side of the nav-bar instead of the center during a transition animation: when a screen with this title-view is being pushed or when you pop back to it. (wix#2384)"

This reverts commit 3f7f6c2.

* Revert "Now allowing the custom nav bar to take up the whole space on iOS (wix#2306)"

This reverts commit 74a02cc.
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.

3 participants