Skip to content

feat(Discussion): Teacher can show/hide responses#2296

Merged
hirokiterashima merged 5 commits intodevelopfrom
discussion-teacher-show-hide-responses
Apr 3, 2026
Merged

feat(Discussion): Teacher can show/hide responses#2296
hirokiterashima merged 5 commits intodevelopfrom
discussion-teacher-show-hide-responses

Conversation

@hirokiterashima
Copy link
Copy Markdown
Member

@hirokiterashima hirokiterashima commented Mar 31, 2026

Teacher can now show/hide students' responses in the discussion summary view in the Teacher Tools.

Notes

Please style and edit the phrasing as you see fit.

Changes

  • For both top-level posts and replies, show a "Hide Post" button.
    • If top-level post is hidden, it and its replies will be hidden.
    • if a reply is hidden, it will be hidden.
    • both changes take immediate effect on the students' view (the posts and replies become hidden/visible right away)
  • You can show (unhide) a post or reply. Hidden posts will have a "Show Post" button.

Test

  • Hiding and showing posts and replies work as expected.
  • Student discussion works as before. I cleaned up some code that was no longer needed due to this change.

@hirokiterashima hirokiterashima self-assigned this Mar 31, 2026
@hirokiterashima hirokiterashima added the enhancement New feature of any size or improvement (UI, performance, security) label Mar 31, 2026
@qltysh
Copy link
Copy Markdown

qltysh bot commented Mar 31, 2026

❌ 3 blocking issues (3 total)

Tool Category Rule Count
qlty Duplication Found 23 lines of similar code in 4 locations (mass = 66) 2
qlty Structure Function with many parameters (count = 10): constructor 1

);
const annotations = this.getInappropriateFlagAnnotationsByComponentStates(componentStates);
this.setClassResponses(componentStates, annotations);
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 33 lines of similar code in 2 locations (mass = 164) [qlty:similar-code]

@qltysh
Copy link
Copy Markdown

qltysh bot commented Mar 31, 2026

Qlty

Coverage Impact

Unable to calculate total coverage change because base branch coverage was not found.

Modified Files with Diff Coverage (3)

RatingFile% DiffUncovered Line #s
New file Coverage rating: F
.../discussion/discussion-teacher/discussion-teacher.component.ts9.4%33-110
New file Coverage rating: D
.../discussion/discussion-student/discussion-student.component.ts50.0%62
New file Coverage rating: F
...ion/class-response-teacher/class-response-teacher.component.ts44.4%23-37
Total23.1%
🤖 Increase coverage with AI coding...

In the `discussion-teacher-show-hide-responses` branch, add test coverage for this new code:

- `src/assets/wise5/components/discussion/class-response-teacher/class-response-teacher.component.ts` -- Line 23-37
- `src/assets/wise5/components/discussion/discussion-student/discussion-student.component.ts` -- Line 62
- `src/assets/wise5/components/discussion/discussion-teacher/discussion-teacher.component.ts` -- Line 33-110

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@hirokiterashima hirokiterashima marked this pull request as ready for review March 31, 2026 16:22
@hirokiterashima hirokiterashima requested a review from breity March 31, 2026 16:22
- Move show/hide buttons to top of post/comment
- Simplify tooltip text
Copy link
Copy Markdown
Member

@breity breity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍

I updated to use icon buttons to show/hide responses and moved the show/hide buttons to the top of the post/comment. I also simplified the tooltip text.

@hirokiterashima
Copy link
Copy Markdown
Member Author

Changes look great.

@hirokiterashima hirokiterashima merged commit 7741e6a into develop Apr 3, 2026
1 check passed
@hirokiterashima hirokiterashima deleted the discussion-teacher-show-hide-responses branch April 3, 2026 00:04
@hirokiterashima
Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 5.223.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature of any size or improvement (UI, performance, security) released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants