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

Check that rubricData exists before pulling it in #54577

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

kobryan0619
Copy link
Contributor

@kobryan0619 kobryan0619 commented Oct 30, 2023

We got this ZenDesk ticket letting us know that there was an issue with the non-rubric levels looking for data that wasn't there. This PR fixes this by checking that the data exists before pulling it in.

A few other notes:

  • I considered refactoring the hasScriptData so that it followed the same format as the getScriptData() function. However, when I started to do that, I noticed that in one other place where we use hasScriptData, we use just a "key" as a parameter. This seemed odd to me but I wasn't really sure how to see this in the application and the investigation seemed beyond the scope of this ticket.
  • After fixing the issue reported in ZenDesk, I ran into a warning indicating that one of the prop-types was incorrect in TopInstructionsHeader. This didn't seem to impact usability, but after a bit of investigation, it seemed like a straightforward fix to stop that from occurring. This is also addressed in this PR.

Testing

  • I tested this locally on different pages and did not run into any other errors or unexpected issues.

@kobryan0619 kobryan0619 changed the title fix issues with pilot Check that rubricData exists before pulling it in Oct 30, 2023
@kobryan0619 kobryan0619 requested a review from a team October 30, 2023 19:10
@kobryan0619 kobryan0619 marked this pull request as ready for review October 30, 2023 19:10
@@ -667,7 +667,7 @@ class TopInstructions extends Component {
mapReference || (referenceLinks && referenceLinks.length > 0);

const displayHelpTab =
(levelVideos && levelVideos.length > 0) || levelResourcesAvailable;
(levelVideos && levelVideos.length > 0) || !!levelResourcesAvailable;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this changes displayHelpTab to be a boolean value. The only place it is used is as a prop for TopInstructionsHeader which is expecting a boolean.

Copy link
Contributor

@bethanyaconnor bethanyaconnor left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix!!

@kobryan0619 kobryan0619 merged commit a7c95c6 into staging Oct 31, 2023
2 checks passed
@kobryan0619 kobryan0619 deleted the kaitie/fix-issue-with-pilot-rubric-data branch October 31, 2023 20:01
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.

None yet

2 participants