Conversation
|
🚅 Deployed to the nodebb-spring-26-clean-cod-pr-36 environment in Clean Code Team (nodebb)
|
Pull Request Test Coverage Report for Build 21972086049Details
💛 - Coveralls |
…o check for name instead of slug
JoshuaNam
approved these changes
Feb 13, 2026
JoshuaNam
left a comment
There was a problem hiding this comment.
Looks good to me, nice job adding unit tests to check. I see green lights for the merge as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TA/Instructor badges
This feature forces all users in the instructor and TA groups to have a badge next to their replies and posts. NodeBB does offer badges already, but it's opt-in per user and is by-default disabled when a user joins a group. This change makes it by-default enabled and does not allow users to hide the badge once they've joined a group. (this restriction only applies to groups called "ta" or "instructor")
closes #24 (I ultimately decided not to display student tags as well since if a user is not a TA or instructor, they must be a student)
User Testing
taorinstructorgroupEditto edit group settingsShow Badge. Feel free to customize the title, icon, and color of the badge.TAbadge next to your usernameUnit Testing
In
test/user.js, I wrote the test 'should force instructor group onto groupTitleArray even if user deselects it' to test functionality. We set up the test by creating and joining the groupsta,instructor, andother-group. The subsequentUser.updateProfile(testUid, { groupTitle: '[]', uid: testUid })call is akin to the user going into their settings and setting the group badge display to be false for all groups. We then verify that when getting user data, thetaandinstructorgroups are still present in thegroupTitleArrayfield. This test covers all of the changed lines of code.I've also added unit testing for my earlier endorsement feature and put everything in a
UserGuide.mdfile