feat: add progress reporting functionality with EventSource integration #1336
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new feature for handling and displaying progress bars for event sources in the admin interface. It includes the implementation of new classes, tests, and CSS styles, as well as updates to the existing setup for external content synchronization.
New Feature: Event Source Progress Bar
Implementation of Progress Bar Components:
assets/source/3.0/js/admin/eventSourceProgress/EventSourceHandlerWithProgressBar.ts
: Added a new class to handle event source progress with a progress bar.assets/source/3.0/js/admin/eventSourceProgress/ProgressBar.ts
: Created aProgressBar
class to manage progress bar updates and visibility.assets/source/3.0/js/admin/eventSourceProgress/UIComponents/ProgressBarWithLabel.ts
: Defined a custom element for a progress bar with a label.assets/source/3.0/js/admin/eventSourceProgress/index.ts
: Registered the custom progress bar element and set up triggers for elements with a specific data attribute.Testing:
assets/source/3.0/js/admin/eventSourceProgress/EventSourceTrigger.test.ts
: Added tests for theEventSourceTrigger
class.assets/source/3.0/js/admin/eventSourceProgress/ProgressBar.test.ts
: Added tests for theProgressBar
class.assets/source/3.0/js/admin/eventSourceProgress/UIComponents/ProgressBarWithLabel.test.ts
: Added tests for theProgressBarWithLabel
custom element.Styling:
assets/source/3.0/js/admin/eventSourceProgress/UIComponents/ProgressBarWithLabel.css
: Added CSS styles for the progress bar component.assets/source/3.0/sass/admin/general.scss
: Updated general styles to include the new progress bar component.External Content Synchronization Enhancements
Ajax Sync Implementation:
library/ExternalContent/Rest/AjaxSync.php
: Introduced a new class to handle AJAX requests for syncing external content.library/App.php
: Updated the setup for external content to include the new AJAX sync handler and progress reporter. [1] [2] [3]Progress Reporting:
library/ExternalContent/SyncHandler/SyncHandler.php
: Added support for progress reporting during the synchronization process.Workflow Automation
.github/workflows/test-js.yml
: Added a new workflow to automate testing for JavaScript code on pull requests.