feat: update new learner display and logic for improved visibility#13
Merged
naincy128 merged 3 commits intorelease-ulmofrom Nov 5, 2025
Merged
feat: update new learner display and logic for improved visibility#13naincy128 merged 3 commits intorelease-ulmofrom
naincy128 merged 3 commits intorelease-ulmofrom
Conversation
b7d29b7 to
a8e9b4c
Compare
jcapphelix
reviewed
Oct 28, 2025
d14a758 to
a8e9b4c
Compare
jcapphelix
requested changes
Oct 31, 2025
jcapphelix
reviewed
Nov 4, 2025
2b553d1 to
da4ebd7
Compare
jcapphelix
approved these changes
Nov 5, 2025
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.
Description
This update introduces a new feature that displays a "New Learner" message beneath usernames in discussion posts and comments for users identified as new learners. The feature helps learners and staff quickly recognize new participants, improving clarity and community interaction.
The implementation integrates backend API fields for learner status, with fallback logic to support legacy and edge cases. Core discussion components were updated to pass learner status data through the component tree, along with new hooks and test coverage to ensure consistent and reliable functionality.
Features
Added a visible “👋 Hi, I am a new learner” message below usernames in discussion posts and comments for new learners, using backend API fields and fallback heuristics.
Added a regular learner message for users who no longer qualify as new learners.
Created new hooks:
useLearnerStatus– encapsulates learner status logic and consumes API data.useIsNewLearner– determines whether a user qualifies as a new learner.Updated core components including
AuthorLabel,CommentHeader,Reply, andPostto receive and propagate a newpostDataprop containing learner status.Updated prop types and default props across affected components to support the new prop.
Added internationalization (i18n) support for the new learner and learner messages in
messages.js.Added comprehensive test coverage to verify correct rendering behavior for different user roles (staff, moderators, anonymous, retired, regular, and new learners).
Linked PRs
Screenshot
Jira Ticket
COSMO2-735