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

Clean up front-end code #153

Open
howdoicomputer opened this issue Feb 7, 2016 · 1 comment
Open

Clean up front-end code #153

howdoicomputer opened this issue Feb 7, 2016 · 1 comment

Comments

@howdoicomputer
Copy link
Contributor

This could probably be broken up into multiple issues. The code that powers the front end is really monolithic and is primarily sourced from a ~900 line file.

Proposal:

For now? Tests. The code is rather verbose and could be refactored quite a bit. After tests are done, it could be broken up into multiple files and then later loaded using a module loader like Webpack, Browserify, RequireJS, etc.

I dunno'. Thoughts? Objections?

@jszwedko
Copy link
Member

jszwedko commented Feb 7, 2016

@howdoicomputer it could definitely use some refactoring :)

Rails asset pipeline allows for some modularization -- we could also take more advantage of UJS via remote: true forms and what-have-you to avoid the need to have JS binding to the forms and doing the AJAX submit.

You are correct that there don't appear to be any tests at that level. If we end up replacing the Javascript with Rails UJS stuff, it may make more sense to do capybara tests than actual JS tests since much of the code would basically disappear. We could then have JS tests for the remaining components.

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

No branches or pull requests

2 participants