Skip to content

[Angular - NgRx - SCSS] Refactor of Services, Prep for state restructuring #440

@lindakatcodes

Description

@lindakatcodes

Update Sept. 16:

We've decided to split this work into multiple tickets, to make it easier to track and review. The work this ticket is tracking is updated below, with new tickets created for the remaining work needed.

This ticket should have:

  • Services adjusted to only call the API and return the full response
  • Store folder structure verified, and any new folders / files created so that there is a folder for each page of the application
  • The site should still "work" - a user can still navigate to any part of the application that has currently been completed
  • The auth folder in the store will be updated to include a small piece of information related to the authenticated user, so that information is always available and can be used for other API calls

The structure of the NgRx Store State is getting a little convoluted and could potentially cause issues as we keep working on this showcase.

A few things to work on that will help with this:

  • Store files should relate to the app page, and inner files should be relocated to where they'd go in the adjusted structure
  • The services might be doing too much data manipulation. A pass would be good to ensure all services are simply calling the API and returning the API response, which either the effect or reducer can then massage into the shape and names we want.

Related conversation for reference:
suggestion: I think these should be attached to home page specific state rather than being a part of the global user state; however I know we discussed possibly refactoring some of the state management in this showcase, so we can elect to fix that later if that makes more sense.

Originally posted by @Reshurum in #319 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions