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

Refactor index.js megafile into mutliple files #777

Closed
8 tasks done
captainsafia opened this issue Jan 25, 2019 · 4 comments · Fixed by #1761
Closed
8 tasks done

Refactor index.js megafile into mutliple files #777

captainsafia opened this issue Jan 25, 2019 · 4 comments · Fixed by #1761
Milestone

Comments

@captainsafia
Copy link
Collaborator

captainsafia commented Jan 25, 2019

To aid with our conversion to React and to ease front-end development on Binder (#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.

Steps

  1. Pick one of the tasks in the checklist below.
  2. Move the function/functions into a new file within the src directory.
  3. Add any helper functions or adjust function definitions/body to make it easy for the relocated functions to work independently of jQuery.
  4. Export the necessary and functions and use them in index.js.

Tips

  • Where possible, opt for passing a value into a function as a parameter instead of extracting it within the function body using jQuery selectors.
  • When possible, use functions that are part of standard JS instead of jQuery.
  • If possible, address some of the FIXMEs left in the code if they are small and isolated.
  • Make sure that all functions and variables are in camelCase, the JavaScript function naming convention.

Checklist

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.

cc: @yuvipanda @choldgraf @betatim

@choldgraf
Copy link
Member

To be clear - this is before any reactification (reacting? reaction?) happens, right?

I am so happy we are finally doing this!

@captainsafia
Copy link
Collaborator Author

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.

@choldgraf choldgraf added this to the v0.2 milestone Jan 26, 2019
yuvipanda added a commit to yuvipanda/binderhub that referenced this issue Oct 3, 2023
- Follows the plan laid out in
jupyterhub#777
- Only non-trivial move is to cleanup the `_config` call to
  use the more modern 'fetch' API rather than the older
  XMLHttpRequest API

Fixes jupyterhub#777
@yuvipanda
Copy link
Collaborator

#1761 fixes this, following the plan @captainsafia laid out :)

yuvipanda added a commit to yuvipanda/binderhub that referenced this issue Oct 3, 2023
- Follows the plan laid out in
jupyterhub#777
- Only non-trivial move is to cleanup the `_config` call to
  use the more modern 'fetch' API rather than the older
  XMLHttpRequest API

Fixes jupyterhub#777
yuvipanda added a commit to yuvipanda/binderhub that referenced this issue Oct 3, 2023
- Follows the plan laid out in
jupyterhub#777
- Only non-trivial move is to cleanup the `_config` call to
  use the more modern 'fetch' API rather than the older
  XMLHttpRequest API

Fixes jupyterhub#777
yuvipanda added a commit to yuvipanda/binderhub that referenced this issue Oct 3, 2023
- Follows the plan laid out in
jupyterhub#777
- Only non-trivial move is to cleanup the `_config` call to
  use the more modern 'fetch' API rather than the older
  XMLHttpRequest API

Fixes jupyterhub#777
yuvipanda added a commit to yuvipanda/binderhub that referenced this issue Oct 4, 2023
- Follows the plan laid out in
jupyterhub#777
- Only non-trivial move is to cleanup the `_config` call to
  use the more modern 'fetch' API rather than the older
  XMLHttpRequest API

Fixes jupyterhub#777
yuvipanda added a commit to yuvipanda/binderhub that referenced this issue Oct 9, 2023
- Follows the plan laid out in
jupyterhub#777
- Only non-trivial move is to cleanup the `_config` call to
  use the more modern 'fetch' API rather than the older
  XMLHttpRequest API

Fixes jupyterhub#777
@yuvipanda
Copy link
Collaborator

It only took about 4+ years, but this is finally done :) Thanks for the guidance, @captainsafia!

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 a pull request may close this issue.

3 participants