Skip to content

Conversation

@nsprenkle
Copy link
Contributor

Previously, the Overall Feedback info tooltip was showing the "Default Feedback Text" value when we should have been showing the "Feedback Instructions".

Screenshot 2025-09-04 at 11 03 27

*Notes

  • We don't use "Default Feedback Text" currently. Instead we have a default placeholder text option. This might be a fix we want to do.
  • There's an updated design to pull out the feedback instructions into a modal, since some course authors write a lot here, but I'm deferring that to a separate task.
  • There info popover does not show on the final grade view, which it did in the old version of ORA. Possibly also worth a separate task.

@nsprenkle nsprenkle requested review from Copilot and jansenk September 4, 2025 15:03
@codecov
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.52%. Comparing base (a57c40c) to head (5d69be5).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #363      +/-   ##
==========================================
+ Coverage   90.16%   90.52%   +0.36%     
==========================================
  Files         144      144              
  Lines        2196     2196              
  Branches      476      477       +1     
==========================================
+ Hits         1980     1988       +8     
+ Misses        204      197       -7     
+ Partials       12       11       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the Overall Feedback info tooltip to display feedback instructions instead of default feedback text. The tooltip was incorrectly showing the "Default Feedback Text" value when it should have been showing the "Feedback Instructions" for course authors.

Key changes:

  • Replaced useOverallFeedbackPrompt hook with useOverallFeedbackInstructions
  • Added new useOverallFeedbackDefaultText hook for potential future use
  • Updated component to use the correct data source for the tooltip

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/data/services/lms/hooks/selectors/oraConfig.ts Replaced single feedback config hook with separate hooks for default text and instructions
src/hooks/assessment.js Updated exports to include both new feedback-related hooks
src/components/Assessment/EditableAssessment/OverallFeedback/index.jsx Changed component to use instructions hook instead of prompt hook
src/hooks/assessment.test.js Updated test mocks to reflect new hook names
src/components/Assessment/EditableAssessment/OverallFeedback/index.test.jsx Updated tests and variable names to match new instructions-based implementation
src/components/Assessment/EditableAssessment/OverallFeedback/__snapshots__/index.test.jsx.snap Updated snapshot to reflect new test-id and mock values
src/data/services/lms/hooks/selectors/index.ts Minor code style improvements (else-if to separate if statements, formatting)
src/components/Assessment/types.ts Changed quote style from double to single quotes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sarina
Copy link

sarina commented Sep 4, 2025

I'm not quite a frontend dev, nor am I a CC on this repo, was there a specific reason I was tagged?

@kdmccormick kdmccormick removed their request for review September 4, 2025 15:34
@sarina sarina removed their request for review September 5, 2025 17:56
@nsprenkle
Copy link
Contributor Author

I'm not quite a frontend dev, nor am I a CC on this repo, was there a specific reason I was tagged?

GitHub had suggested you as a recent contributor. I didn't realize you weren't a Maintainer here. I'll un-request you.

@nsprenkle nsprenkle requested review from Faraz32123, bradenmacdonald and farhaanbukhsh and removed request for Faraz32123 September 8, 2025 15:57
@nsprenkle nsprenkle force-pushed the nsprenkle/add-feedback-instructions branch 2 times, most recently from dfd5a22 to 8172293 Compare September 15, 2025 16:18
@nsprenkle
Copy link
Contributor Author

Pinging @bradenmacdonald and @farhaanbukhsh

@bradenmacdonald
Copy link

I'm not involved with ORA so I have no idea about the product side of things here but I am available as a "reviewer of last resort" for any frontend PRs. The code change looks good to me.

Is there any product nuance here or is this a clear bugfix?

@nsprenkle
Copy link
Contributor Author

I'm not involved with ORA so I have no idea about the product side of things here but I am available as a "reviewer of last resort" for any frontend PRs. The code change looks good to me.

Is there any product nuance here or is this a clear bugfix?

This is a clear bugfix, we had mapped the wrong info to this popover.

Copy link

@bradenmacdonald bradenmacdonald left a comment

Choose a reason for hiding this comment

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

OK then LGTM. Could you please rebase and drop the package-lock.json changes? I don't think any version bumps should be included in this PR.

@farhaanbukhsh
Copy link
Member

Pinging @bradenmacdonald and @farhaanbukhsh

Thank you for tagging me but I am not a CC for this repo although I can help out in triaging but I see @bradenmacdonald has done that already and I am sorry for late reply.

@nsprenkle nsprenkle force-pushed the nsprenkle/add-feedback-instructions branch 2 times, most recently from 43a79c7 to eb1d103 Compare October 16, 2025 18:10
@nsprenkle
Copy link
Contributor Author

OK then LGTM. Could you please rebase and drop the package-lock.json changes? I don't think any version bumps should be included in this PR.

Have rebased and reduced the changeset to just this one tweak. Ready to merge when you are 😄

@bradenmacdonald
Copy link

@nsprenkle Thanks! Unfortunately GitHub won't let me merge this unless the patch code coverage check is passing. Would you be able to add a test that covers the missing lines in src/data/services/lms/hooks/selectors/index.ts, or mark them as ignored if you think a test is unreasonable?

* refactor: show feedback instructions rather than default text on overall feedback tooltip

* chore: update snapshots

* style: fix style issues

* chore: update packages
@nsprenkle nsprenkle force-pushed the nsprenkle/add-feedback-instructions branch from eb1d103 to 65061c8 Compare October 29, 2025 17:30
@nsprenkle
Copy link
Contributor Author

@nsprenkle Thanks! Unfortunately GitHub won't let me merge this unless the patch code coverage check is passing. Would you be able to add a test that covers the missing lines in src/data/services/lms/hooks/selectors/index.ts, or mark them as ignored if you think a test is unreasonable?

I don't think a test is unreasonable but I will voice annoyance that this PR is being blocked because existing tests are insufficient. There is a 0% project delta, but several of the lines I changed (due to new linting rules) never had tests, which is what it's complaining about.

I can fix that, but I don't think it should have had to be in the scope of this PR.

Please add tests to things as you're developing so I don't have to
fight with CodeCov after the fact
@bradenmacdonald
Copy link

@nsprenkle I completely understand. On the authoring MFE where I'm the maintainer, I have the discretion to merge PRs without the project check passing for exactly that reason. But I'm not a maintainer here and barely work with this repo at all, so I don't have that power. Next time, you could ping Sarina to do the merge anyways if you think it makes sense.

@nsprenkle
Copy link
Contributor Author

@nsprenkle I completely understand. On the authoring MFE where I'm the maintainer, I have the discretion to merge PRs without the project check passing for exactly that reason. But I'm not a maintainer here and barely work with this repo at all, so I don't have that power. Next time, you could ping Sarina to do the merge anyways if you think it makes sense.

Appreciate the insight! Should be unblocked now on my end with most recent commit. Ready to merge at your leisure.

@bradenmacdonald bradenmacdonald merged commit 3cc7590 into openedx:master Oct 29, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants