guardian / scribe-plugin-noting

9 stars 3 forks source link

Abstract Note Toggle Functionality #37

Closed cutandpastey closed 9 years ago

cutandpastey commented 9 years ago

This PR abstracts the note toggle functionality into two distinct, unit tested modules. The logic in these two modules specifically has been overhauled.

I've edited to npm watch task to run when src/**/*.js have changed as well as test/**/*.spec.js as the previous behaviour was slightly annoying.

Ive also moved all the utils that mutate a given tree into the actions folder rather than in utils because these modules 'act' on a given tree.

Finally I've refactored hasClass to use a native RegExp rather than the array operations which is more performant.

hmgibson23 commented 9 years ago

Style!

cutandpastey commented 9 years ago

Style should be fixed. Also as discussed we cant have a nice rootRequire function as browserify doesn't support dynamic requires.

hmgibson23 commented 9 years ago

:+1:

cutandpastey commented 9 years ago

@hmgibson23 @robinedman can I ask you guys to cast your eyes over this again? If your'e happy I can release again and get this into composer?

robinedman commented 9 years ago

:+1: