Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gsoc'24): adding language filter to avoid inappropriate language #24

Merged
merged 11 commits into from
Jul 25, 2024

Conversation

Waishnav
Copy link

@Waishnav Waishnav commented Jun 17, 2024

Fixes #17

This PR covers the functionality for letting user know they can use inappropriate language in Forum threads and forum posts. For reference see screenshot below.

image

UI changes includes following
- instead of too many boxes i.e borders on the all thread page, with the
  help of just right side border to side panel. it is much more readable
- previously link of the thread was title now, I improved it to have
  thread card as link since there was no other clickable items in the
  card
- in the forum_post template, now meta data of forum post like post
  author and edit, delete action buttons are now visually separated from
  the post using just background color
@Waishnav Waishnav force-pushed the adding-language-filter branch from 3c64f97 to ba26daa Compare July 7, 2024 15:31
…r` gem

- these filters are applied on forum_thread's title, forum_posts's body
- error messages are now improves with proper altert message styling
  using bootstrap's alter class
@Waishnav Waishnav force-pushed the adding-language-filter branch from ba26daa to 7e28ad3 Compare July 7, 2024 15:37
@tachyons
Copy link
Member

Good job,

  • Could you add tests for this feature ?
  • Could you make this feature configurable ?
SimpleDiscussion.setup do |config|
  config.send_email_notifications = false # Default: true
  config.send_slack_notifications = false # Default: true
  config.profanity_filter = false # Default: true
end

@tachyons tachyons requested a review from tanmoysrt July 21, 2024 00:36
@Waishnav
Copy link
Author

  • Could you add tests for this feature ?

image

I added similar test like this in /test/integration/forum_test.rb, but tbh I don't see the usefulness of it, cause no matter what, they are always gonna pass cause these inappriate words are coming from LanguageFilter library itself.
Correct me I might be wrong here?

@Waishnav Waishnav force-pushed the adding-language-filter branch 2 times, most recently from 1e5e626 to cd90ad6 Compare July 21, 2024 10:15
@Waishnav Waishnav force-pushed the adding-language-filter branch from cd90ad6 to ebabb57 Compare July 21, 2024 10:17
Gemfile Outdated Show resolved Hide resolved
@tachyons tachyons merged commit 3abb960 into CircuitVerse:master Jul 25, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moderation Tools and Spam detection and Language Filters
2 participants