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

Updated docs: Feature branches, Recipes #624

Merged
merged 1 commit into from
May 3, 2016
Merged

Conversation

langpavel
Copy link
Collaborator

@langpavel langpavel commented Apr 26, 2016

Updated docs, documented feature branches, added recipes

Closes #623, #612, #610, #595, #173 – all Redux issues.

@@ -49,6 +49,7 @@ forked repo, check that it meets these guidelines:
* [Squash](http://stackoverflow.com/questions/5189560/squash-my-last-x-commits-together-using-git)
your commits into one for each PR.
* Run `npm test` to make sure that your code style is OK and there are no any regression bugs.
* If you contributing to opt-in feature, prefix your PR title with `[feature/...]` tag.

Choose a reason for hiding this comment

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

When contributing to an opt-in feature, prefix your PR with the ...
When contributing to an opt-in feature, apply the .. tag as a prefix to your PR title
I'm not sure whether "if" or "when" is correct

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I like When contributing to an opt-in feature, apply the .. tag as a prefix to your PR title

@bravo-kernel
Copy link

Please 📯 when suggestions by @tobiasmuehl have been processed so I can do a final check.

@langpavel langpavel force-pushed the docs branch 2 times, most recently from 9a27a7f to a9daa30 Compare April 27, 2016 11:26
@@ -52,6 +52,25 @@ expenses via [OpenCollective](https://opencollective.com/react-starter-kit) or
<img src="https://opencollective.com/static/images/become_backer.svg" width="64" height="64" alt="">
</a>

### Feature branches

Some features aren't provided by default, but you can opt-in to them.

Choose a reason for hiding this comment

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

...but you can optionally add them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@tomByrer Thanks, updated

@langpavel
Copy link
Collaborator Author

@bravo-kernel Now it should be ready

@tomByrer
Copy link

@bravo-kernel & @langpavel I believe that adding features via a git branch is a very bad idea, and is too unusual. Merging into existing code is hard to do. Plus, when people branch to add/PR their changes, they'll have to merge & unmerge 2+ other branches to test also?!?

If a repo wants to add additional features, they usually either include the code in part of the main branch, and use a flag/gulpscript/option to turn it on or off. Or they have a separate repo for the new feature, & npm install --save <package name>.

Plus what happens when someone forks your branch? feature/redux/newer-feature/fix-flux?

@bravo-kernel
Copy link

It seems I can only github-comment on lines that have been changed and would prefer to proof-read the full documentation. Anybody know a workaround?

@langpavel
Copy link
Collaborator Author

I believe that adding features via a git branch is a very bad idea, and is too unusual. Merging into existing code is hard to do.

When you checkout master and merge feature, why you cannot merge master again? It should work.
When you resolve merge conflict one time it is just resolved forever. Merging into existing code is always hard to do. There will be I believe feature/relay in the future

Plus, when people branch to add/PR their changes, they'll have to merge & unmerge 2+ other branches to test also?!?

Why? If your work is based on feature branch, you just want to merge it in feature. If it is useful for someone using different branch then he can git cherry-pick it as far as conflict happen.

If a repo wants to add additional features, they usually either include the code in part of the main branch, and use a flag/gulpscript/option to turn it on or off. Or they have a separate repo for the new feature, & npm install --save .

No one of your suggestions does solve the situation of competiting decisions. Separate multiple repos is even more fragile to maintain and it breaks community.

Plus what happens when someone forks your branch? feature/redux/newer-feature/fix-flux?

Actually as you know, feature/react-intl is based on feature/redux.

If request for master/react-intl will be there, It can be done! And it can be done pretty:

  1. branch from master: git checkout master && git checkout -b master/react-intl
  2. code it, if possible cherry-pick what possible, clean code, make the HOC if reasonable
  3. create a PR against master, then can be decided if will be merged to master or as feature
  4. checkout to feature/react-intl and merge feature/bare, resolve conflicts
  5. Make new PR against feature/react-intl

Result of this is that all the branches here can be merged without conflicts!

If there will be feature/relay and request for feature/relay/react-intl it can be done too! Just follow idea.

I know this is an unproved theory but it may work. General idea is make react-starter-kit real kit with options and choices.

Please @koistya, comment on this idea.

@langpavel
Copy link
Collaborator Author

@tomByrer Described scenario can have interesting side effects:

You have three branches: one implementing Relay, other implementing Redux. Third implementing Intl. The third, bare Intl needs user provided code to works, pass messages into IntlProvider.

Assume two new branches - Redux+Intl and Relay+Intl. Each provide own mechanism to feed IntlProvider with data.

Assume that some good man improve Intl implementation and PR will be accepted. Now it can be merged by maintainers (or possibly by a bot when no conflict) to feature branches!

Users going with Relay and users going with Redux will be satisfied!

Even more: You can merge (and I wish try this) Redux and Relay. Now it will be interesting more:
Which implementation of ???-Intl will be used? :-) Definitely conflict here, but resolve it once and you can merge all updates from all branches after.

I'm wrong? Let me know!

@tobiasmuehl
Copy link

@bravo-kernel, Viewing the whole files is possible. Go to Files changed and click these:
alt text

To do so, simply merge the corresponding feature branch.
These branches should be in sync with master and all other features branches
so there should not be any merging conflicts.
If conflicts occure, please open an issue and report to us.

Choose a reason for hiding this comment

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

occur instead of occure

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed now, Thanks :-)

[`<FormattedNumber>`](https://github.com/yahoo/react-intl/wiki/Components#formattednumber)
[`<FormattedPlural>`](https://github.com/yahoo/react-intl/wiki/Components#formattedplural)

- Do not use `<FormattedHTMLMessage>` if possible, see how to use *Rich Text Formatting* with

Choose a reason for hiding this comment

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

If possible, do not use ..., see how to

@bravo-kernel
Copy link

bravo-kernel commented Apr 28, 2016

@tobiasmuehl the problem is with not being able to add comments to the lines that show after expanding (the grey-colored lines). Would be nice but not being able to makes sense to me git-wise.

@langpavel my review is done, looks fine to me :shipit:

@@ -49,6 +49,7 @@ forked repo, check that it meets these guidelines:
* [Squash](http://stackoverflow.com/questions/5189560/squash-my-last-x-commits-together-using-git)

Choose a reason for hiding this comment

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

I can see it, in the left pane. Interesting

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't understand you what do you mean?

@tobiasmuehl
Copy link

tobiasmuehl commented Apr 28, 2016

@bravo-kernel I tried if there's some way to make line comments using Chrome Dev Tools. The position on the server is handled by the data-position attribute on span.add-line-comment element which is relative to first commentable line (values 1..n). It's therefore impossible to comment on other lines. It would however be possible to develop a browser extension that fakes those comments by prefixing the line inside the comment and just putting the comment on a random line. That's not worth my effort only for this PR though.

@bravo-kernel
Copy link

@tobiasmuehl thanks for investigating, great find and no problem at.. you are absolutely right, not worth the effort. 👏

Closes kriasoft#623
Closes kriasoft#612
Closes kriasoft#610
Closes kriasoft#595
Closes kriasoft#173

Many thanks to @tobiasmuehl and @tomByrer and @bravo_kernel for reviewing.
@langpavel
Copy link
Collaborator Author

langpavel commented Apr 28, 2016

@koistya Reviewed by @tobiasmuehl, @tomByrer and @bravo-kernel.
Now it should be perfect 😉

@langpavel langpavel changed the title Updated docs, documented feature branches, added recipes Updated docs: Feature branches, Recipes Apr 28, 2016
@langpavel
Copy link
Collaborator Author

@koistya @frenzzy Can you please review and merge? There is arising interest into redux on gitter.

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.

5 participants