WIP fix: handle boolean flag from MFE Config API in CourseImportHomePage#3121
WIP fix: handle boolean flag from MFE Config API in CourseImportHomePage#3121mariajgrimaldi wants to merge 2 commits into
Conversation
The ENABLE_COURSE_IMPORT_IN_LIBRARY flag check used strict string comparison (=== 'true'), which fails when the value comes from the MFE Config API at runtime (JSON boolean true instead of string 'true'). Use the same [true, 'true'].includes() pattern already in other library components for this case. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Thanks for the pull request, @mariajgrimaldi! 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. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where 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. |
The button renders twice in the empty state: once in the SubHeader headerActions and once in the EmptyState call-to-action. Use findAllByRole/queryAllByRole to handle both occurrences. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3121 +/- ##
==========================================
+ Coverage 95.66% 95.70% +0.04%
==========================================
Files 1402 1401 -1
Lines 33224 33376 +152
Branches 7529 7567 +38
==========================================
+ Hits 31783 31942 +159
+ Misses 1394 1387 -7
Partials 47 47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|

Settings
Description
The
ENABLE_COURSE_IMPORT_IN_LIBRARYflag check used strict string comparison(=== 'true'), which fails when the value comes from the MFE Config API at runtime (JSON boolean true instead of string 'true'). Use the same[true, 'true'].includes()pattern already in other components:frontend-app-authoring/src/header/Header.tsx
Line 43 in f4b90d8
Supporting information
Fixes openedx/wg-build-test-release#588
Testing instructions
Best Practices Checklist
We're trying to move away from some deprecated patterns in this codebase. Please
check if your PR meets these recommendations before asking for a review:
.ts,.tsx).propTypesanddefaultPropsin any new or modified code.src/testUtils.tsx(specificallyinitializeMocks)apiHooks.tsin this repo for examples.messages.tsfiles have adescriptionfor translators to use.../in import paths. To import from parent folders, use@src, e.g.import { initializeMocks } from '@src/testUtils';instead offrom '../../../../testUtils'