Add the ability to search for specific comments within posts.
Known issues:
- Just like on reddit, this does not work with comment sorting. The
sorting order is ignored during the search and changing the sorting
order after the search does not change anything. I do not think we
can fix this before reddit does, since in my understanding we rely
on them for the sorting. However we could implement a default
sorting method ourselves by taking the vector of comments returned
from the search and sorting it manually.
- The UI could be improved on mobile. On screens with a max width
inferior to 480 pixels, the comment search bar is displayed below
the comment sorting form. It would be great if we could make the
search bar have the same width as the whole comment sorting form
but I do not have the willpower to write any more css.
* Fix regression with comments from deleted mods
Starting with https://github.com/spikecodes/libreddit/pull/367/files
comments from deleted moderators and admins(?) aren't highlighted.
* Highlight mod and admin usernames in posts
Works like on reddit + shows highlight for mods on the search page.
* Initial work on filtering subreddits and users
* Fix doubly-prefixed subreddit name in search alt text (e.g. r/r/pics)
* Don't set post title to "Comment" if empty - this could throw off actual posts with the title "Comment"
* Filter search results
* Fix filtering to differentiate between "this subject itself is filtered" vs "all posts on this current page have been filtered"
* Remove unnecessary check
* Clean up
* Cargo format
* Collapse comments from filtered users
Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
* Initial implementation of award parsing
* Posts: Implement awards as part of post
* Posts: remove parse_awards dead code
* Posts: initial implementation of displaying Awards at the post title
* Posts: Proxy static award images
* Client: i.redd.it should take path as argument not ID
* Posts: Just like Reddit make award size 16px
* Templates: limit the awards to 4 awards to increase performance
* Comments: Make awards a property of comments and display them
* Format and correct /img/:id
* Update comment.html
* [Optimization] Awards is not longer async
* [Revert] Posts can now display more than 4 awards again
* [Implementation] Awards not display on the frontpage
* [Implementation] Display count on awards
* Post: Start working on awards css
* Awards: Move the image size to css
* Awards: Start implementing tooltips
* Refactor awards code and tweak CSS indentation
* Unify Awards::new and Awards::parse
* Use native tooltips and brighten awards background
Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
* Collapse bot comments by default.
Comments are considered bot comments if they are posted by a moderator and are stickied. Some false positives are expected.
* Remove unneeded String conversion
Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>