Update naming conventions for event.state
fixes #159 (closed)
TLDR: The majority of changes to selector.ts
, state.ts
, and spec.ts
are just reorganization changes. The code was not updated, I just moved selector and projector functions out of state files into their own "selector" files.
In this ticket:
I decided against the "event" -> "catalog" change for now. This would be a rather large change that would touch almost every part of the application. I'm still in favor of the change, but it's a lot of work for not much benefit. I decided to focus on organizing state a little bit more with the NgRX selectors refactor.
- Refactor events.facade -> event.facade
- Update NgRX selectors
- move projector functions into selector files, easier to follow logic
- create test spec files for selector and projector functions (i.e. event.selectors.spec.ts)
- remove selectors from services, add to selector files
- ensure selectors are only accessed via effects and facades. Components and services should not access selectors directly.
- Components should interact with the facade to update/get slices of state.
- Services should be used to make external requests.
- NOTE: one caveat being query-string.service.ts. There is future work to update how we maintain state in the URL, so I am leaving this unchanged. Also, it would require lots of work because really query-string.service shouldn't even be a service. We should have an app url slice of state and url params should be maintained and stored in state. Added a comment to the appropriate ticket: #277 (comment 171962)
Edited by Edward J Hunter