Skip to content

Conversation

ktyagiapphelix2u
Copy link

No description provided.

awais786 and others added 14 commits September 16, 2025 12:02
Removed Django version '5.2' from the workflow.
This error was occurring because the way the redirect URL was constructed caused the entire base path to be removed. This commit updates the URL construction method to correctly preserve the MFE's path.
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
…rprise-integrated-channels-904b6c1

feat: Upgrade Python dependency enterprise-integrated-channels
- Move Video Block JS files from xmodule/js/src/video/ to xmodule/assets/video/public/js/ 
- Update JavaScript files from  RequireJS to ES6 import/export
- test: Enable and fix Karma Js tests for Video XBlock (openedx#37351)

---------

Co-authored-by: salmannawaz <[email protected]>
fix: Profile MFE redirection issue (URL path override)
@ktyagiapphelix2u ktyagiapphelix2u changed the title Ktyagi/django Testing Django 5.2 Oct 17, 2025
@robrap robrap marked this pull request as ready for review October 21, 2025 15:39
@Copilot Copilot AI review requested due to automatic review settings October 21, 2025 15:39
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the video player codebase from RequireJS to ES6 modules to support testing with Django 5.2. The changes involve converting all video-related JavaScript modules from AMD/RequireJS format to native ES6 imports/exports, updating test files to use ES6 imports, and modifying the Python backend to use fragment.initialize_js() instead of the deprecated shim_xmodule_js() function.

Key Changes

  • Converted all video JavaScript modules from RequireJS/AMD to ES6 module format
  • Updated video block Python code to use fragment.initialize_js() for module initialization
  • Modified test files to import modules using ES6 syntax
  • Updated webpack configuration paths for fixture files

Reviewed Changes

Copilot reviewed 105 out of 105 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
xmodule/video_block/video_block.py Replaced shim_xmodule_js() with fragment.initialize_js() and updated webpack bundle name for public view
xmodule/js/src/video/*.js Removed all original RequireJS video module files
xmodule/assets/video/public/js/*.js Added new ES6 module versions of video components
xmodule/js/spec/video/*.js Updated test files to use ES6 imports and removed RequireJS wrappers
xmodule/js/karma_*.js Updated karma configuration and runner with ES6 imports and corrected fixture paths

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

spyOnEvent(state.videoProgressSlider.handle, 'focus');
spyOn(state.videoProgressSlider, 'notifyThroughHandleEnd')
.and.callThrough();

Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra blank line added (line 257) that serves no purpose and reduces code consistency.

Suggested change

Copilot uses AI. Check for mistakes.

Comment on lines 261 to +264
state.videoProgressSlider.notifyThroughHandleEnd({end: true});

expect(state.videoProgressSlider.handle.attr('title'))
.toBe('Video ended');

state.videoProgressSlider.handle.trigger('focus');
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Removed blank lines between related test assertions reduce readability. The original spacing helped separate the setup, assertion, and trigger steps.

Copilot uses AI. Check for mistakes.

it('not shown when captions are not ai generated', () => {
Caption.updateGoogleDisclaimer(BASE_CAPTIONS)
expect(state.shouldShowGoogleDisclaimer).toBe(false);
expect(Caption.shouldShowGoogleDisclaimer).toBe(false);
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed from state.shouldShowGoogleDisclaimer to Caption.shouldShowGoogleDisclaimer. This appears to be accessing the wrong object - the property should exist on the Caption instance (state.videoCaption or similar), not on the Caption constructor/module itself.

Copilot uses AI. Check for mistakes.

Copy link

@robrap robrap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be merged, but cannot be squashed or rebased. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants