Skip to main content

September 30

Hi everyone! Thought I'd write an update a little earlier than usual while I have the energy, winter lethargy has been setting in a bit this week.

Image cropping

This was honestly a bigger hassle to do than I'd been expecting, but it's done now. Users can crop profile picture uploads and banner uploads, and it'll warn them if the crop they choose is too small to display without being upscaled, so it always uploads nicely. I also did a lot of updating to the image resizing lambda function for AWS Lambda, so that it can handle this stuff more easily and be more configurable through environment variables (avoiding having to change the code package). 

A little example of how it looks is attached. It wasn't super difficult, just that I've been very slow (as usual) this week and there are a lot of quirks in the ImgAreaSelect library to figure out.

I've also done some work on the layout for the main user profile page, so that the user details area can expand up to the maximum banner height or shrink down to the minimum banner height. I'll also need to adapt the image cropping code to work for artwork submission - so that users can have an option to submit thumbnails for galleries, if they prefer that to full images.

For bits of the site that have loading animations - mainly the galleries - I've made the animation nicer, so that a nice spinning wheel sits on top of the gallery until it is loaded. Clicking on NSFW galleries and individual NSFW artworks now results in a nice fade in effect instead of an abrupt "display element immediately" appearance.

There's still a bit more to do on this, namely making gallery images appear on the page in a nice manner, but that shouldn't be too hard.

I've also been tidying up various bits of the website layout; that's an ongoing process, but it's little bits and pieces that add up. I've sorted out the settings pages so that the menu always stays in the same place if you have to scroll, made some standard classes for settings inputs and so on.

Discord webhooks

When the site is live, it'll inevitably need a Discord server, and keeping tabs on who is and isn't subscribed means having a custom bot connected to a Discord webhook to accurately track that. I haven't started this yet but I've begun looking into how to do it - I don't envision that it will be especially difficult to do, just one of those time consuming tasks.

Redis

While I was adding a search bar to the navbar, I remembered that simply querying the database all the time would get awfully expensive, especially for big queries like searching the artworks table. There's no real reason to do that for many queries - so the natural answer to that is to cache query results for a period of time. 

AWS ElastiCache for Redis should be able to do the job - Redis servers start at around the same price as database servers, but a small Redis server should offload a large amount of database read traffic. Exactly how much internal refactoring I'll need to do to cater for this I don't know yet, but I think it should be quite small (basically a case of deciding which queries go to Redis and which do not).

This is fairly high up on the todo list now, so I'll start looking into it during October.

Filling out the settings pages

A lot of the settings page stuff is basically tedious work - adding lots of inputs and checkboxes, making sure the backend is correctly set up to save the settings, etc etc. I've been slowly filling out the settings pages with the options they need (you can see the list of socials in the console logging window in this post's image, I'm testing some validation things), that'll take a while though.

image.png