Support for Zurb Foundation 3 #681

Merged
merged 5 commits into from Nov 5, 2012

Conversation

Projects
None yet
6 participants
Contributor

balexand commented Nov 4, 2012

This is a fix for #489. If the generator is run with --foundation then the foundation config will be generated. The configuration template is based on a suggestion by @naoisegolden. The relevant Foundation docs are form errors and alert boxes.

diwa-zz commented Nov 4, 2012

+1 for this. Some of us prefer Foundation over bootstrap

Collaborator

nashby commented Nov 4, 2012

looks good to me. @balexand, thank you! Are you using this config in real application? /cc @rafaelfranca

...tors/simple_form/templates/config/initializers/simple_form_foundation.rb
+ b.optional :readonly
+ b.use :label_input
+ b.use :error, :wrap_with => { :tag => :small }
+ end
@carlosantoniodasilva

carlosantoniodasilva Nov 4, 2012

Collaborator

Doesn't it support hints? I can see it's not enabled by default, if it doesn't, hint_class should not be required I believe.

@naoisegolden

naoisegolden Nov 4, 2012

Zurb Foundation forms don't have hints. So you are right, hint_class should not be required.

@balexand

balexand Nov 4, 2012

Contributor

I intentionally left out hints since Foundation doesn't support them out of the box, as @naoisegolden mentioned. Maybe it would be better if I included hints but just left them ugly/unstyled by default. What do you think?

@nashby

nashby Nov 4, 2012

Collaborator

I think we shouldn't include hints if Foundation doesn't support it by default.

@carlosantoniodasilva

carlosantoniodasilva Nov 4, 2012

Collaborator

👍, but please make it clear in the readme part that hints are not rendered since they don't support it by default.

Collaborator

carlosantoniodasilva commented Nov 4, 2012

We've had some attempts like #504 #602 #604 that required a lot more changes than that. I assume it's different because their attempts were related to Foundation 2, whereas yours is for version 3, am I correct? Just afraid of releasing support for it considering we're not Foundation users.

Thanks for your work on that!

Thank you for this fix @balexand, hope to see this out shortly.

Contributor

balexand commented Nov 4, 2012

@carlosantoniodasilva Good idea. I documented that hints are disabled by default in the README and also put a commented line in the configuration file.

Contributor

balexand commented Nov 4, 2012

@nashby I'm not using this configuration in a real app yet, but it will be nice to have for new apps. I'm currently using simple_form and Foundation 2 (with custom styles for forms) in an app. I haven't had a reason to upgrade that app to Foundation 3 yet.

Collaborator

rafaelfranca commented Nov 5, 2012

Seems good to me :shipit:

nashby added a commit that referenced this pull request Nov 5, 2012

@nashby nashby merged commit 95c1370 into plataformatec:master Nov 5, 2012

Collaborator

nashby commented Nov 5, 2012

@balexand thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment