August 10
Hi all, hope you're doing well ^^
Moderation Progress
I've been chipping away more at the moderation pages, and have made some progress on the moderation and lookup pages for users. Still a work in progress at the moment, as I've been working on lots of bits of the code in little pieces.
Text Moderation
I decided to experiment with AWS Comprehend, which is AWS' AI text analysis service, for helping to moderate artwork comments. It works well, though only for English; still, it should help significantly reduce a lot of human moderation burden for e.g. abusive comments, and for helping the mental health of moderators in not having to see as many of them. Comprehend has a clear opt-out option and strong TOS terms regarding the use of customer data for training purposes, which I've selected - without that, I wouldn't consider it acceptable to use it.
I looked into some other options that have support for multiple languages, namely Google Natural Language Processing, but it works a little differently in terms of what forms of toxicity it detects, the pricing structure and so on. The pricing model has tradeoffs, in that there's a free amount per month, but after that amount the cost per 100 characters is 5 times higher than AWS; that said, the AWS model has a 3-unit minimum charge (100 characters being 1 unit), so the average text length also matters. While Google's offering states clearly that it does not currently train its language processing model on customer-submitted text, there isn't a general opt-out that I know of that would work in the case of their policy changing, so I'd have to be ready to switch to Comprehend as a fallback if Google changed their policy in future and didn't provide an opt-out.
Gallery: View Artwork Modal
I debated to myself whether to create a modal that allowed users to view an artwork within a gallery without changing the page (a la Twitter), and decided it's worth doing. Since Deserted Chateau isn't an SPA (single page architecture) site, one of the probable causes for frustration for a user is clicking on an artwork in search results or in a gallery, having only wanted to look at it further and not go to an entirely different page, as it messes with neatly browsing through a long gallery or search.
The first time I tried implementing it for Deserted Chateau, I made it an extension of the main artwork details page, where users could go back and forth between that user's artworks, rather than just expanding one artwork on the given page at a time. That approach made for a horrific mess in terms of managing the browser history, and wasn't intuitive to use or simple to make, so I scrapped it. The newer concept is a lot simpler and easier to implement.
It's maybe half done or so at the moment, but it shouldn't be a difficult modal to complete. The only decision I need to make is how the page should behave if the user refreshes, as the modal URL points to a page that doesn't exist; there's a few possible ways to handle that situation, e.g. loading the previous search page the user was on, I just need to decide on one.
Banned user profiles
Previously, visiting the profile of a banned user resulted in a redirect to the 404 error page, but that's unintuitive and confusing. Instead, a banned user's profile now shows they are banned, and because I felt like it, the quotes from the error pages are also present there.
Tooltip improvements
I've improved the tooltip system, to include some defined "theme presets" (separate from the normal Tippy themes) for tooltips that should have different on-hover delays. This should help improve the user interface by standardising tooltip behaviour as well as appearance, in places where e.g. a tooltip is only needed if the user hovers for a long duration, or for those where it should appear instantly.
Aside from that, I need to improve on the tooltip colour scheme, and start correcting the theme presets of tooltips on some pages.
Bug Reports Page
I've drafted a bug report page, for the normal error pages to lead to (as previously it just said "contact support if you encounter this error repeatedly"). I need to flesh out the options for the report information, and decide whether to make an existing bug reports page to prevent lots of repeat submissions.
User 4K display setting improvements
I've implemented backend code to improve the user's global 4K display setting (whether to allow their submissions to be shown in 4K resolution for images).
When the setting is turned on, the 4K versions of the user's artworks (that have the setting enabled) are copied from the protected S3 bucket, which has no CDN or public access, to the subscribed bucket which does have CDN access.
When the setting is turned off, the files in the subscribed bucket are deleted, and a request is made to BunnyCDN to purge those files from the CDN cache, so that they instantly stop being unavailable. This gives users more control over how and when their 4K resolution artwork is accessible by users.
I'll need to add a limit to this to prevent abuse, e.g. someone constantly switching it on and off for malicious purposes. The cost of S3 copy requests is very low, so no non-malicious user would ever get close to reaching the limit, but it's important to have the limit there in case.
User database table refactoring
I'm in the process of moving some columns in the users database table to be in their own tables, such as the new user_credentials table for passwords and activation codes. The users table is getting too big (currently ~45 columns), and a lot of the information held in it is either rarely accessed or makes more design sense to split into another table.
Misc / Bug fixes
Minor Improvements / Changes
- The LogManager class now prints a warning message to users at the top of the browser DevTools console, advising them not to paste or execute code in the DevTools window unless they know what they're doing.
- The deactivate account and request your data options in user Account Settings now require the user to confirm their password before proceeding.
- The request your data and change account types options in user Account Settings now show messages instead of options if the user is currently unable to perform these actions, due to having already performed them recently (as they can only be done once per month for each user).
- Revealing an NSFW placeholder in a gallery now causes it to be revealed in the details page as well, if the user clicks through to the artwork's details page.
- The error page quotes now have more intuitive back/forward buttons, that go back and forward between the last random quotes that were shown, rather than going back/forward through the quote array's numeric indexes. The back/forward buttons are also disabled when there are no further possible actions in those directions.
- Improved the account creation form to disallow some reserved usernames to prevent webserver conflicts with page/folder names, and properly implemented username validity checks server-side when checking username availability (it was already there for actual account creation).
Styling Improvements
- The search bar in the navigation bar now takes up any remaining horizontal space in the mobile layout, instead of leaving an empty space on the left.
- Hovering over the artwork buttons in the feed gallery display no longer brings up the video controls on the left of video artworks.
Bug Fixes
- Fixed video controls in the gallery feed display being incorrectly aligned with videos at larger screen widths.
- Tooltips on top of artworks in galleries showing the NSFW categories that caused them to be hidden from a user are no longer hoverable when the NSFW placeholder is removed.
- Fixed a bug where changing from a Feed gallery display to the other styles caused the feed buttons for artworks to linger briefly before the new style loaded.
- Fixed an error causing some artworks to appear after the Next/Previous page buttons when using the non-infinite-scroll gallery setting.
- Accounts with both the artist and commissioner roles now have those roles displayed correctly on their user profiles.
- Fixed a bug where artwork titles in the square style gallery display were showing up too small due to a max-height limitation that wasn't removed correctly.
- Fixed a bug in the feed style gallery that was causing multi-media artworks to resize incorrectly when clicking through to additional media in the artwork.
- Fixed a bug where loading additional images of a single artwork in a gallery caused further loads of that gallery when scrolling down to fail.