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

UI overhaul and code refactoring #4

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

chapmankyle
Copy link

For the assignment, I have overhauled the look of the UI and refactored the code, as well as made the following improvements:

  • Localization, where the user can now select between viewing the website in English or Dutch
  • Prevent crash in Search when query returns no results
  • Add error handling for all API requests
  • Add key attributes to all child components that are rendered using map, to prevent unnecessary re-rendering
  • Replace all instances of Component with PureComponent to prevent unnecessary re-rendering
  • Replaced incorrect initial-scale1 in viewport meta tag with initial-scale=1
  • Use state to manipulate the DOM, instead of JQuery
  • Update dependencies (now using React v18 and React Router v6)
  • Replace random number generation from 0 to 100 in src/components/Game.js using array of 100 numbers with a random index between 0 and the number of images returned from the API
  • Use global this.planets array instead of creating the array each time the getGameImage method is called
  • Implement event bus to allow for component communication (used when user changes language or page)
  • Use Webpack v5 to build the project
  • Mobile friendly UI
  • Continuous integration is now setup, with three steps: build (checks that npm run build returns successfully), format (checks that the coding style is adhered to) and test (checks that all the test cases pass)

If I were to work on this for any longer, I would add the following:

  • Full test suite, so that every part of the app is thoroughly tested
  • Use Redux for state management

Best regards,
Kyle Chapman

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 this pull request may close these issues.

1 participant