Skip to content

Conversation

@donnapep
Copy link
Collaborator

@donnapep donnapep commented Jan 13, 2025

Resolves https://github.com/Automattic/sensei-security/issues/17. (Cherry-picked from https://github.com/Automattic/sensei-security/pull/28.)

Proposed Changes

  • Removes the polyfill for the core-pattern block that was needed for WP 5.8. I checked WP 5.9 and confirmed that the block is registered there.
  • Deletes the assets/dist/css/jquery-ui.js file after webpack creates it. As we are enqueuing the jquery-ui.css file in PHP, rather than importing it via a JS file, Webpack generates a corresponding jquery-ui.js file that is essentially empty. That is true of all CSS files that we handle this way, and is a well-documented problem. I tried using this Webpack plugin but it didn't work, so instead opted for a quick and dirty solution and just delete this particular file after Webpack does its thing.

Testing Instructions

  • Create a new course, add a title and a description in the wizard, and close the modal.
  • Make sure the default course template continues working.
  • Create a new course, and navigate to the last step.
  • Make sure you see a default course pattern.
  • Choose it, and make sure it works properly.
  • Run npm run build.
  • Unzip the built file.
  • Check that there is no assets/dist/css/jquery-ui.js file.
  • Install the Plugin Check plugin.
  • Go to Tools > Plugin Check.
  • Select Sensei LMS from the dropdown and ensure Plugin Repo is selected.
  • Click Check it! button.
  • Search the page for "Library files that are already in the WordPress core are not permitted." and ensure no instances are found.

Pre-Merge Checklist

  • PR title and description contain sufficient detail and accurately describe the changes
  • Adheres to coding standards (PHP, JavaScript, CSS, HTML)
  • All strings are translatable (without concatenation, handles plurals)
  • Follows our naming conventions (P6rkRX-4oA-p2)
  • Hooks (p6rkRX-1uS-p2) and functions are documented
  • New UIs are responsive and use a mobile-first approach
  • Code is tested on the minimum supported PHP and WordPress versions

@donnapep donnapep added this to the 4.24.5 milestone Jan 13, 2025
@donnapep donnapep self-assigned this Jan 13, 2025
@github-actions
Copy link

Test the previous changes of this PR with WordPress Playground.

@donnapep
Copy link
Collaborator Author

@donnapep donnapep merged commit 3fe596b into trunk Jan 13, 2025
23 checks passed
@donnapep donnapep deleted the remove/obsolete-javascript branch January 13, 2025 14:00
@donnapep donnapep changed the title Remove files that are already included in WordPress Core #28 Remove files that are already included in WordPress Core Jan 15, 2025
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.

2 participants