-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: improve SVG Validation and Error Handling in AvatarFavicon Component #9023
fix: improve SVG Validation and Error Handling in AvatarFavicon Component #9023
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
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.
LGTM
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.
LGTM
Quality Gate passedIssues Measures |
Looks good for QA.
|
Bitrise✅✅✅ Commit hash: b236280 Note
|
Missing release label release-7.19.0 on PR. Adding release label release-7.19.0 on PR and removing other release labels(release-7.20.0), as PR was cherry-picked in branch 7.19.0. |
Description
This PR enhances the AvatarFavicon component by implementing an SVG validation step using a HEAD request to ensure URIs point to valid SVG files. It improves error handling by setting up a reliable fallback mechanism that activates if the SVG fails to load or doesn't pass validation. The introduction of state management for SVG source validation ensures that only verified SVGs are rendered, thereby minimizing potential rendering issues and improving overall component stability. This streamlined approach enhances user experience by providing a more resilient and error-tolerant AvatarFavicon component.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Screen.Recording.2024-03-21.at.14.53.59.mov
Screen.Recording.2024-03-21.at.14.53.10.mov
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist