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

[#12649] When adding a comment while submitting responses, show visibility of the comment as well #12659

Merged
merged 12 commits into from
Dec 31, 2023

Conversation

gordlin
Copy link
Contributor

@gordlin gordlin commented Dec 13, 2023

Fixes #12649

Outline of Solution

The problem was that some users could get confused by the visibility of the comments sections, believing they were visible to the instructors only. In fact, they could actually be viewed by the same people as the main question.

To solve this, the visibility information from the main question is added to the comments section as well. It will show/hide with the comments box, and highlights the people who can see your comments.

When comments are showing:

image

When comments are hidden:

image

@weiquu
Copy link
Contributor

weiquu commented Dec 14, 2023

Hi @hallovera, do fix the lint issues as well as the failing snapshot tests. You can update the snapshots by running npm run test and pressing a to run all test cases. After that, check through the snapshots to make sure the changes are as expected, then press u to update them. You can find more details on snapshot testing here.

@jasonqiu212
Copy link
Contributor

jasonqiu212 commented Dec 16, 2023

Hi @hallovera, The snapshot tests are still failing. Are you able to fix them following the steps mentioned by @weiquu? Do let us know if you face any troubles! Fyi, we will review your PR only after the snapshot tests are fixed.

@gordlin
Copy link
Contributor Author

gordlin commented Dec 22, 2023

Sorry for the delay, I believe all tests pass successfully now. The problem was pretty silly: I misunderstood how snapshot testing worked, and assumed I had to manually fix the issues arising on the tests (which didn't go well). Once I figured out I simply needed to "update" the snapshots, it all fell into place.

Please let me know if there are any other issues! Thanks @weiquu and @jasonqiu212 for your helpful comments.

Copy link
Contributor

@weiquu weiquu left a comment

Choose a reason for hiding this comment

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

LGTM

@weiquu weiquu added the s.FinalReview The PR is ready for final review label Dec 23, 2023
Copy link
Contributor

@domlimm domlimm left a comment

Choose a reason for hiding this comment

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

Small nit. Nice work!

@domlimm
Copy link
Contributor

domlimm commented Dec 29, 2023

@hallovera Sorry, will need you to update the snapshots please. Thank you!

@gordlin
Copy link
Contributor Author

gordlin commented Dec 31, 2023

@domlimm Done!

Copy link
Contributor

@domlimm domlimm left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for your contribution!

@domlimm domlimm merged commit e33c810 into TEAMMATES:master Dec 31, 2023
9 checks passed
@wkurniawan07 wkurniawan07 added s.ToMerge The PR is approved by all reviewers including final reviewer; ready for merging c.Feature User-facing feature; can be new feature or enhancement to existing feature and removed s.FinalReview The PR is ready for final review labels Jan 21, 2024
@wkurniawan07 wkurniawan07 added this to the V8.30.0 milestone Jan 21, 2024
cedricongjh pushed a commit to cedricongjh/teammates that referenced this pull request Feb 20, 2024
…how visibility of the comment as well (TEAMMATES#12659)

* Add visibility information for question comments

* Fix lint issue

* Fix snapshot issues

* Standardise text with existing one in response body

* Update snapshots

---------

Co-authored-by: Wei Qing <48304907+weiquu@users.noreply.github.com>
Co-authored-by: Jason Qiu <jason_qiu@hotmail.com>
Co-authored-by: Dominic Lim <46486515+domlimm@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c.Feature User-facing feature; can be new feature or enhancement to existing feature s.ToMerge The PR is approved by all reviewers including final reviewer; ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When adding a comment while submitting responses, show visibility of the comment as well
5 participants