Skip to content
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

Feature/man 1701 sdk communication model update #28

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

bennealon
Copy link
Contributor

@bennealon bennealon commented Oct 18, 2024

πŸ“¦ Published PR as canary version: 0.5.0--canary.28.0291bf8.0

✨ Test out this PR locally via:

npm install @amplience/image-studio-sdk@0.5.0--canary.28.0291bf8.0
# or 
yarn add @amplience/image-studio-sdk@0.5.0--canary.28.0291bf8.0

restrict use of CONST Enums in this project to prevent backwards incompatability
Legacy ImageStudio messages are converted to the new format, warning sent to console.
Legacy conversion code will be short lived, and is only intended to span until ImageStudio has been released with the new comms layer.
Introduces new Event enums
Non breaking change, old studio works with new SDK.
Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

…tadata

translates LegacyImageStudioEvents into the new format for translation and processing. Allows backwards compatability with an older version of image-studio
Copy link

@orca-security-eu orca-security-eu bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

…of image-studio

connection messages are always sent in new and legacy message format from image-studio, adds `newEventFormat` flag into the legacy message format to allow newer studios to declare they support the newer format, which in turn allows the SDK to filter on which message type to use for the life cycle of the application lifecycle.
Users can write custom event listeners for image studio.
WIP, allows registering of listeners - deprecating the old image save pathway, once a user listens for the specific imageSave event, they unlock the ability to listen for multiple save requests during a studio session.
The act of saving images no longer closes the studio.
Legacy behaviour exists until the user overrides the event listener.
Adds legacy suite of storybook tests, and updated storybook entries.
Users that listen for an event type must respond back to image studio, to keep message types generic, we add context on which image studio message even triggered the response.
fix: for messages where event.data is not an object, being processed
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.

1 participant