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

fix: problem type not selectable #459

Merged
merged 4 commits into from
Mar 7, 2024

Conversation

jesperhodge
Copy link
Member

@jesperhodge jesperhodge commented Mar 7, 2024

JIRA: https://2u-internal.atlassian.net/browse/TNL-11465

This is a problem we're experiencing on stage due to a bug in paragon. This is intended as a temporary fix until we can dig into why this is happening in paragon. But basically the Context for the SelectableBox is missing a provider in paragon. The short-term fix is to copy over paragon's selectablebox component and fix it. This is done so that our quick fix doesn't break anything else in paragon for now or cause any unexpected issues.

(locally the problem didn't pop up until we copied over the paragon component. Theory is that locally a different paragon version was installed for some reason.)

How to test

  • Add a problem block
  • you should be able to select the block type and create the block with the correct type

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 24.03846% with 79 lines in your changes are missing coverage. Please review.

Project coverage is 89.09%. Comparing base (4e78c07) to head (e095d5d).

Files Patch % Lines
...c/editors/sharedComponents/SelectableBox/index.jsx 16.66% 24 Missing and 1 partial ⚠️
...rs/sharedComponents/SelectableBox/getInputType.jsx 5.88% 16 Missing ⚠️
...omponents/SelectableBox/FormCheckboxSetContext.jsx 31.81% 15 Missing ⚠️
...edComponents/SelectableBox/FormRadioSetContext.jsx 31.81% 15 Missing ⚠️
...haredComponents/SelectableBox/SelectableBoxSet.jsx 38.46% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #459      +/-   ##
==========================================
- Coverage   90.70%   89.09%   -1.61%     
==========================================
  Files         229      234       +5     
  Lines        4206     4310     +104     
  Branches      855      889      +34     
==========================================
+ Hits         3815     3840      +25     
- Misses        371      449      +78     
- Partials       20       21       +1     

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

Copy link
Contributor

@rayzhou-bit rayzhou-bit left a comment

Choose a reason for hiding this comment

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

nit: Could you add a comment to ProblemTypeSelect.jsx on how this is a 'fixed' version of the paragon component?
Otherwise, I tested this change and it looks good to me!

@jesperhodge jesperhodge merged commit 5069cf8 into main Mar 7, 2024
7 of 8 checks passed
BryanttV pushed a commit to eduNEXT/frontend-lib-content-components that referenced this pull request Apr 10, 2024
JIRA: https://2u-internal.atlassian.net/browse/TNL-11465

This is a problem we're experiencing on stage due to a bug in paragon. This is intended as a temporary fix until we can dig into why this is happening in paragon. But basically the Context for the SelectableBox is missing a provider in paragon. The short-term fix is to copy over paragon's selectablebox component and fix it. This is done so that our quick fix doesn't break anything else in paragon for now or cause any unexpected issues.
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.

2 participants