-
Notifications
You must be signed in to change notification settings - Fork 5
Introduce IframeEventBus for iframe - CS events #4183 #4252
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
Conversation
…tend IframeEvent, started updating InitializeLiveEditEvent.ts to serialize itself to message
#4183 - added ClassRegistry to IframeEventBus - added domain to UriHelper - passed page domain to iframe - added more fromObject methods
#4183 - added common headers for Request.ts
#4183 - toString/fromString serialization in IframeEventBus - Prevent Store from accessing parent frame
#4183 - remove toMessage/fromMessage from IframeEventBus.ts - Configurable ids for IframeEventBus.ts
#4183 - multiple receivers for IframeEventBus.ts to be able to listen to own events
#4183 - turn off logging
- turn off logging
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.
Pull request overview
This PR introduces an IframeEventBus system to enable cross-iframe event communication, specifically targeting issue #4183. The implementation includes a new event bus architecture with abstract base classes to support both traditional window events and iframe-based message passing.
Changes:
- Introduced
IframeEventBusandAbstractEventBusarchitecture to support cross-iframe event communication with JSON serialization/deserialization - Refactored
EventBusandEventclasses to extend new abstract base classes, maintaining backward compatibility - Added support for absolute URIs in requests and domain configuration to enable cross-origin communication
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/resources/assets/admin/common/js/event/IframeEventBus.ts | New event bus implementation for iframe communication with class registration and serialization |
| src/main/resources/assets/admin/common/js/event/AbstractEventBus.ts | Base class providing common event bus functionality |
| src/main/resources/assets/admin/common/js/event/IframeEvent.ts | Event class for iframe-based events with data support |
| src/main/resources/assets/admin/common/js/event/AbstractEvent.ts | Base class for all event types |
| src/main/resources/assets/admin/common/js/event/EventBus.ts | Refactored to extend AbstractEventBus |
| src/main/resources/assets/admin/common/js/event/Event.ts | Refactored to extend AbstractEvent |
| src/main/resources/assets/admin/common/js/event/ServerEventsListener.ts | File removed |
| src/main/resources/assets/admin/common/js/util/UriHelper.ts | Added domain setting and absolute URI support |
| src/main/resources/assets/admin/common/js/rest/Request.ts | Added static header support for requests |
| src/main/resources/assets/admin/common/js/rest/PostRequest.ts | Updated to use absolute URIs |
| src/main/resources/assets/admin/common/js/rest/HeadRequest.ts | Updated to use absolute URIs |
| src/main/resources/assets/admin/common/js/rest/GetRequest.ts | Updated to use absolute URIs |
| src/main/resources/assets/admin/common/js/security/PrincipalKey.ts | Added fromObject method for deserialization |
| src/main/resources/assets/admin/common/js/security/IdProviderKey.ts | Added fromObject method for deserialization |
| src/main/resources/assets/admin/common/js/schema/content/ContentTypeName.ts | Added fromObject method for deserialization |
| src/main/resources/assets/admin/common/js/store/Store.ts | Modified parent instance handling with cross-origin note |
| src/main/resources/assets/admin/common/js/ui/responsive/ResponsiveManager.ts | Updated event creation to modern API |
| src/main/resources/assets/admin/common/js/app/wizard/MinimizeWizardPanelEvent.ts | Updated to extend IframeEvent |
| gradle.properties | Version changed for branch |
| .github/workflows/gradle.yml | Added issue-4183 branch to publish workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/resources/assets/admin/common/js/event/AbstractEventBus.ts
Outdated
Show resolved
Hide resolved
…us.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This reverts commit d8fdc31.
- revert ServerEventsListener.ts deletion
- revert ServerEventsListener.ts deletion
No description provided.