qaror
qaror copied to clipboard
Rebuild layout in Bootstrap
Hello Mateus,
As I finished my project
https://barteringapps.herokuapp.com/
Now I am starting the new project about Question and Answers. I checked out Discourse, but as It mostly involve working with Ember.js and not much with Ruby on Rails (all the Discourse functionalities are built on an Ember.js App and use Rails as Backend API), I am thinking of giving it a try in forking this project.
Usually I try to save my time from developing the front end and I just use a bootstrap layout that I quickly customize to my need (something like this http://2code.info/demo/html/ask-me-html/single_question.html).
Fixing the front end plus developing the backend with the functionalities I have in mind, may take to much time...
So I am looking into it right now and I am hear to get some tips...
For example I think it will be necessary using a text editor like the one included in this github conversation for editing the code in the questions..
Thanks a lot for your help and input
Fabrizio
Hello again Fabrizio,
I'm also not into Ember.js much, more Aurelia. I leave frontend to developers who want to use this project on their sites. To handle ajax requests or manipulate DOM elements I used basic rails concepts like
$('#fast_search_results').show()
$('#fast_search_results').html('<%= escape_javascript( render 'thrs/shortlist' ) %>');
executed after .js.erb templates is loaded by browser. It's not perfect but it works and don't mixing into fronend much. I noticed that rails core team like cofeescript a lot (probably because of syntax similar to ruby), but I'm not convinced to this preprocessor. Pure JS with some jQuery do the thing in this qa app.
Glad you point out the text editor issue. I always stuck with some tinymcs or ckeditor (because of their features) but their API's are really hard to develop. I was never happy with that text-editors. What i found some time ago was https://github.com/basecamp/trix - Rails creators use it in their Basecamp project, so it should be easy to integrate with Rails :)
Yes, you really have a good idea with Trix! I am learning Rspec, but I am a beginner in Rails. I am thinking of giving it a try, by forking your project and maybe trying to apply a new layout, because nowadays I can buy layouts for 10 $ that look amazing so I avoid investing time in the front end work and I am also good in fixing them for my use. I will post now in the another discussion to ask about migrating from Rails 3 to Rails 4/5.
Thanks a lot Fabrizio