Skip to content

State management cleanup & the road to 2.0...#810

Merged
TurtIeSocks merged 129 commits into
developfrom
page-generator-rework
Aug 21, 2023
Merged

State management cleanup & the road to 2.0...#810
TurtIeSocks merged 129 commits into
developfrom
page-generator-rework

Conversation

@TurtIeSocks

@TurtIeSocks TurtIeSocks commented Aug 10, 2023

Copy link
Copy Markdown
Collaborator

Road to 2.0

State Management Cleanup

  • Remove unnecessary setters
  • Create additional, smaller stores
  • Don't pass insane # of props
  • Performance improvements for scanNext/scanZone
  • State maintenance improvements for the Poracle integration

Custom Components

  • This affects the loginPage, messageOfTheDay, and donorPage generators
  • Lets you use the sx prop, a superset of style prop
  • Read more: https://mui.com/system/getting-started/the-sx-prop/
  • Also rewrites a lot of the code to be better react style code
  • Lets you write theme aware (dark/light) mode components
  • Needs testing

Deprecation of the .env file

  • Loading env variables from this file are no longer supported, except for overriding the OpenAI key and Sentry, neither of which are necessary for production use.
  • Google analytics ID will still be supported to prevent this PR from being breaking, but it will be removed entirely at some point, move it to the config!

Packages Directory

  • This is the start of moving this repository into a proper monorepo type structure
  • Config, locale, logger, masterfile, and types packages have been created for easier maintenance and readability

GraphQL

  • Move server creation to its own function to clean up the server index file
  • Create *.graphql files for the SDL typings instead of JS

Other Notes

  • Complete rewrite of the Poracle API handling on the backend for much clearer code
  • JSDoc types for almost the entire backend and large portions of the frontend, more to come in the future
  • Renaming of yarn.scripts to make more sense and be more consistent
  • Remove the areas.example.json file, use Koji instead
  • Introduction of React Virtuoso package, eventually all React Window components will be replaced with this
  • Update Zustand package
  • Removal of ReactMap.mjs, this has been marked as deprecated for a very long time
  • Old config migration script was removed
  • Poracle to Geojson script was removed, use Koji
  • Rework the knex migration file

Locales

  • Split AI generated and human translations to make it easier going forward to distinguish the two and overwrite them when contributions are made

Shockingly, this PR does not have breaking changes (AFAIK), the main one to adjust though for the future is moving your GA key to your config file.

@TurtIeSocks TurtIeSocks changed the title feat: sx prop & better practices for page generators State management cleanup & the road to 2.0... Aug 12, 2023
@TurtIeSocks TurtIeSocks merged commit d617182 into develop Aug 21, 2023
@TurtIeSocks TurtIeSocks deleted the page-generator-rework branch August 21, 2023 04:19
TurtIeSocks added a commit that referenced this pull request Aug 21, 2023
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