OGM-3074: Add onContrast style for BPKSwitch #2119
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://skyscanner.atlassian.net/browse/OGM-3074
We noticed that the background for BPKSwitch was virtually invisible when used on our dark surface colour in the search controls: https://skyscanner.slack.com/archives/C07R4T86U3Y/p1731427038598569
After a discussion with design (https://skyscanner.slack.com/archives/C07R4T86U3Y/p1731427744624449) we agreed to add a contribution to Backpack to enable this change. This decision was documented here: https://skyscanner.atlassian.net/wiki/spaces/OGM/pages/1243021492/Decision+Log+-+Backpack+Switch+Contributions
Similarly to what we have for BPKSpinner, this PR implements the new changes to add a style for BPKSwitch.
![comparison-image](https://private-user-images.githubusercontent.com/25390815/392340878-fabda74e-9717-4afa-85f4-9f9a69292fd8.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg3ODU0MjIsIm5iZiI6MTczODc4NTEyMiwicGF0aCI6Ii8yNTM5MDgxNS8zOTIzNDA4NzgtZmFiZGE3NGUtOTcxNy00YWZhLTg1ZjQtOWY5YTY5MjkyZmQ4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA1VDE5NTIwMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQwNzMxNzlkNWJkMjZmYWU2NzVlZWVmZTZmYzEzMWIzN2YwNDQ2MmY5MmExMmRhMDc5ZjQ4NDNkYzMwODZhN2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.s-dO9OaeQgwuft4Co2-jjJQI6fag760gWY9znPvtdAA)
This change is currently only implemented in the Obj C code, but we could add it to Swift UI in this PR or a future ticket. I'd like to get your review first to see if this is the correct approach 😄
Remember to include the following changes:
README.md
Backpack.h
header fileIf you are curious about how we review, please read through the code review guidelines