Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite pages and components to have consistent state and business logic #7

Open
bryanrcarlson opened this issue Feb 22, 2021 · 0 comments

Comments

@bryanrcarlson
Copy link
Contributor

I need to clean up some of the architecture. Right now some "pages" handle no logic and all the logic, event handing, etc. occur in the components. For example, the Catalog page has a CatalogViewer. The CatalogViewer handles event updates to State and such things. This forced me to create a second component for ProjectCatalogViewer which is very similar to the CatalogViewer. But then I have a MetadataView page that handles the event logic and passes a Metadata to a MetadataDetails component.

I'm not being consistent with the way I implement logic

I think a better way to deal with this might be for the page to handle updating states and passing that along to the component? This will also allow the CatalogViewer and VariableViewer to reference the same underlining List<Metadata> instead of each having to create a subset of the list (in case of Project-specific or Zone-specific pages)

Proposal: Rewrite CatalogViewer and VariableViewer to only iterate on a List<Metadata> (the variable viewer will still need to create a List<CatalogVariableViewerViewModel> from the List<Metadata>)

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

No branches or pull requests

1 participant