FortAwesome / fa-icon-chooser

an icon chooser implemented as a web component
MIT License
15 stars 6 forks source link

Factor out fetch and add fatalError state #22

Closed mlwilkerson closed 3 years ago

mlwilkerson commented 3 years ago

Two key things in this PR:

  1. Factoring out network requests (i.e. fetch) to make a more clear separation of concerns. I want the container to be responsible for resolving those GET requests for for CDN assets, just like it is responsible for the GraphQL query POST requests. This will also make the web component it more easily testable.
  2. Introducing a fatal error state. The need for this was already present, but it is highlighted by the fact that this web component will have its hands tied if the container doesn't provide useful results for those delegated network requests.