Skip to content

Conversation

@oleksiikolomiietssnapp
Copy link
Collaborator

@oleksiikolomiietssnapp oleksiikolomiietssnapp commented Feb 24, 2025

✨ This PR Will:

  • use SnappThemingImage
  • add more tests
  • remove scaling of the image. this part:
let targetSize = CGSize(
    width: max(validSVGImage.size.width, 512),
    height: max(validSVGImage.size.height, 512)
)
validSVGImage.scaleToFit(inside: targetSize)

The reason for removing it is that scaling the rendered image increases memory usage and appears unnecessary. Even if an .svg file is placed in the Assets folder, it will not resize automatically when used if the source image is small.

🎯 Purpose

to decrease usage of canImport and meta less boilerplate code

🧪 Unit Tests

  • added tests for converter and processor
  • provided fakes and mocks

📸 Screenshots

Screenshot 2025-02-24 at 23 56 10

- us SnappThemingImage
- add more tests
@github-actions
Copy link

🛡️ Code Coverage Report

ID Name Executable Lines Coverage
0 SnappThemingSVGSupport 39 100%

Generated by GitHub Actions.

Copy link
Contributor

@stinger stinger left a comment

Choose a reason for hiding this comment

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

Take a bow :)
🙇

@oleksiikolomiietssnapp oleksiikolomiietssnapp merged commit 1ddeb3c into main Feb 25, 2025
1 check passed
@oleksiikolomiietssnapp oleksiikolomiietssnapp deleted the feature/cross-platform-handling branch February 25, 2025 09:38
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.

3 participants