stumptown-content icon indicating copy to clipboard operation
stumptown-content copied to clipboard

Tidy up ingredient handlers

Open ddbeck opened this issue 5 years ago • 0 comments

Thanks to our recent work on ingredient handlers, we've done some refactoring. But it's been a bit incomplete, leading to inconsistencies in the way we've organized them. This is a first step toward making it more obvious where ingredient handlers come from and how they're composed.

Unfortunately, this leads to a bit of a grab bag of changes. I tried to show some restraint though. The changes that happened here:

  1. The ordinary prose handlers now reuse the sectionHandler code used in other ingredients. 9c51c10 makes the change and 640c754 moves them alongside another handler wrapper. This is probably the most substantial thing, since it trims some duplicate code.
  2. The link list checker has been refactored to provide an API closer to sectionHandler etc. See ddc64e8.
  3. I split the class member handlers into their own files in dad2ac8. This makes it clearer which modules contain concrete ingredient handlers and which contain utilities (there's still a lot more work to do be done in this area—and utils could probably stand to be broken up or export informative namespaces).
  4. With that, I was able to make registering new ingredients less repetitious in 7d13da1.

There's more to be done, but this is a start.

ddbeck avatar Jul 10 '20 17:07 ddbeck