Comment searching on posts, forgot to announce this feature!
Comment searching on posts, forgot to announce this feature!
I just realized I never mentioned in yesterday's announcement that I improved the way searching in comments works earlier this week and thought I should mention it.
tl;dr: There's a search bar next to the comment sort options, typing in there will highlight all the comments that contain your search text, and a second floating nav bar shows up which lets you click next/previous buttons to scroll between search matches.
If you're curious: some technical background. Comments (and basically any other list in Alexandrite) are rendered using a "virtual list" or "virtualized rendering", this is pretty complicated but really common optimization used on sites/apps that let you scroll infinitely as it lets you show a huge list of stuff without the site getting really laggy. It does this by only actually rendering as many comments (or posts etc) as can fit on screen, and skipping the rest, adjusting what's shown to wherever you scroll. So if you're on a post with 1000 comments and you've scrolled down quite a ways, instead of all 1000 comments being on the page maybe only comments 220-230 are there. To an end user you should usually never notice this, but if you scroll really fast, or hit the "scroll to top" button you might sometimes notice the page is blank before a post or comment pops in to fill the empty space a moment later.
The only issue with that, is if not all of the comments are actually on the page you can't really Ctrl+f
to search for something in comments, as only a few of the comments are on the page at once. So I needed an in-site way to search through comments, which is where this came in!