feat: add card in Pages and Resources to allow hiding the dates tab#2834
Conversation
|
Thanks for the pull request, @Anas12091101! 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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2834 +/- ##
=======================================
Coverage 95.45% 95.45%
=======================================
Files 1330 1330
Lines 30573 30573
Branches 6949 6931 -18
=======================================
Hits 29182 29182
- Misses 1323 1335 +12
+ Partials 68 56 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Let me know when you'd like this reviewed and merged! |
|
Thanks @bradenmacdonald, the PR is now ready for review |
bradenmacdonald
left a comment
There was a problem hiding this comment.
Sorry for the delay. I tested this and it's working fine.
I confirmed that:
- Putting
ENABLE_DATES_COURSE_APP = Trueintoedx-platform/cms/envs/private.pywill show this new app, and otherwise it's hidden. - Toggling the setting will hide the dates tab.
However, we need to fix the wording here.
Also, I will hold off on merging this PR until the platform PR is merged. But once it's merged, ping me anytime and I'll merge this one.
| }, | ||
| enableAppHelp: { | ||
| id: 'course-authoring.pages-resources.dates.enable-app.help', | ||
| defaultMessage: 'Allow learners to access the Dates page to review upcoming assignments and important course milestones.', |
There was a problem hiding this comment.
This says that the toggle will control whether we "Allow learners to access the Dates page", but it actually only hides the tab. If learners have the URL, they are still "allowed" to access it. I think we need to clarify the wording.
| "@openedx/paragon": "*", | ||
| "prop-types": "*", | ||
| "react": "*", | ||
| "yup": "*" |
There was a problem hiding this comment.
| "yup": "*" |
No need to mention yup if you're not using it.
| @@ -174,7 +175,6 @@ | |||
| "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.9.tgz", | |||
| "integrity": "sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==", | |||
| "license": "MIT", | |||
| "peer": true, | |||
There was a problem hiding this comment.
Please rebase this PR and make sure you are using the correct (latest?) version of NPM. It should not be showing all these "peer": true changes to package-lock.json. There should be < 30 lines changed from adding the new course-app-dates plugin. You'll need to reset the changes, upgrade NPM, and run npm install again.
|
@Anas12091101 I merged your platform PR. Can you please rebase this PR and address my comments? Then I'll approve and merge it for you. Thanks for your patience with my slow reviews. |
84708cc to
ac3e9ef
Compare
bradenmacdonald
left a comment
There was a problem hiding this comment.
Looks great! Thanks.
Description
This PR adds a Date Course App card to the Pages and Resources page, enabling course authors to hide the Dates tab from learners using the authoring MFE.
Useful information to include:
Screen.Recording.2026-01-21.at.7.36.57.PM.mov
Supporting information
openedx/platform-roadmap#392
Testing instructions
Other information
Related edx-platform PR: openedx/openedx-platform#37923
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'