Skip to content

feat: add web implementation SvgXml and others component#2382

Merged
jakex7 merged 12 commits into
mainfrom
@bohdanprog/fix-problem-with-svgxml
Jul 31, 2024
Merged

feat: add web implementation SvgXml and others component#2382
jakex7 merged 12 commits into
mainfrom
@bohdanprog/fix-problem-with-svgxml

Conversation

@bohdanprog
Copy link
Copy Markdown
Contributor

Summary

We want to make available SvgXml and other components in the web platform.

Test Plan

We can easily check how that works by opening Test1813.

Compatibility

OS Implemented
Web

@bohdanprog bohdanprog marked this pull request as ready for review July 30, 2024 14:42
@bohdanprog bohdanprog self-assigned this Jul 30, 2024
@bohdanprog bohdanprog requested a review from jakex7 July 31, 2024 08:20
Copy link
Copy Markdown
Member

@jakex7 jakex7 left a comment

Choose a reason for hiding this comment

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

Left some comments, please answer them

Comment thread src/css/LocalSvg.tsx
Comment on lines 42 to 46
const uri = getUriFromSource(source);
if (isUriAnAndroidResourceIdentifier(uri)) {
if (uri && isUriAnAndroidResourceIdentifier(uri)) {
return loadAndroidRawResource(uri);
} else {
return fetchText(uri);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If there's no URI, fetchText should be executed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In that case, when I updated the getUriFromSource function, it is required to add a check on line 43 to ensure that the URI exists for some reason.

Comment thread src/xml.tsx
Comment on lines +82 to +84
if (!uri) {
return null;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I believe we should check for that earlier

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I believe it's better to check the URI only in that specific place, especially if we have multiple areas where we utilize that function.

@bohdanprog bohdanprog requested a review from jakex7 July 31, 2024 09:31
Base automatically changed from @bohdanprog/fix-circular-dependencies to main July 31, 2024 09:45
@jakex7 jakex7 merged commit a2e843b into main Jul 31, 2024
@jakex7 jakex7 deleted the @bohdanprog/fix-problem-with-svgxml branch July 31, 2024 09:56
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.

2 participants