Skip to content

Typescript refactoring and cleanup (productions) and prmon results plot (pipelines)

Ryunosuke O'Neil requested to merge roneil-ts-refactor into main

Efforts are made to

  • de-spaghetti my code
  • Convert the productions part of the website to typescript
  • Try and take advantage of typing to validate the API output and make it easier to handle
    • possible caveat: if the API output changes - will the client complain about incompatible type interface?
    • can we get around this by only requiring a "minimum" type specification for returned API objects, while allowing for extra fields that may be added?
    • fine to throw errors if the structure for existing objects is changed - that would break the site anyway
  • Try to use map et cetera where possible to build component arrays instead of harder-to-follow for loops
  • Try to reduce unnecessary useState e.g. isLoaded could be made a const that depends on whether the API call result is filled or not

relates to #34 (closed)

Edited by Ryunosuke O'Neil

Merge request reports