I don't think "target" is the right word to use, but when you click a
message and you're taken to the thread I think it's useful to actually
highlight which message you selected.
Previously when you liked a post it would redirect you back to the
previous page with the top of the post at the top of the screen. This
was jarring and weird and I didn't like it at all.
This change makes it so that the footer of the message you liked
appears in the center of the screen, which is (in my experience) much
closer to where it usually is when you click the like button.
Before: when you click the like button the scroll resets so the top of the
message is at the top of the screen.
After: when you click the like button the scroll resets so that the footer of
the message is in the center of the screen.
Wanted: a way to redirect back to the original page *without* resetting the
scroll position.
I was playing around with Madge and noticed that the previous dependency
graph looked almost *exactly* like a bowl of spaghetti I had last week.
After a few hours on Wikipedia I got interested in refactoring the code
so that each `require()` imported a module from one level deeper into
the tree.
I don't know if this is actually useful, but it's better than spaghetti.
In the future I think I should probably refactor the database
convenience functions out of the "models" since they really aren't
models but it's the best name I could come up with for what they are and
how they're used. This will probably go through some more evolution when
I rip out EJS and replace it with something much smaller.