cyberbit / modation

Soundation, amplified.
https://cyberbit.github.io/modation
2 stars 2 forks source link

Add user/group images to notifications #88

Closed cyberbit closed 8 years ago

cyberbit commented 8 years ago

This would make the experience more immersive.

cyberbit commented 8 years ago

It works, but is super inefficient. Blob URLs need to be cached to prevent unnecessary network requests.

cyberbit commented 8 years ago

Blobs are now cached, but they are invalid once the event page becomes inactive. Plus, because the notifications are loaded asynchronously, the problem of multiple network requests to the same page still exists. GAH.

cyberbit commented 8 years ago

Don't know what I was thinking using blob: URLs. Will convert to data URIs for persistent image storage. More network friendly.

With the problem of multiple network requests, a solution could be to queue all the notifications, set up a callback stack, and execute them one at a time. This would allow time for the author/group images to be cached and loaded efficiently. Because of the work involved, I will separate that part of this mod as an enhancement in a future fixbag release.

cyberbit commented 8 years ago

It works! I felt that the style of making the entire image the author image might be misleading, as it doesn't really appear to be a Modation notification at all, so I changed it into a 25% overlay on the Modation logo. Ended up pretty nice: image

cyberbit commented 8 years ago

After some discussion in the Team group, I got some feedback indicating a desire for even more varied overlay content for group notifications, such as overlaying with the group image instead of author image. That could be interesting, and I had considered it before, but now I feel like it detracts from the motivation of a notification, which always comes from a specific user. I'll give it a go, though.

cyberbit commented 8 years ago

Got the group image to work, but one thing I didn't anticipate was how to treat private groups. Even when you're invited to join a private group, you can't see details about it until you are a member. Similarly, Modation can't grab the image unless the group is public or open or you are admin. A minor problem, but it should be acknowledged.

cyberbit commented 8 years ago

Group and profile overlay images now cache correctly. There's a lot to be desired in terms of network performance, especially with the group pages, but it's good enough for now. Will release in 2.4.