Shopify / javascript

The home for all things JavaScript at Shopify.
MIT License
251 stars 38 forks source link

Fix methods missing from `LanguageEditor`/`LanguageSearch` #155

Closed GoodForOneFare closed 8 years ago

GoodForOneFare commented 8 years ago

LanguageEditor is missing startAndDisableWhenLeaving, disableWith, toggleSavingSpinner, and retrieveData)

LanguageSearch is missing its currentParam function.

GoodForOneFare commented 8 years ago

This was caused by private class functions. I've merged mainline code for this that just throws an exception when private class code is enountered (juliankrispel/decaf@1c783b04a3824c60ca8448fc6e5803843f42eeaa).

Offending code:

class Shopify.LanguageSearch
  currentParam = ->  # <----- private function. No nice way to autotranslate to JS!
    URI.parseQuery(window.location.search)
GoodForOneFare commented 8 years ago

As we have reasonably modular code, we may be able to hoist all of the private stuff to before the class definition, and hope that nothing conflicts.

@lemonmade there's a considerable amount of private functions/vars. If you think automating a fix is worthwhile, please raise a new issue.