Repository navigation
Render native add-component strip for generic container XBlocks - #3058
Conversation
|
Thanks for the pull request, @salman2013! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3058 +/- ##
==========================================
+ Coverage 95.70% 95.78% +0.08%
==========================================
Files 1401 1398 -3
Lines 33376 33465 +89
Branches 7568 7883 +315
==========================================
+ Hits 31941 32056 +115
+ Misses 1388 1365 -23
+ Partials 47 44 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
The general approach on both this PR and the openedx-platform PR look good to me! When you're ready, can you make a sandbox for testing? You can make it on this PR, and use tutor configuration to point the backend at your openedx-platform branch: |
|
@kdmccormick The sandbox has been created successfully if you could get a chance to take a look at it. |
|
@salman2013 Why are you closing and re-opening this PR so many times? Do you not have the "re-run checks" button in the UI on this page ?
|
| updateQueryPendingStatus, | ||
| } from './data/slice'; | ||
|
|
||
| export const useCourseUnit = ({ |
There was a problem hiding this comment.
Nit: this can be fixed in a separate PR, but if this hook/component is used for split test, problem bank, and many other things, it shouldn't be called "CourseUnit" and should be called "CourseComponentContainer" or something more generic.
@bradenmacdonald No, this option is not available on my side, may be just shown for maintainers. |
|
@salman2013 Ah, that's too bad. Thanks for checking. |
…eScript - Replace defaultProps with ES6 function defaults in AddComponentButton and ComponentModalView - Convert add-component-btn/index.jsx and ComponentModalView.jsx to TypeScript, removing propTypes - Add JSDoc comment explaining isGenericContainerType in AddComponentProps Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Code looks fine to me now, thanks. I can review and merge once the platform PR is merged and the "patch" coverage is passing. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a default case to handleCreateNewXBlock that calls handleCreateNewCourseXBlock with the block's type and category. This allows custom/third-party block types declared via StudioContainerWithNestedXBlocksMixin.allowed_nested_blocks (e.g. ranged-value-freeform) to be created when the author clicks their individual Add New Component button, instead of silently doing nothing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…behavior Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The Platform PR is merged now 🚀 @salman2013 , could you get the patch coverage up to 95.7%, and then request Braden for a final review? |
…omponent features Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@bradenmacdonald Could you please review the PR? I added a few tests for the new changes, but the patch coverage is still 0.5% below the target. Could you take a look and let me know if this is acceptable for merging the PR? |
|
@salman2013 Sorry for the delay; I'll try to review soon. |
|
This looks great. The only issue I found is again with the problem builder block. It has these three buttons which all add a I think this would affect other XBlocks that use templates as well, but I'm not sure if any still do that. The
If you want, we can merge this PR anyways and address the templates in a follow-up PR, as this still fixes 90% of the problem. |
|
@bradenmacdonald I am more comfortable merging this PR, as this has fixed 90% of the problem, and creating a follow-up PR to fix the mentioned issue. The reason is that this ticket has been on board for so long.
If you think its safe approach, we can proceed to merge this. |
|
@salman2013 Sorry, I just checked and I don't have permission to override the patch check. You'll need to fix the patch coverage before I can merge. The only thing that's not being tested is the default value You can try adding |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@bradenmacdonald Thanks for looking into the PR and guiding to fix the patch coverage. I have fixed the mentioned test, and now the patch coverage is green. |



Description
Note: The changes in this PR is generated by Claude Sonet 4.6, reviewed by Salman. Based on the implementation plan suggested on the original ticket (#2620)
Details for the original bug can be found here: #2620
The backend (openedx-platform) dependent PR for this change: openedx/openedx-platform#38636
Settings