Despite the appearance of a large PR, this is mostly just file and folder shuffling. There are very few changes other than imports/exports and additional types. Minus a couple of small tweaks, this is almost solely focused on client side code. A similar cleanup may happen in the future for the backend.
Why Such a Chaotic PR
ReactMap has long outgrown the simplistic project structure it had up until this point. The components folder was a mess and unsustainable. The goal of this structure is to have less deeply nested files and folders, have clear separations between pages, features, and components, and remove a lot of chaos that was created back when I had no idea what I was doing.
Notable Changes
Renames the old features directory to pages, this was meant to be this way from the beginning but I goofed
Adds a new features folder that actually just has features and not full pages
Adds a store folder where Zustand stores that are used across multiple pages/features are saved
Adds a utils folder where various functions from throughout the repo are now saved
Removes all export default in favor of named exports, this reduces confusion since the imported names must now match the specified exported names.
Makes all @mui/material imports more consistent
Makes imports more consistent with the 3 categories
External deps on top
Repo imports that are linked via @
Localized imports
Removes the Utility and Fetch static classes in favor of named exports
More jsdocs
Previously there were folders that had all popups, all markers, and all tiles. Now these are separated by feature, e.g. pokemon, pokestops, and gyms.
If you have custom files in your local ReactMap, there is a 9.8/10 chance that this has broken those, so find where you need to move your custom files and changes your imports/exports.
Despite the appearance of a large PR, this is mostly just file and folder shuffling. There are very few changes other than imports/exports and additional types. Minus a couple of small tweaks, this is almost solely focused on client side code. A similar cleanup may happen in the future for the backend.
Why Such a Chaotic PR
ReactMap has long outgrown the simplistic project structure it had up until this point. The
components
folder was a mess and unsustainable. The goal of this structure is to have less deeply nested files and folders, have clear separations between pages, features, and components, and remove a lot of chaos that was created back when I had no idea what I was doing.Notable Changes
features
directory topages
, this was meant to be this way from the beginning but I goofedfeatures
folder that actually just has features and not full pagesstore
folder where Zustand stores that are used across multiple pages/features are savedutils
folder where various functions from throughout the repo are now savedexport default
in favor of named exports, this reduces confusion since the imported names must now match the specified exported names.@mui/material
imports more consistent@
Utility
andFetch
static classes in favor of named exportspokemon
,pokestops
, andgyms
.If you have custom files in your local ReactMap, there is a 9.8/10 chance that this has broken those, so find where you need to move your custom files and changes your imports/exports.