fix: update release date for sidebar on updating it from outline side#3079
fix: update release date for sidebar on updating it from outline side#3079marslanabdulrauf wants to merge 1 commit into
Conversation
|
Thanks for the pull request, @marslanabdulrauf! 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. |
21b722d to
9b34321
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3079 +/- ##
==========================================
+ Coverage 95.61% 95.63% +0.01%
==========================================
Files 1391 1391
Lines 33075 33085 +10
Branches 7680 7692 +12
==========================================
+ Hits 31626 31641 +15
+ Misses 1384 1379 -5
Partials 65 65 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Steps to reproduce issue
masterbranchDescription
This pull request improves how the
ReleaseSectionandVisibilitySectioncomponents in the course outline sidebar handle external updates to their data, such as when changes are made from other UI elements (like a kebab-menu configure modal). The changes ensure that the sidebar UI always reflects the latest state from the backend without accidentally firing redundant mutations or callbacks. Additionally, new tests verify this synchronization behavior.Synchronization improvements:
ReleaseSection.tsxandVisibilitySection.tsxnow use auseEffectto update their local state when the underlyingitemDatachanges externally, using askipCallbackflag to avoid triggering theonChangemutation redundantly. (src/course-outline/outline-sidebar/info-sidebar/sharedSettings/ReleaseSection.tsx[1] [2];src/course-outline/outline-sidebar/info-sidebar/sharedSettings/VisibilitySection.tsx[3] [4]Testing enhancements:
useStateWithCallbackandDatepickerControlinReleaseSection.test.tsxwere enhanced to handle the new object form withskipCallback, and to allow inspecting the currently displayed value. (src/course-outline/outline-sidebar/info-sidebar/sharedSettings/ReleaseSection.test.tsxsrc/course-outline/outline-sidebar/info-sidebar/sharedSettings/ReleaseSection.test.tsxL7-R36)ReleaseSectionandVisibilitySectionto verify that UI updates correctly when external changes occur, and thatonChangeis not called in these cases, preventing redundant mutations. (src/course-outline/outline-sidebar/info-sidebar/sharedSettings/ReleaseSection.test.tsx[1];src/course-outline/outline-sidebar/info-sidebar/sharedSettings/VisibilitySection.test.tsx[2]Supporting information
https://github.com/mitodl/hq/issues/11295 (MIT Internal)
Testing instructions
AI Tool
Software: Claude Desktop
Model: Claude Sonnet 4.6 (High)