Refactor
Changes to earthquake-latest-earthquake to simplify architecture.
components,
- There are a lot of components in the application, and it can be hard to know what you're looking for coming into the application. Can we nest/organize these components by their panels (at the very least). This means we would have src/app/components/(list|map|settings|about|modal|util)//
app.state
- remove "rawUrl"
- Would be able to drop App.state entirely if we just pulled the params off the url to set state and no longer updated them.
event.state
- combine "lastError" and "autoUpdateError", they are used in the same way
- add snackbar anytime a data load fails (currently just for autoupdate?)
- create a "request" object that has pertinent info in it? (isLoading, loaded, error)
currentFeatureId?: string;
events?: EventGeo;
request: {
isLoading: boolean;
loaded?: Date;
error?: any;
}
map.state
- do nothing
search.state
- combine with event state?
- move isSearch selector into search state
settings.state
- clean up selectors, defaults should be set in
InitialSettingsState
ui.state
- Combine with settings.state? it is an application setting
TODO:
- standardize "events" and "event"
- move mapping functions from
*.state.ts
file into the*.selector.ts
file that uses the mapping functions. - Use default values from initial state, do not add default values to selectors.
- reorganize effect files,
- create new effect files for slices of state that need them
- group effects by the entity that is effected, rather than by what causes the effect.
- cleanup unused code
- update query-string.service to be settings.service? right?
Edited by Edward J Hunter