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

Bootstrap as an option for generator #119

Merged
merged 1 commit into from Dec 6, 2015
Merged

Conversation

yorzi
Copy link
Contributor

@yorzi yorzi commented Nov 25, 2015

Really busy in whole last week, only start to have some time for #96

It's not fully ready yet. But I hope to have this PR submitted for people to review and give me feedback, so that I am able to make it better. I still need to adjust/add some rspec testings.

@justin808
Copy link
Member

@robwise Please take a look at this and see if this should go into v1.1.0.

@justin808
Copy link
Member

@robwise @yorzi We're getting some build failures.

# --bootstrap
class_option :bootstrap,
type: :boolean,
default: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

I talked to @justin808 and he said he'd prefer if this would default to true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@robwise let me make it default to true
@justin808 I will let this PR pass build today.

@yorzi yorzi force-pushed the master branch 4 times, most recently from 5b345de to a951d1c Compare November 28, 2015 08:13
@justin808
Copy link
Member

@yorzi, let @robwise and I know when this one is ready.

@yorzi
Copy link
Contributor Author

yorzi commented Nov 30, 2015

@justin808 I think it's ready with correct functions and testings. The only concern for now is to document acordingly, but I am not sure where and how to do that correctly. Please take that document thing in mind before merging to your master.

@justin808
Copy link
Member

@robwise I'll let you take a first review at this, then I'll review.

@justin808
Copy link
Member

@robwise Let's try to get this wrapped up tomorrow. I'd like to push a version of the generator diffs (prs) to take a look at going basic -> basic + bootstrap.

@@ -128,7 +128,7 @@ In most cases, you should use the `prerender: false` (default behavior) with the

Now the server will interpret your JavaScript using [ExecJS](https://github.com/rails/execjs) and pass the resulting HTML to the client. We recommend using [therubyracer](https://github.com/cowboyd/therubyracer) as ExecJS's runtime. The generator will automatically add it to your Gemfile for you.

Note that **server-rendering requires globally exposing your components by setting them to `global`, not `window`** (as is the case with client-rendering). If using the generator, you can pass the `--server-rendering` option to configure your application for server-side rendering.
Note that **server-rendering requires globally exposing your components by setting them to `global`, not `window`** (as is the case with client-rendering). If using the generator, you can pass the `--server-rendering` option to configure your application for server-side rendering.
Copy link
Contributor

Choose a reason for hiding this comment

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

@justin808 @yorzi this may be a little unclear, as it makes it sound as though we don't need to expose components to window when server rendering. We still need to do that, just in addition we need to expose to global.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@robwise I think this doc is not supposed to be updated in this branch. It might because my editor removes an space here.. anyway, can you or @justin808 do this doc updates accordingly?

Copy link
Member

Choose a reason for hiding this comment

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

@yorzi or @robwise we should do something to get rid of trailing spaces.

@robwise
Copy link
Contributor

robwise commented Dec 1, 2015

Just a couple of comments, the biggest thing being using --skip-bootstrap as the option instead of --bootstrap if by default the bootstrap generator will be run. This is a Rails convention that we were copying as it hints to the user which options are on by default and which are not.

@yorzi All in all, a very good job—I'm delighted to see that you were able to read the code and change things exactly how they should have been, and without any help! I also liked how you refactored the bootstrap examples tests.

@justin808
Copy link
Member

@robwise when you're ready for me to do a final review after you have generated the PR of basic to basic + bootstrap, let me know.

@robwise
Copy link
Contributor

robwise commented Dec 3, 2015

@justin808 I'm just confused as to what we are recommending the user should be doing when using stylesheets without bootstrap. Can they just use them the normal way you would for a Rails app where they go in app/assets/stylesheets, or alternatively, the normal way you would use webpack to require the stylesheets? Both? Are there any special caveats that they will need to watch out for or address?

@yorzi
Copy link
Contributor Author

yorzi commented Dec 3, 2015

@robwise good points! I've updated README to include some more explanation for bootstrap option. You or @justin808 can help to reword it with more details if needed.

@justin808
Copy link
Member

@yorzi Great job!

@yorzi yorzi force-pushed the master branch 2 times, most recently from 22a27ef to 0ce52c2 Compare December 4, 2015 11:00
@yorzi
Copy link
Contributor Author

yorzi commented Dec 5, 2015

@justin808 what do you mean by "rebase down to a nice commit with a nice message" here?

@robwise can you help with the generator results or would you let me know how to do that with your script?

@robwise
Copy link
Contributor

robwise commented Dec 5, 2015

@yorzi As for the generators, all you need to do is go to rakelib/examples.yml and follow the pattern there to generate an example app that passes --skip-bootstrap. If it turns out to fail the tests not because it isn't working but because something about the tests expects bootstrap, you can modify the dev_tests generator to do something special (such as put a different type of test in the spec folder) in the case that --skip-bootstrap is passed.

@yorzi
Copy link
Contributor Author

yorzi commented Dec 6, 2015

@justin808 oh, I do know the way to rebase and combine commits/logs, so you want me to combine these commits with better git logs, right?

@justin808
Copy link
Member

Please combine to one commit with nice description that I can use in the change log.

@yorzi
Copy link
Contributor Author

yorzi commented Dec 6, 2015

@robwise your guide is to test dummy app, but @justin808 asked for a generator results for diff from here: https://github.com/shakacode/react_on_rails-generator-results . Do I understand something incorrectly?

@robwise
Copy link
Contributor

robwise commented Dec 6, 2015

@yorzi You're absolutely right, I misunderstood. I went ahead and took the liberty of modifying my little generator script to generate an app that uses your new option so that we can look at the diffs.

Check it out here:
https://github.com/shakacode/react_on_rails-generator-results-testing/pulls

Specifically, here is a comparison of running the generator with the default options versus passing in your new --skip-bootstrap option:
https://github.com/shakacode/react_on_rails-generator-results-testing/pulls

It looks good to me, what about you?
cc: @justin808

@robwise
Copy link
Contributor

robwise commented Dec 6, 2015

Also I configured rake to generate an example app for you in a branch based off of your changes: https://github.com/shakacode/react_on_rails/blob/bootstrap-as-an-option/rakelib/examples_config.yml#L18

It would probably be easiest if you just manually made this change in your own branch

…you don't need bootstrap related files and regarding configuration.
@yorzi
Copy link
Contributor Author

yorzi commented Dec 6, 2015

@robwise 👍 and I added that configuration for sample app .
cc: @justin808

robwise added a commit that referenced this pull request Dec 6, 2015
Bootstrap as an option for generator
@robwise robwise merged commit ec7e3c6 into shakacode:master Dec 6, 2015
@coveralls
Copy link

Coverage Status

Coverage decreased (-52.6%) to 37.273% when pulling e560da6 on yorzi:master into 899fefc on shakacode:master.

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.

None yet

4 participants