Lists are a great way of organising your books on Booko, but sometimes it’s hard to remember if you’ve already added a book to a list. Now, when you’re looking at a book and you’re wondering if it’s already on a list, click the “Add to a list” button and you’ll find your answer.
New Filters for price list. Have a shop you’re not a fan of? Now you can filter them out of Booko’s price table. Edit them at the filters page.
Some pages on Booko have a lot of covers art to display and often the page extends beyond the bottom of the window. To make pages load faster, it’s possible to tell the browser to not load images which aren’t yet visible on in the window. As you scroll down, the browser will load the images just before they appear – this is called lazy loading. I’ve started adding the “loading=lazy” attribute to suitable images so that images are loaded lazily. Safari doesn’t support this yet, but it is just ignored so it shouldn’t cause any issues. Firefox and Google’s Chrome do support it and they’ll only load cover art images if they’re visible in the windows. You’ll find it in use on the PreOrder and Most Clicked pages.
Fixed an awfully old bug related to the migration from Oracle’s MySQL to the excellent PostgreSQL. The bug stopped the creation of new lists, randomly. When you create a new list, Postgres will generate a new ID for the list and by default, the ID it chooses start from 1, then increment up from there. Postgres keeps track of these sequences and hands out the next largest value by default. When we migrated, we already have thousands and thousands of lists and Postgres should have been set to start the new sequence from the largest existing list ID. However it wasn’t. So sometimes new lists were assigned an existing ID, which caused the list creation to fail. The fix for this problem is simple:
SELECT setval('lists_id_seq', (SELECT MAX(id) FROM lists)+1);
This sets the value of the sequence to the maximum ID used for lists, plus one.