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

Rewrite JS in modern-ish (ES6 or newer) Javascript #403

Open
9 of 21 tasks
aaronrudkin opened this issue Feb 16, 2021 · 0 comments
Open
9 of 21 tasks

Rewrite JS in modern-ish (ES6 or newer) Javascript #403

aaronrudkin opened this issue Feb 16, 2021 · 0 comments

Comments

@aaronrudkin
Copy link
Member

Frankly a lot of the JavaScript on the site needs love, and in addition to being written better, it should also make use of modern JS (ES6 or newer). It could also use documentation. This will make future maintenance easier, and since eventually this site will end up migrated to some kind of React / TypeScript whatever future thing, the best we can do for now is clean up things to get ready.

Changes will be put in the python3 branch

Key changes:

  • Use arrow functions, functional programming (map, etc.), let/const, spreading, template strings
  • Fix line length and tabs, use long line breaks where necessary in strings
  • Comment
  • Break up large functions
  • At least one pass to try to clean up unclear code

File list:

  • colorMap.js
  • congress.js
  • contact.js
  • data.js
  • decorate.js
  • district.js
  • footer.js
  • footerFixed.js
  • mapPanZoom.js
  • memberTable.js
  • nominateHeatMap.js
  • palette.js
  • party.js
  • partyGlance.js
  • personIdeology.js
  • personVotes.js
  • search.js
  • stateMeta.js
  • voteCharts.js
  • voteFilterbar.js
  • voteTable.js
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

1 participant