honestbleeps/Reddit-Enhancement-Suite

User Tagger x filteReddit: custom conditions to display user tags

Open

#4,881 建立於 2018年10月14日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)JavaScript (3,922 star) (899 fork)batch import
Difficulty-3_­­­HardDifficulty-­2_MediumPriority-2_A litte more Interesthelp wanted

描述

A potential overblown design for @aslakhol's https://github.com/honestbleeps/Reddit-Enhancement-Suite/issues/4722#issuecomment-429592085

Summary

Use the "post/comment filters" engine to determine if a user tag should be displayed. Add/alter UI entry points to set filters for user tags.

Use cases

  • "highlight user" persisting on the same post across sessions
  • highlight users only on certain subreddits / multireddits (e.g. frequent posters to r/talesfromtechsupport, track certain users in moderated subreddits)
  • "expire" user tags (only show for a week, e.g. for an AMA, or only start showing in a few months)

Implementation details

  1. Apply filtering to usertags (medium-hard)
    1. Add "filter" data to "user tag" data model
    2. When rendering user tag UI, run filter logic to determine whether to show user tag or button
  2. Add "post ID" to filter cases (medium-easy)
    1. may as well add "comment id" while you're there
  3. Alter "highlight" button (from user info hover card) to create a "Highlighted" user tag
    1. Set user tag text to a flag emoji or something
    2. Set filter to "post id: this comments page" when browsing comments or "subreddit: this subreddit" when browsing subreddit
    3. Set filter to "before this date": today + 1 week
  4. Add option to User Tagger to apply user tag's color to author using User Highlighter

貢獻者指南