To aid with our conversion to React and to ease front-end development on Binder (https://github.com/jupyterhub/binderhub/issues/774), we'll need to refactor the index.js mega file into multiple files with discrete functions. The goal here is to move all the functions into files that will roughly map to React components or library functions in the future.
src directory.index.js.Here's a checklist of the functions/components that need to be moved out into separate files. This list isn't complete yet but is enough to get the ball rolling.
image.js (https://github.com/jupyterhub/binderhub/pull/776)setUpLog into log.jsupdateUrls and v2url to url.jsgetBuildFormValues to form.js. The function should take the jQuery form element as a parameter and extract the individual form fields from the children within.markdownBade and rstBadge functions into badge.js (https://github.com/jupyterhub/binderhub/pull/778)getPathType and updatePathText to path.js. (https://github.com/jupyterhub/binderhub/pull/778)updateRepoText to repo.jscc: @yuvipanda @choldgraf @betatim
To be clear - this is before any reactification (reacting? reaction?) happens, right?
I am so happy we are finally doing this!
To be clear - this is before any reactification (reacting? reaction?) happens, right?
Yep. No React-ification. Just moving and refactoring things so it is easier to Reactify down the line.
Most helpful comment
Yep. No React-ification. Just moving and refactoring things so it is easier to Reactify down the line.