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

Fixed some emoji features in src/views/partials/chats/message.tpl #40

Open
wants to merge 229 commits into
base: f24
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
229 commits
Select commit Hold shift + click to select a range
e47f182
Update README.md to have Group Names
aadityanairaaq Sep 11, 2024
24d4b74
fixed topics/tools.js
Sep 17, 2024
6633c02
fixed topics/tools.js
Sep 17, 2024
13cca87
Merge pull request #21 from CMU-17313Q/ashwaqissue
shgxshg Sep 17, 2024
01393b3
Fixing the nesting issues
hkkubais Sep 17, 2024
6cfd789
fixed src/middleware/admin.js
aadityanairaaq Sep 18, 2024
e6a31ec
Revert "Fixing the nesting issues"
aadityanairaaq Sep 18, 2024
0e7e875
fixRecursiveDepth
Sep 18, 2024
c659d92
Create bad_words.txt
Aya-Abdel-Hamid Sep 18, 2024
850eeac
fixRecursiveDepth
Sep 18, 2024
af47dda
fixRecursiveDepth
Sep 18, 2024
510e329
fixRecursiveDepth
Sep 18, 2024
488603f
fixRecursiveDepth
Sep 18, 2024
671b22c
fixRecursiveDepth
Sep 18, 2024
a78bdf8
fixRecursiveDepth
Sep 18, 2024
d793f98
fixed-src/middleware/admin
aadityanairaaq Sep 18, 2024
670dbb7
Merge branch 'f24' into fix-recursive-depth
Mohtelsayed Sep 18, 2024
3d9c3d2
Merge pull request #23 from CMU-17313Q/fix-recursive-depth
Mohtelsayed Sep 18, 2024
e231d53
fixed-lint-errors-final
aadityanairaaq Sep 18, 2024
b24729f
Merge branch 'f24' into fixing-src/middleware/admin
aadityanairaaq Sep 19, 2024
255b267
final-commit-for-lint
aadityanairaaq Sep 19, 2024
4433111
Merge remote-tracking branch 'origin/fixing-src/middleware/admin' int…
aadityanairaaq Sep 19, 2024
0e06e0d
Merge pull request #24 from CMU-17313Q/fixing-src/middleware/admin
aadityanairaaq Sep 19, 2024
831b76f
Creating template for email
hkkubais Sep 19, 2024
567e362
Delete src/posts/bad_words.txt
Aya-Abdel-Hamid Sep 20, 2024
0381563
Merge pull request #25 from CMU-17313Q/creating-template-for-email
shgxshg Sep 21, 2024
9517e72
Add bad-words.txt
hkkubais Sep 21, 2024
8ddc804
Merge pull request #26 from CMU-17313Q/creating-bad-words-file
hkkubais Sep 21, 2024
4bad25b
added print statements to know which file triggers the post button
Sep 22, 2024
409211e
tried calling the bad-words.txt file directly using const but if failed
Sep 22, 2024
1d1cb73
added the function that handles loading the txt file before checking
Sep 22, 2024
8ec71ae
Revert "Add bad-words.txt"
hkkubais Sep 22, 2024
4a46fd3
Merge pull request #28 from CMU-17313Q/revert-26-creating-bad-words-file
hkkubais Sep 22, 2024
18ac954
Revert "Revert "Add bad-words.txt""
hkkubais Sep 22, 2024
eac6051
Merge pull request #29 from CMU-17313Q/revert-28-revert-26-creating-b…
hkkubais Sep 22, 2024
6937d9f
added a function to load the bad-words.txt file
Sep 22, 2024
7e9ac6b
ran chmod 644 to change file restrictions and read the file because …
Sep 22, 2024
ce9cbff
changed the content from const to let so that it can be updated late…
Sep 22, 2024
f0f473c
added a function called checkifBadWord to check if the sentence cont…
Sep 22, 2024
d83196a
added print statments to check the word before and after censoring
Sep 22, 2024
0f02b3e
changed the logic of checkifBadWord function to have a tracker instea…
Sep 22, 2024
bd63dea
fixed indentation issues
Sep 22, 2024
2022bd6
Merge pull request #30 from CMU-17313Q/detection-sub-issue
shgxshg Sep 23, 2024
180640a
Added word-splitting logic to censorBadWords in src/posts/create.js t…
hkkubais Sep 23, 2024
af810ad
Added logic in src/posts/create.js to check each word against the bad…
hkkubais Sep 23, 2024
2b6ef16
Added for-loop structure to iterate over words in censorBadWords func…
hkkubais Sep 23, 2024
7086314
Added logic in censorBadWords function to replace bad words with aste…
hkkubais Sep 23, 2024
5df547a
Trimmed extra spaces in censored content using .trim() in src/posts/c…
hkkubais Sep 23, 2024
351be9f
Replaced checkifBadWord with censorBadWords in src/posts/create.js to…
hkkubais Sep 23, 2024
d4dba52
Added console logs in src/posts/create.js to track content before and…
hkkubais Sep 23, 2024
f8fcd76
Updated bad word detection logic in src/posts/create.js to be case-in…
hkkubais Sep 23, 2024
556fff9
Fixed bug in src/posts/create.js where entire content was replaced wi…
hkkubais Sep 23, 2024
9a27282
Enhanced bad word detection logic in src/posts/create.js to handle sp…
hkkubais Sep 23, 2024
688a470
Refactored censorBadWords function in src/posts/create.js to use cons…
hkkubais Sep 23, 2024
6adbf08
Fixed indentation and formatting issues in src/posts/create.js for be…
hkkubais Sep 23, 2024
925fc83
Updated the function in to dynamically replace bad words with aster…
hkkubais Sep 23, 2024
574ad7f
Created nodebb-plugin-censor-words directory under node_modules, adde…
hkkubais Sep 23, 2024
f55ddf8
Moved nodebb-plugin-censor-words out of node_modules directory to avo…
hkkubais Sep 23, 2024
700cd3d
Deleted nodebb-plugin-censor-words due to multiple errors affecting s…
hkkubais Sep 23, 2024
71a1e4e
Removed extra spaces before comments in src/posts/create.js on lines …
hkkubais Sep 23, 2024
deb62dd
Refactored string concatenation in censorBadWords function in src/pos…
hkkubais Sep 23, 2024
92d6115
Refactored string concatenation to template literals in src/posts/cre…
hkkubais Sep 23, 2024
4f705d4
Removed unnecessary blank line at the end of censorBadWords function …
hkkubais Sep 23, 2024
9ae0329
Commented out unused 'checkifBadWord' function in src/posts/create.js…
hkkubais Sep 23, 2024
439814e
Fixed logic in by updating to add the correct number of asterisks f…
hkkubais Sep 23, 2024
eca8c91
Changed to for in to ensure it can be modified and displayed corr…
hkkubais Sep 24, 2024
178f221
Disabled ESLint's rule for the variable in to maintain intended fu…
hkkubais Sep 24, 2024
50da12b
Merge pull request #31 from CMU-17313Q/replace-inappropriate-words-wi…
hkkubais Sep 24, 2024
0b84a8f
Added checking for anonymous in post content
Aya-Abdel-Hamid Sep 24, 2024
9868373
made edits to the composer file in order to display the anonymous but…
aadityanairaaq Sep 24, 2024
108b94a
Fixed the github failing lint errors in src/posts/create.js file
Aya-Abdel-Hamid Sep 24, 2024
c0c2473
Removed extra space and replaced double quotations with single quotat…
Aya-Abdel-Hamid Sep 24, 2024
fb08041
Worked on optimizing the anonymous text box
Aya-Abdel-Hamid Sep 25, 2024
9213778
Optimized anonymous text box by trying different fiont size and color
Aya-Abdel-Hamid Sep 25, 2024
f2232cb
Adjusted Anonymous text box style
Aya-Abdel-Hamid Sep 25, 2024
e2b5744
Optimized font size and color for anonymous text box final time
Aya-Abdel-Hamid Sep 25, 2024
8c32e62
Added code for event listener for the anonymous checkbox
Aya-Abdel-Hamid Sep 25, 2024
8e3da04
making sure that git does not ignore files on upload
Aya-Abdel-Hamid Sep 25, 2024
6ee8402
Merge pull request #32 from CMU-17313Q/Checking-for-anonymous-posts-Aya
Aya-Abdel-Hamid Sep 25, 2024
474995f
On composer.js added a flag to check for anonymous on the window whic…
aadityanairaaq Sep 25, 2024
d6f701a
In composer.js, added new field for composer data, which will be trig…
aadityanairaaq Sep 25, 2024
d51ad2d
in composer.js added another field for post edit composer data. This …
aadityanairaaq Sep 25, 2024
33125b5
in create.js changed uid to 0 in case that the anonymous flag is turn…
aadityanairaaq Sep 25, 2024
119bf5c
in create.js got rid of the condition for uid, and instead added a ex…
aadityanairaaq Sep 25, 2024
5c311f6
in create.js, had an initial change of changing the uid to another st…
aadityanairaaq Sep 25, 2024
ffab28b
Merge branch 'f24' into creating-anonymous-posts
aadityanairaaq Sep 25, 2024
0d0182a
Merge pull request #33 from CMU-17313Q/creating-anonymous-posts
aadityanairaaq Sep 25, 2024
ec522e9
Add loggin postObj to check for anonymous flag
Sep 25, 2024
c6e7d34
Add condition to check for anonymous flag
Sep 25, 2024
5c3245b
Remove unnecessary logging from create.js
Sep 25, 2024
75d38c7
Add changing of username to Anonymous
Sep 25, 2024
ddf0862
Add changing of displayname to Anonymous as well
Sep 25, 2024
5f33c01
Add creating deepcopy of user object to prevent changes being made to…
Sep 25, 2024
4847dfd
Add changing of userslug to Anonymous as well
Sep 25, 2024
a9c4bd2
Add changing status to yellow for Anonoymous posts
Sep 25, 2024
d351d53
Reset the postcount and topiccount fields for anonymous posts
Sep 25, 2024
63b4e16
Reset the postcount and topiccount fields for the postObj.user object…
Sep 25, 2024
d5e30c2
Change uid field to -1 in postObj.user object in anonymous posts
Sep 25, 2024
fe47e3c
Change profile pic character field to * in postObj.user object in ano…
Sep 25, 2024
89053ac
Change profile pic color field to grey in postObj.user object in anon…
Sep 25, 2024
8729ba0
Add logging post.user object in teaser.js
Sep 25, 2024
944ca7b
Create deepcopy of post.user object and changing the uername to anony…
Sep 25, 2024
b0b8431
Change userslug to Anonymous and uid to -1 of post.user object in tea…
Sep 25, 2024
b675425
Change displayname to Anonymous of post.user object in teaser.js
Sep 25, 2024
684cb37
Change profile pic to be grey and have an asterisk for anonymous post…
Sep 25, 2024
2db54f7
Ensures anon field is recieved from the database
Sep 25, 2024
b04215d
Remove console logs
Sep 25, 2024
c05c39d
Ensures anon field for post is recieved from the database
Sep 25, 2024
44e1fde
Add automatic reloading after submitting a post for changes to be vis…
Sep 25, 2024
2a2f7fc
Fix lint issues
Sep 25, 2024
084ed08
Removed unnecessary console logs
Sep 25, 2024
617cc95
Removed unnecessary console logs
Sep 25, 2024
8182114
Fixed some failing tests
Sep 25, 2024
1374889
Fixed some failing tests
Sep 25, 2024
aa3596e
Fixed some failing tests
Sep 25, 2024
83cc0bd
Change the schema to reflect the anonymous flag in the post object
Sep 26, 2024
23c0aae
Fix lint issues
Sep 26, 2024
5142e64
Fix lint issues
Sep 26, 2024
35865d9
Fix lint issues
Sep 26, 2024
51a2706
Merge pull request #34 from CMU-17313Q/add-visibility-for-anonymous-p…
aadityanairaaq Sep 26, 2024
89779e8
Added emoji reaction buttons (👍, ❤️, 😂) with placeholders for reactio…
hkkubais Oct 7, 2024
f8edddd
Update .gitignore to track custome topic.tpl file for emoji reactions
hkkubais Oct 7, 2024
a4fb14b
Reverting gitignore changed to check if it will work without it
hkkubais Oct 7, 2024
8da735e
Replacing with fontawesome icons because first attempt failed in node…
hkkubais Oct 7, 2024
d2a47cf
Added CSS for styling emoji reactions in topic.tpl
hkkubais Oct 7, 2024
36d05a9
Added CSS styling for emoji reaction buttons in topic.tpl
hkkubais Oct 7, 2024
8b427c6
Added filter so that file is not on gitignore file
hkkubais Oct 7, 2024
f5a386d
Added CSS for emoji reactions in chat messages in public/scss/chats.scss
hkkubais Oct 7, 2024
dbbd1d4
Troubleshooting to identify any errors or if works
hkkubais Oct 7, 2024
00392ba
Deleted added content in chats.scss as I will restart this sub issue …
hkkubais Oct 11, 2024
2014c6d
Restoring original files node_modules/nodebb-theme-persona/templates/…
hkkubais Oct 12, 2024
5b6103b
Added frontend emoji reactions UI to chat messages in src/views/parti…
hkkubais Oct 12, 2024
bf3a09e
added front-end emoji reactions in chat and updated styles in chats.scss
hkkubais Oct 12, 2024
486ad47
Customizing UI to specifics such as font, color, etc in chats.scss
hkkubais Oct 12, 2024
8a3533f
More changes on UI for engaging user interactivity
hkkubais Oct 12, 2024
0dbdaaf
Added animations to the reaction buttons when they are clicked
hkkubais Oct 12, 2024
dff374f
Highlighted popular reactions
hkkubais Oct 12, 2024
d5f8f11
changed font to sans serif
hkkubais Oct 12, 2024
0018eee
Merge pull request #42 from CMU-17313Q/add-emoji-reactions-to-UI
hkkubais Oct 12, 2024
43fcd25
added some lines to see where is the besr place to put the emojis in…
Oct 12, 2024
48c2d5d
removed the old function so that it accounts for all emojis and not …
Oct 12, 2024
96ca439
commented out line 155 in src/routes/index.js to fix the 404 error i…
Oct 12, 2024
00e7075
added emoji reactions in src/views/partials/chats/message.tpl
Aya-Abdel-Hamid Oct 12, 2024
4ba5fdf
added script in src/partials/chats/message.tpl to to handle the clic…
Oct 12, 2024
514f2a4
updated the socket.io/plugins.js to have a logic for all emojis and …
Oct 12, 2024
1674140
updated the socket.io/plugins.js to have a logic for all emojis and …
Oct 12, 2024
2cffb3b
updated serc/routes/reactions.js to have routes for posting and dele…
Oct 12, 2024
3c9755f
updated the logic in posts/reactions.js to have methods regarding ad…
Oct 12, 2024
9951872
added lines in index.js to ensure the reactions routes are used by t…
Oct 12, 2024
fa9b270
added console logs in message.tpl to see how the emoji counter is be…
Oct 12, 2024
dbf93e5
added a new controller file for reactions
Oct 12, 2024
41cbe12
created a new file called reactions.js under controllers so that i ca…
Oct 12, 2024
9f8c736
added three controllers in controllers/reactions.js to handle reacti…
Oct 12, 2024
86dadf1
updated posts/reactions to have real-time synchronization
Oct 12, 2024
75088c2
facing issues with handling the routes for emojis
Oct 12, 2024
2994bb9
added a method in client/chats.js to handle emoji reactions, send re…
Oct 12, 2024
d6e0b06
tried to add some line in chat.js but it failed
Oct 12, 2024
910e293
removed the method in chats.js because it didn't work
Oct 12, 2024
533cfec
Added more emoji reactions in src/views/partials/chats/message.tpl
Aya-Abdel-Hamid Oct 13, 2024
1c1c6d2
removed extra lines in chats.js
Oct 13, 2024
30bdb1e
adding event listeners in Chats.js to check if the emoji button is b…
Oct 14, 2024
a11c475
changed pid to roomId because im working with chat rooms
Oct 14, 2024
5535114
fixed some lines in message.tpl file
Oct 14, 2024
1a5b313
Tried fixing the reaction box to make it expand horizontally
Aya-Abdel-Hamid Oct 14, 2024
537c2f2
deleted src/posts/reactions.js because it's not related
Oct 14, 2024
f2298d8
deleted src/posts/reactions.js because it's not related
Oct 14, 2024
c5a5fa7
Made some style changes in public/scss/chats.scss file
Aya-Abdel-Hamid Oct 15, 2024
f90839e
changed plugins.js and index.js by adding a console error when press…
Oct 15, 2024
3c73cde
deleted src/controllers/reactions.js because it wasn't helping with a…
Oct 15, 2024
006dd04
did testing through inspecting the browser and the issue is that the…
Oct 16, 2024
8bb0f01
Add a visual div after the quick reply text box
Oct 16, 2024
4fa5a12
Add a style element to resize and split the div
Oct 16, 2024
7da3d92
Add style to the span elements
Oct 16, 2024
2f06afa
added front end buttons for suggested responses within reply option i…
aadityanairaaq Oct 17, 2024
b63674e
added more options for the suggested responses for a reply within com…
aadityanairaaq Oct 17, 2024
15f18a7
adjusted the style for the suggested response buttons within composer…
aadityanairaaq Oct 17, 2024
1a5d44d
adjusted the style for suggested response buttons with regards to pad…
aadityanairaaq Oct 17, 2024
e4d1ff9
created event listener for the suggested response buttons, which is t…
aadityanairaaq Oct 17, 2024
ac555ff
created condition to append suggested response if text already exists…
aadityanairaaq Oct 17, 2024
48151e7
Add style for when hovering on buttons
Oct 17, 2024
a59bed5
Add more buttons for more responses
Oct 17, 2024
5c1f3cc
Change the text on the buttons to be actual replies
Oct 17, 2024
bcf14a3
Logs the inner text value of the buttons when clicked
Oct 17, 2024
f0e0b13
Saves the inner text value of the buttons when clicked
Oct 17, 2024
a4f3770
Logs the current text in the text box
Oct 17, 2024
950b20e
Saves the current text in the text box
Oct 17, 2024
1992207
Add the response to the text box if its empty and logs it otherwise
Oct 17, 2024
3f347cb
Add the response to the text box if its empty and logs it otherwise
Oct 17, 2024
d1f311a
Move the cursor to the ent of the text box after clicking a response
Oct 17, 2024
ed6d18e
Trigger input event when a response is clicked
Oct 17, 2024
48beec4
removed src/routes/reactions.js because it didn't help with the 404…
Oct 17, 2024
fcf4e0b
added some lines to fetch user's information in plugins.js
Oct 17, 2024
8172e65
removed extra lines to fix linting errors in plugins.js
Oct 17, 2024
bc7250a
Fix lint errors
Oct 17, 2024
2d38d81
Merge pull request #52 from CMU-17313Q/add-predefined-quick-replies
hkkubais Oct 18, 2024
72cd8e0
Creating the UserGuide.md file in the root directory for user documen…
hkkubais Oct 18, 2024
8a9036a
Creating the UserGuide.md file in the root directory for user documen…
hkkubais Oct 18, 2024
7b08f66
Merge pull request #53 from CMU-17313Q/creating-userguide-md
hkkubais Oct 18, 2024
bdb7cdc
Update UserGuide.md to add spacing between acceptance criteria
hkkubais Oct 18, 2024
8c3d2f5
Merge pull request #55 from CMU-17313Q/suggested-responses-main-reply
Mohtelsayed Oct 18, 2024
a4b1e76
UserGuide.md
shgxshg Oct 18, 2024
0525648
UserGuide.md
shgxshg Oct 18, 2024
563998d
UserGuide.md
shgxshg Oct 18, 2024
7cad531
UserGuide.md
shgxshg Oct 18, 2024
2ec2edc
UserGuide.md
shgxshg Oct 18, 2024
9725cb2
Update UserGuide.md added image for emoji frontend
hkkubais Oct 18, 2024
dcecb03
Update UserGuide.md added testing instructions for anonymous
hkkubais Oct 18, 2024
6edd745
added automated tests for inappropriate words user story (with speci…
Oct 18, 2024
b815f1e
added automated tests for inappropriate words user story (with mixed…
Oct 18, 2024
2641648
added automated tests for inappropriate words user story (clean post…
Oct 18, 2024
52ede13
fixed lint issue by changing argumets to rest parameters
Oct 18, 2024
1354c68
UserGuide.md
shgxshg Oct 18, 2024
515db33
UserGuide.md
shgxshg Oct 18, 2024
3ec5f9a
UserGuide.md
shgxshg Oct 18, 2024
9201e39
Update UserGuide.md
shgxshg Oct 19, 2024
999473b
Merge pull request #58 from CMU-17313Q/bad-words-testing
hkkubais Oct 19, 2024
cff603a
Update UserGuide.md
hkkubais Oct 19, 2024
eba0f2e
Update UserGuide.md
hkkubais Oct 19, 2024
2ebc920
Removed some emoji reactions from src/views/partials/chats/message.tpl
Aya-Abdel-Hamid Oct 19, 2024
b9ed4eb
Attempted fixing issues with my src/views/partials/chats/message.tpl
Aya-Abdel-Hamid Oct 19, 2024
f8c69ea
Update UserGuide.md
Aya-Abdel-Hamid Oct 19, 2024
bc2eaa6
Merge branch 'f24' into emoji-reaction
Aya-Abdel-Hamid Oct 20, 2024
cde7427
Update UserGuide.md
Aya-Abdel-Hamid Oct 20, 2024
df2920b
Update UserGuide.md
Aya-Abdel-Hamid Oct 20, 2024
a1a3547
Update UserGuide.md
Aya-Abdel-Hamid Oct 20, 2024
926f4df
Update UserGuide.md
Aya-Abdel-Hamid Oct 20, 2024
ddc9dde
Merge pull request #44 from CMU-17313Q/emoji-reaction
Aya-Abdel-Hamid Oct 20, 2024
897ba79
Added some emojis
Aya-Abdel-Hamid Oct 20, 2024
b9cd553
Merge branch 'f24' into fixing-emoji-reaction
Aya-Abdel-Hamid Oct 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
dist/
yarn.lock
npm-debug.log
node_modules/
sftp-config.json
node_modules/*
!node_modules/nodebb-plugin-composer-default/
sftp-config.json
config.json
jsconfig.json
public/src/nodebb.min.js
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ NodeBB by itself contains a "common core" of basic functionality, while addition

### [Try it now](//try.nodebb.org) | [Documentation](//docs.nodebb.org)

## Group Names

Aadi, Mohamed, Ashwaq, Aya, and Haya.

## Screenshots

NodeBB's theming engine is highly flexible and does not restrict your design choices. Check out some themed installs in these screenshots below:
Expand Down
140 changes: 140 additions & 0 deletions UserGuide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# ELEV8's User Guide

## User Story 1: Detection of inappropriate words

***As an instructor, I want the system to automatically detect and flag inappropriate words, so that the community stays respectful and focused.***

**Status:** Complete

**Acceptance Criteria:**
1- The system checks each word in a user's post or reply against a predefined dictionary of inappropriate words.

2- If an inappropriate word is detected, the word is replaceed with asterisks.

**How to test this feature:**

1- Log into NodeBB

2- Choose one of the categories by clicking on one of them
<img width="1088" alt="Screenshot 2024-10-18 at 5 47 34 PM" src="https://github.com/user-attachments/assets/05223a98-0111-4757-b3a1-daea3fddc8ac">

3- Create a new topic

4- Write anything that has an innapropriate word in the post content box and then press submit:
<img width="1270" alt="Screenshot 2024-10-18 at 5 40 17 PM" src="https://github.com/user-attachments/assets/82ce5d49-f027-4d18-afa8-68bc85cdb628">

5- If the word is in our dictionary of bad words, it will get censored and look like this:
<img width="1359" alt="Screenshot 2024-10-18 at 5 41 39 PM" src="https://github.com/user-attachments/assets/cd1885e2-63bf-4549-a47c-d836848bb6d4">

**Automated testing:**

**Location:** The tests for the inappropriate words feature are located in test/posts.js. The actual tests can be found between lines 56 and 92.

**What is Being Tested:** the tests added focus on ensuring that the inappropriate words feature works correctly by censoring offensive language in the user posts.

The first test sets up a mock bad words list and verifies that the censorBadWords function replaces these words with asterisks in the content.

The second test handles content with no bad words. It confirms that when the censorBadWords function is called on clean content, the text remains unchanged, e.g., "This is a clean test"

The third test deals with special characters and mixed-case bad words (e.g., "This is a BadWord1! and badword2"). It checks that bad words are censored regardless of their case or punctuation, returning the correct censored version of the content.

**Why the Tests are Sufficient:** The tests thoroughly cover all key aspects of the inappropriate words filtering feature. The first test ensures that the censoring mechanism functions as intended by replacing offensive words with asterisks, validating the core functionality. The second test confirms that clean content remains unchanged, which is crucial for maintaining the integrity of user posts that do not contain offensive language. The third test addresses edge cases, such as handling special characters and mixed-case bad words, ensuring that inappropriate content is caught regardless of variations in punctuation or capitalization. These tests cover the full spectrum of expected use cases, providing confidence that the feature will perform reliably in different scenarios.

## User Story 2: Anonymous posts

***As a user, I want the option to post anonymously to my instructors so that I can express my concerns openly without fear of repercussions.***

**Status:** Complete

**Acceptance Criteria:**
1- The frontend should display an anonymous posting checkbox option, allowing users to submit posts without revealing their identity.

2- Ensure both backend and frontend integration to mask the user's identity while maintaining proper functionality of the post submission and display process.

**How to test this feature:**

1- On the NodeBB homepage, click on the "General Discussion" category (or any other relevant category where you want to post).

<img width="1243" alt="Screenshot 2024-10-18 at 10 18 20 PM" src="https://github.com/user-attachments/assets/ea764fb0-583e-48dd-863e-5506b0d5f689">


2- Once inside the chosen category, locate and click the "New Topic" button, usually found at the top or bottom of the page.

<img width="1238" alt="Screenshot 2024-10-18 at 10 21 31 PM" src="https://github.com/user-attachments/assets/19860cf2-ea51-45a5-b966-036023bf1554">


3- In the new topic form, look for the Anonymous checkbox located next to the Title input box. Click on the checkbox to enable anonymous posting.

Fill in the Title and Content of your post as usual. You can also attach files or add formatting if needed.

<img width="1231" alt="Screenshot 2024-10-18 at 10 22 31 PM" src="https://github.com/user-attachments/assets/beced73d-85c3-45d6-8a20-555b98f7d472">


4- After writing your post, click the Submit button to post it anonymously. Your post will now appear in the thread, and your identity will be hidden.

<img width="1231" alt="Screenshot 2024-10-18 at 10 23 45 PM" src="https://github.com/user-attachments/assets/6407c269-eb96-48c0-a5a5-75ec9539ae7d">
<img width="1230" alt="Screenshot 2024-10-18 at 10 24 19 PM" src="https://github.com/user-attachments/assets/1c6c39b5-4ece-4624-9d99-1a7d7faffe14">

**Note:** You can also use the anonymous posting feature to reply to existing topics or posts. Simply click the Reply button within any topic, check the Anonymous checkbox, and submit your reply anonymously. However, in this scenario, we are demonstrating the process for creating a new topic.

**Automated testing:**

**Location:** The tests for the anonymous feature are located in test/topics.js. The relevant tests can be found between lines 2504 and 2560.

**What is Being Tested:** The tests added focus on ensuring that the anonymous posting feature works correctly in the forum.

The first test checks that when a new post is created with the anonymous flag set to false, the post is linked to the correct user and is not anonymous. It verifies the post’s metadata to ensure the correct user information is displayed.

The second test verifies that when a post is created with the anonymous flag set to true, the post correctly hides the user's identity. It checks that the post is marked as anonymous in the database and that the anonymous flag remains true when the post is fetched.

**Why the Tests are Sufficient:** These tests cover the core functionality of the anonymous feature, ensuring that the system correctly handles both anonymous and non-anonymous posts. By validating the behavior of the anonymous flag in different scenarios, these tests ensure that the user’s identity is appropriately masked or revealed depending on their choice. The tests also account for proper storage of this data in the database, making them comprehensive for the feature.


## User Story 3: Emoji Reactions in Chat Section

***As a user, I want to react to messages in the chat with a range of emojis to quickly express emotions and reactions without typing a response.***

**Status:** Incomplete

**Acceptance Criteria:**
1- The task will be considered complete when the backend successfully tracks and stores emoji reactions for chat messages.

2- The feature must be seamlessly integrated with the existing chat structure and support multiple reactions per message.

3- The task will be considered complete when all emojis are available in the chat reaction system.

**Progress:** We were only able to complete the frontend implementation of the emoji chat feature for this user story.

<img width="289" alt="Screenshot 2024-10-18 at 10 13 18 PM" src="https://github.com/user-attachments/assets/c3454b07-4a31-4bf8-96e3-152ffdf798c4">

**Justification:** While working on the backend logic for emoji reactions, we faced challenges with socket programming, which required real-time synchronization of reactions across multiple users in a chat room. This task involved advanced socket handling techniques beyond my current expertise. Additionally, integrating the emoji reactions into the existing chat system was more complex than expected due to dependencies on real-time updates and performance optimization across different browsers. Although we were able to implement the foundational parts of the feature, including the API endpoint and core logic for handling reactions, the complexity and scope of the task were too large to complete within a single sprint.

## User Story 4: Pre-defined Replies

***As a user, I want to be able to quickly respond to messages by clicking buttons with predefined replies so that I don't waste time typing out responses that are common.***

**Status:** Complete

**Acceptance Criteria:**
1- The task will be complete when a clickable button is added to the user interface beside the regular reply button.

2- Clicking any of the predefined quick reply buttons results in the corresponding message being inserted into the quick reply text box.

3- The existing file containing the buttons for replying and quick replying must be identified and integrated with the new feature.

**How to test this feature:**

1- Login to Nodebb.

2- Choose any message you would like to respond to. You should see a quick reply button at the bottom of the page, along with the other suggested responses.
<img width="956" alt="image" src="https://github.com/user-attachments/assets/b6298659-6394-4f11-bfb0-b2cc90e841bf">

3- Select a suggested response to reply to the message,it should automatically be inserted into the quick reply text box. Then click on the quick reply button to post your message.
<img width="959" alt="image" src="https://github.com/user-attachments/assets/4804b847-457f-4996-b3e4-d3c4fc8352ee">

<img width="959" alt="image" src="https://github.com/user-attachments/assets/45b1a75e-5a22-4c4f-80cb-0c339526d79a">





Binary file added dump.rdb
Binary file not shown.
3 changes: 3 additions & 0 deletions node_modules/nodebb-plugin-composer-default/.eslintrc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions node_modules/nodebb-plugin-composer-default/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 86 additions & 0 deletions node_modules/nodebb-plugin-composer-default/.jshintrc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions node_modules/nodebb-plugin-composer-default/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions node_modules/nodebb-plugin-composer-default/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions node_modules/nodebb-plugin-composer-default/controllers.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading