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

Image support in string as source, for svg strings #2983

Merged
merged 3 commits into from Mar 18, 2024

Conversation

adids1221
Copy link
Contributor

Description

Image support strings as type for source.
Source now support svg image string, requested from the CTO and the web editor teams.

Changelog

Image support strings as type for source.

Additional info

@adids1221 adids1221 added the hotfix Requires a hotfix release label Mar 17, 2024
@Inbal-Tish
Copy link
Collaborator

@adids1221 I can't check out this specific branch... Also, why is that a hotfix?

@Inbal-Tish
Copy link
Collaborator

@adids1221 Worth adding tests at least to the ImageUtils

function isSvgData(source?: ImageProps['source']) {
const sourceString = (source as string);
function isSvgData(source?: ImageSourceType) {
const sourceString = source as string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why cast to a string instead of conditioning it? I think it will be clearer

@@ -122,7 +126,7 @@ class Image extends PureComponent<Props, State> {
public static overlayTypes = Overlay.overlayTypes;
public static overlayIntensityType = Overlay.intensityTypes;

sourceTransformer?: (props: any) => ImagePropTypes.source;
sourceTransformer?: (props: any) => ImagePropTypes;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you mean ImageSourceType?

@Inbal-Tish Inbal-Tish enabled auto-merge (squash) March 18, 2024 08:00
@Inbal-Tish Inbal-Tish merged commit 9484839 into master Mar 18, 2024
1 check passed
@Inbal-Tish Inbal-Tish deleted the infra/Image_source_type_change branch March 18, 2024 08:01
@adids1221 adids1221 mentioned this pull request Mar 18, 2024
adids1221 added a commit that referenced this pull request Mar 18, 2024
* Image support in string as source, for svg strings

* code review refactor, image utils testing

* removed ImagePropTypes from Image index file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotfix Requires a hotfix release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants