Skip to content

PR for beta.8 #2015

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

Merged
merged 11 commits into from
Jul 13, 2017
Merged

PR for beta.8 #2015

merged 11 commits into from
Jul 13, 2017

Conversation

aksonov
Copy link
Owner

@aksonov aksonov commented Jul 12, 2017

  • Fix: ‘clone’ scenes declared at the end were not visible for scenes declared above
  • Enhancement: If component has static navigationOptions return it instead of RNRF generated options
  • Enhancement: Allow all navBar properties (title, right, left, rightButtonImage, onRight, etc.) be defined as static functions/values of Scene component
  • Fix: Actions.refresh was broken because navigationStore doesn’t allow the same scene after state change
  • Enhancement: fix ESLint errors for tests
  • Fix: avoid re-render of all scenes during navigation state change (Constant rerendering of scenes in the stack.  #2018)
  • Support rightButtonTextStyle and leftButtonTextStyle, avoid reset them to default values after push (after push from Login to Login2, "Cancel" became blue again)
  • Fix: Support passing navbar attributes (like onRight/onLeft/leftTitle/rightTitle) via Actions.refresh
  • Fix: postinstall somewhere doesn't work with npm (Failed at the [email protected] postinstall script 'opencollective postinstall'. #2008)

aksonov added 2 commits July 12, 2017 10:49
…enes declared above

- Enhancement: If component has static navigationOptions return it instead of RNRF generated options
- Enhancement: Allow all navBar properties (title, right, left, rightButtonImage, onRight, etc.) be defined as static functions/values of Scene component
- Fix: Actions.refresh was broken because navigationStore doesn’t allow the same scene after state change
- Enhancement: fix ESLint errors for tests
@aksonov aksonov requested a review from charpeni July 12, 2017 09:01
@compojoom
Copy link
Contributor

@aksonov - how is this fixing the actions.refresh? I downloaded the 4.0.8 branch and launched the example, but I still can't change the title on the login page.

The same happens in a separate project as well.

@aksonov
Copy link
Owner Author

aksonov commented Jul 12, 2017

@compojoom Please check now (forgot to 'build' js)

@compojoom
Copy link
Contributor

@aksonov - it seems to partially work. It's changing the title, but nothing more? I was used to the folowing pattern in v3:

componentDidMount() {
		console.log('wtffff refressshshhh');
		let title = 'Analyse1',
			rightTitle = 'Speichern';

		if (this.props.editMode) {
			title = 'Analyse Bearbeiten';
			rightTitle = 'Fertig';
		}
		Actions.refresh({
			title: title,
			rightTitle: rightTitle,
			onRight: () => this.onRight(),
			backTitle: 'Abbrechen',
		});
	}

this seems to work now, but the only thing changing is the title. No right button appears in my navbar.

@compojoom
Copy link
Contributor

Hm, okay. Defining onRight and rightTitle on my scene seems to work together with refresh. If I define them on the scene, refresh will override them, but if I don't define them, then nothing happens. I don't see any right button.

@aksonov
Copy link
Owner Author

aksonov commented Jul 12, 2017

@compojoom Please check with latest commit.

@aksonov aksonov requested a review from southerneer July 12, 2017 15:51
@aksonov aksonov mentioned this pull request Jul 12, 2017
@southerneer
Copy link
Collaborator

southerneer commented Jul 12, 2017

I tried adding static nav options on Example/components/Register.js and they weren't overriding the RNRF options... Example.js is currently using beta.7

@southerneer
Copy link
Collaborator

I put the Echo view at the bottom of the router component to test clones and RNRF choked on the JSON.stringify call. When I commented it out it worked great...adding a commit.

@southerneer
Copy link
Collaborator

All the other changes/fixes seemed to work for me!

@compojoom
Copy link
Contributor

I'm wondering if anyone else is experiencing this:
grafik
I just open and re-save the image, but I don't understand why this happens at all.

@compojoom
Copy link
Contributor

@aksonov - if the scene doesn't have onright and rightTitle, then the refresh action isn't working. (tested with latest version)

@aksonov
Copy link
Owner Author

aksonov commented Jul 12, 2017

@compojoom Please give me link to forked Example to demonstrate.

@aksonov
Copy link
Owner Author

aksonov commented Jul 12, 2017

@southerneer Thanks!

@aksonov
Copy link
Owner Author

aksonov commented Jul 12, 2017

@compojoom Never mind, was able to reproduce with your snippet above

@compojoom
Copy link
Contributor

@aksonov
Copy link
Owner Author

aksonov commented Jul 12, 2017

@compojoom Check now

@aksonov
Copy link
Owner Author

aksonov commented Jul 12, 2017

About burger image, use Issues search. Like #703

@compojoom
Copy link
Contributor

compojoom commented Jul 12, 2017

woooohoooo! Let's open the champagne bottle for PR8 👍

Everything seems to work

@aksonov
Copy link
Owner Author

aksonov commented Jul 12, 2017

@compojoom Thanks for testing!

@aksonov aksonov merged commit e079ec7 into master Jul 13, 2017
@daviscabral daviscabral deleted the 4.0.0-beta.8 branch August 18, 2018 18:08
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