bcgov/greenlight

dFlow refactoring

esune opened this issue · 1 comments

esune commented

After using the initial prototype of dFlow, some refactoring effort is required to address some of the "sharp edges" that were left on the product. This is a list of items that require checking, it is not complete and will be updated with new items. It will require breaking down and estimating work once ready to tackle it.

General
  • Theming support: is it required?
  • i18n: is it required?
  • types: define types for all the objects returned by API calls, and use them in the code.
  • tob.service: request to ToB API returns all the schemas, not only the latest versions. If a filter on the API is not the right/best solution, update the code to only display the latest version registered schemas.
  • error handling: add some minimal error handling to the application
  • handle paginated results when requesting data to the ToB API
Modules
  • create progress/spinner module that can be reused in other parts of dFlow, or migrated to other apps
Graph
  • investigate better angular integration: d3 and dagre-d3 are responsible for drawing the graph portion of dFlow and, while they work great, they cause the graph to be "disconnected" from the Angular framework. It would be great if they could merge seamlessly, allowing events and elements to be handled without issues.
  • data requests: investigate the possibility of optimizing the order and performance of the request to the API exposed by ToB.
esune commented

First round of refactoring complete. Further refinements will be implemented iteratively as they arise.