-
Notifications
You must be signed in to change notification settings - Fork 214
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
[FC-0056] Course outline sidebar #1375
[FC-0056] Course outline sidebar #1375
Conversation
Thanks for the pull request, @ihor-romaniuk! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
39a3d8e
to
27e325f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1375 +/- ##
==========================================
+ Coverage 88.30% 88.72% +0.42%
==========================================
Files 292 302 +10
Lines 5002 5217 +215
Branches 1267 1295 +28
==========================================
+ Hits 4417 4629 +212
- Misses 569 572 +3
Partials 16 16 ☔ View full report in Codecov by Sentry. |
Sandbox deployment failed 💥 |
I was able to get this working in tutor locally by merging openedx/edx-platform#34650 into a new branch I made off of latest I ran tutor images build openedx-dev --build-arg EDX_PLATFORM_REPOSITORY=https://github.com/brian-smith-tcril/edx-platform.git --build-arg EDX_PLATFORM_VERSION=sidebar-early-merge and used this plugin from tutormfe.hooks import MFE_APPS
@MFE_APPS.add()
def _add_my_mfe(mfes):
mfes["learning"] = {
"repository": "https://github.com/raccoongang/frontend-app-learning.git",
"port": 2000,
"version": "romaniuk/course-outline-sidebar",
}
return mfes Since the I believe if you rebase openedx/edx-platform#34650 on latest upstream master and point to that branch instead of |
Until the required backend PR is merged, I'm moving this to Draft status. |
@brian-smith-tcril Thanks for notice that. |
Sandbox deployment successful 🚀 |
27e325f
to
47216be
Compare
Update branch with added a few UI enhancements:
|
Sandbox deployment successful 🚀 |
Update branch: made a refactoring according to changes in backend endpoints openedx/edx-platform#34650 |
Sandbox deployment successful 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I find this implementation is easier to reason about than the previous one. Thank you! It will make it easier for us to revisit this later when we attempt to implement the same functionality via PluginSlots.
Oh, and I tested it against a deploy of master via Tutor nightly, and it seems to work well.
I do have a couple of nits though, if you don't mind.
// const { container } = render( | ||
// <Sequence {...mockData} {...{ sequenceId: sequenceBlocks[0].id }} />, | ||
// { store: testStore, wrapWithRouter: true }, | ||
// ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind removing the commented out code? Unless it's here for documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I remove it
@@ -134,9 +156,10 @@ describe('Sequence', () => { | |||
}); | |||
|
|||
it('handles loading unit', async () => { | |||
render(<Sequence {...mockData} />, { wrapWithRouter: true }); | |||
// render(<Sequence {...mockData} />, { wrapWithRouter: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another commented line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also delete
const query = new URLSearchParams(window.location.search); | ||
const initialSidebar = (shouldDisplaySidebarOpen || query.get('sidebar') === 'true') ? SIDEBARS.DISCUSSIONS.ID : null; | ||
const isDefaultDisplayRightSidebar = useSelector(getCoursewareOutlineSidebarSettings).alwaysOpenAuxiliarySidebar; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const isDefaultDisplayRightSidebar = useSelector(getCoursewareOutlineSidebarSettings).alwaysOpenAuxiliarySidebar; | |
const alwaysOpenAuxiliarySidebar = useSelector(getCoursewareOutlineSidebarSettings).alwaysOpenAuxiliarySidebar; |
Do you mind refactoring so that we don't have a mismatch between the waffle flag name and the name we use here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, refactored. Thanks.
9edafba
to
24db8c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Approved!
@ihor-romaniuk 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
This PR is the part of - openedx/platform-roadmap#329 |
Settings
Description
This pull request adds an important feature to our platform: displaying a navigation sidebar within a given course.
Interaction with feature flag
courseware.show_default_right_sidebar
has been added to control the default display of the discussion sidebar andcourseware.disable_navigation_sidebar
to control of enabling the course outline sidebar.Discussions or Notifications sidebar shouldn't be opened on Learning MFE by default. If waffle flag enabled - Discussions always opens on the pages with discussions, if user is in Audit and course has verified mode - show Notifications.
Depends on BE PRs
Design
https://www.figma.com/file/gew5tORDX4Q7wxOS8vjqZu/side-nav-OEX?type=design&node-id=318-3234&mode=design&t=rBe1ToNYP8RY6QOp-0
Testing instructions