-
Notifications
You must be signed in to change notification settings - Fork 2
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
[EDT-1765] SnapshotSettings introduced #549
base: main
Are you sure you want to change the base?
Conversation
Coverage ReportCoverage report can be checked at https://stgrafxstudiodevpublic.blob.core.windows.net/sdk/coverage/549/coverage.html Use PR sdk packageTarball can be downloaded from https://stgrafxstudiodevpublic.blob.core.windows.net/sdk/dev-packages/549/studio-sdk.tgz To use in local project, change package.json to use local tarball "dependencies": {
"@chili-publish/studio-sdk": "https://stgrafxstudiodevpublic.blob.core.windows.net/sdk/dev-packages/549/studio-sdk.tgz"
} |
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.
Why isn't getSnapshot
kept with a nullable settings parameter instead?
good idea indeed |
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.
nit, I would maybe describe what is the behavior of a null largestAxisSize
and if there is an enforced limit from our side.
const res = await this.#blobAPI; | ||
return res.getPageSnapshot(pageId).then((result) => (result as Uint8Array) ?? (result as EditorResponse<null>)); | ||
return res | ||
.getPageSnapshotWithSettings(pageId, JSON.stringify(settings)) |
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.
Only perform JSON.stringify
if settings
are defined
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.
getSnapshotWithSettings('0', 'null') will throw
This PR adds a new method
getSnapshotWithSettings()
withSnapshotSettings
object to be able to control snapshot properties, eg. increase/decrease its resolutionPR Guidelines
Related tickets