3 ms·
Looks pretty good and a non-profit seems perfect for something like this. I do have to say, I really dislike the card design that seems pretty much ubiquitous
by doix 3y ago
Looks pretty good and a non-profit seems perfect for something like this.
I do have to say, I really dislike the card design that seems pretty much ubiquitous at this point. By introducing a border, you need to add a bunch of padding and then margins. Between two titles, you have padding (from the upper card), border, margin, border(lower card), padding. It's so much whitespace!
How do comments work? Can you have infinitely nested comment threads? If so, I'm not sure your API will scale? Do you need to fetch replies for each comment recursively? That'll be a pretty bad experience, since you need to wait for one comment level to load before you can fetch the next one. But maybe I'm misunderstanding the API docs.
- dt3ft 3y agoThe comments can be infinitely nested. You can see the comment model if you scroll down to schemas: https://api.flingup.com/swagger/index.html https://api.flingup.com/swagger/index.html
- doix 3y agoYeah I did look at the docs, hence my question. If you have a deeply nested comment tree, wouldn't you have to load each level sequentially? So let's say you have A (root) -> B -> C -> D Wouldn't you make one request to fetch A (root comments). Then a second request to fetch B (replies of A), another request to fetch C (replies of B) and then finally another request to fetch D (replies of C)? And you can't fetch B,C,D in parallel, because you don't know the id's ahead of time to request the child comments. Just something to think about, obviously doesn't matter until you have deeply nested discussions. But if you look at Reddit (or even HN) that is probably the most common case.
- dt3ft 3y agoYou’re right, and this was a tough design choice I made when I built the first prototype. Loading only first level of child comments should (correct me if I miscalculated this) be the most cost-efficient way as not every user is (hopefully) ever going to read all child comments in all levels in the hierarchy.
- doix 3y agoI wanted to make sure I understood the design decisions. I actually have no idea what the right choice is. I only know how I use these types of sites and I usually go depth first. So I'd start with one thread, read it until I get bored, then continue. Not great for your current architecture, but I could be a weird user. I had to design comment systems quite a few times, so I'm always curious how other people do it. I don't think there's a perfect solution, always trade offs to be made.
- kaba0 3y agoA comment could store a “head”/grandparent comment and a direct parent as well. For a top comment, every other comment could be fetched that has it as head, and the actual relationships can be reconstructed on server/client side as needed. Though most dbs can do efficient recursive queries like this nowadays.
- doix 3y agoYeah, I was thinking about the HTTP level. At the database level you can do recursive queries like you say. But on the client, with the current API, you're stuck fetching each level of comments sequentially. If you have 100-200ms per request (which is a pretty realistic scenario), loading discussions isn't going to be great.
- zmmmmm 3y ago> I do have to say, I really dislike the card design that seems pretty much ubiquitous at this point Maybe I'm showing my age, but honestly I think UI design for this type of site peaked at a list of blue links 20 years ago. It's actually one of the reasons I liked Reddit (and still love old reddit).
- doix 3y agoYeah, I'm with you, still love old Reddit and think it's peak design. I can never tell if I'm out of touch or if kids these days are wrong.