MCBoarder289 / shelf-help

MIT License
3 stars 0 forks source link

Refactor/Clean Up Library Parsers #12

Closed MCBoarder289 closed 1 week ago

MCBoarder289 commented 1 month ago

When implementing some of the newest library parsers, I picked up on a few patterns that could be abstracted out.

For example: Phoenix was basically a copy last with Syracuse, because those likely have very similar backend systems.

Would like to be more DRY and make some of those classes more modular.

MCBoarder289 commented 1 week ago

Another goal for this should be to make the time it takes to support a new library very quick.

Perhaps we can decouple Libby and Physical Books, so that we can partially support a library with just Libby first, and then add Physical books later?

MCBoarder289 commented 1 week ago

We should definitely decouple LIbby and Physical Books. Here's a gameplan for that:

  1. Update Supported Library List

    • Actual Library Names vs. Shorthand like it is now (ex: Nashville Public Library vs. Nashville)
    • Use this google doc to pre-populate all Libby Libraries reddit google doc
  2. Make LIbby the default, Physical Book an optional select

    • Disable the SegmentedControl for Book option when not supported
    • Will need to pull out state for this and also do a lookup based on supported libraries. Probably just keep this on the FE to avoid bandwidth issues or a network call.
  3. Add URL parameter for selected library (prevent search each time)

    • Mirror local storage for the gr_id param, so the user only has to enter it once or when they want to change it
MCBoarder289 commented 1 week ago

Going to reopen this issue on the refactor/cleanup, and repurpose this one. I believe the decoupling of Libby/Physical Book libraries is more useful in the short/medium term.