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

[TEMPURA-2186] Custom icons support #2132

Merged
merged 9 commits into from
Jan 9, 2025

Conversation

pablo-skyscanner
Copy link
Contributor

@pablo-skyscanner pablo-skyscanner commented Jan 8, 2025

This PR enables support for adding custom icons without requiring them to be added to the Backpack library.

Remember to include the following changes:

If you are curious about how we review, please read through the code review guidelines

@pablo-skyscanner pablo-skyscanner added the minor Non breaking change label Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Snapshots were updated. Please verify the changes match the expected layout.

' D Backpack-SwiftUI/Tests/BannerAlert/Snapshots/BPKBannerAlertTests/test_multilineBannerAlert.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/BannerAlert/Snapshots/BPKBannerAlertTests/test_multilineBannerAlert.light-mode.png'%0A' D Backpack-SwiftUI/Tests/BannerAlert/Snapshots/BPKBannerAlertTests/test_multilineBannerAlert.rtl.png'%0A' D Backpack-SwiftUI/Tests/NavigationTabGroup/Snapshots/BPKNavigationTabGroupTests/test_dark.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/NavigationTabGroup/Snapshots/BPKNavigationTabGroupTests/test_dark.light-mode.png'%0A' D Backpack-SwiftUI/Tests/NavigationTabGroup/Snapshots/BPKNavigationTabGroupTests/test_dark.rtl.png'%0A' D Backpack-SwiftUI/Tests/NavigationTabGroup/Snapshots/BPKNavigationTabGroupTests/test_default.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/NavigationTabGroup/Snapshots/BPKNavigationTabGroupTests/test_default.light-mode.png'%0A' D Backpack-SwiftUI/Tests/NavigationTabGroup/Snapshots/BPKNavigationTabGroupTests/test_default.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_clearableField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_clearableField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_clearableField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_disabledField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_errorField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/SearchInputSummary/Snapshots/BPKSearchInputSummaryTests/test_validField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_clearableField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_defaultSettings_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_disabledField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_emptyField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_errorField_withPrefixIcon.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withCustomPrefixText.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withCustomPrefixText.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withCustomPrefixText.rtl.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withPrefixIcon.dark-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withPrefixIcon.light-mode.png'%0A' D Backpack-SwiftUI/Tests/TextField/Snapshots/BPKTextFieldTests/test_validField_withPrefixIcon.rtl.png'%0A' M Example/Backpack.xcodeproj/project.pbxproj'%0A'?? Backpack-SwiftUI/Tests/Icons/Snapshots/BPKIconViewTests/testCustomLargeIcon.dark-mode.png'%0A'?? Backpack-SwiftUI/Tests/Icons/Snapshots/BPKIconViewTests/testCustomLargeIcon.light-mode.png'%0A'?? Backpack-SwiftUI/Tests/Icons/Snapshots/BPKIconViewTests/testCustomLargeIcon.rtl.png'%0A'?? Backpack-SwiftUI/Tests/Icons/Snapshots/BPKIconViewTests/testCustomSmallIcon.dark-mode.png'%0A'?? Backpack-SwiftUI/Tests/Icons/Snapshots/BPKIconViewTests/testCustomSmallIcon.light-mode.png'%0A'?? Backpack-SwiftUI/Tests/Icons/Snapshots/BPKIconViewTests/testCustomSmallIcon.rtl.png'

Copy link
Contributor

@frugoman frugoman left a comment

Choose a reason for hiding this comment

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

Looking good and clean!! Thanks for this! it will be quite useful!

@frugoman frugoman enabled auto-merge (squash) January 9, 2025 15:52
@frugoman frugoman merged commit def0b5f into main Jan 9, 2025
14 checks passed
@frugoman frugoman deleted the tempura/TEMPURA-2186_customIconSupport branch January 9, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Non breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants