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

Whilependingmerge #75

Open
wants to merge 2,497 commits into
base: master
Choose a base branch
from
Open

Whilependingmerge #75

wants to merge 2,497 commits into from

Conversation

pehrlich
Copy link

This still needs cross-browser testing, and some quick college i18n, but I figured I'd make a pull request just to kick things off.

Changes in these commits:

  • Replaced registration flow with a slidey ajax version.
    -- simplified sass, converted to erb, converted to coffee
    -- created a file lib/javascripts/jquery-extensions. This holds certain custom tools such as $.fn.{disable, slideIn, nextInDom, fieldhelp, addSpinner, removeSpinner, submitAjax}. I recommend everyone take a look and make use of or add to this code when appropriate.
  • Removed registration.rb
  • created api hooks for most steps in the registration flow
    -- added public_api method which allows a class to bypass authorization
  • removed mobile site registration flow

I should have some mpq updates on the way here shortly!

@pehrlich
Copy link
Author

A few notes & learning experiences from doing this work:

Check out ReCSS! It allows you to re-apply stylesheets without reloading the page. Its a big time-save and helps focus (no js distractions). http://david.dojotoolkit.org/recss.html

when writing css, keep the selector rules as simple as possible. Sass is dangerous, indentation seems harmless but creates inflexible code. Only indent when necessary. Favor adding a new class to some existing markup than a new selector to some existing css. Try and be markup independent, referring only to a minimal set of class names.

when deleting registration.rb, every method deleted was accompanied with a full-text-search
note on refactorings like this -- it wasn't a sudden thing. A method was duplicated in the api, then the old one was marked for possible deletion. A number of these were accumulated, then in a batch checked and deleted. As the class began to empty, it to was marked for possible deletion, and the after some refactoring of the views, removed.

In this javascript, there's about as much library code as there is procedural code. Try and logic and flow to a minimum and in one designated sector, with the rest being a toolbox that gets employed. (This also makes things more easy to test, automated or otherwise)

And finally, I'm stoked because I got jquery.validate working with both client and server side errors and that's pretty cool.

Go check out the code! It should be fun!

@Jberlinsky Jberlinsky force-pushed the master branch 7 times, most recently from 9320072 to 77d6828 Compare February 17, 2015 20:04
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.

5 participants