[Paywalls V2] Added fallback components#4621
Merged
Merged
Conversation
joshdholtz
commented
Dec 27, 2024
Member
Author
There was a problem hiding this comment.
This test needed fixing 😇
JayShortway
approved these changes
Dec 30, 2024
JayShortway
left a comment
Member
There was a problem hiding this comment.
So nice! I've put this on my todo list for Android 😄 Just 1 question regarding an error message.
| @@ -11,7 +11,12 @@ class ButtonComponentCodableTests: TestCase { | |||
| "type": "stack", | |||
Member
There was a problem hiding this comment.
Are the changes in this file (below) related? If so, how? 😄
Member
Author
There was a problem hiding this comment.
@JayShortway Nope! Just tests that didn't run on CI because of the feature/compiler flag so didn't see they failed a while back 🫠
| XCTFail("Should have failed to decode fallback property") | ||
| } catch DecodingError.dataCorrupted(let context) { | ||
| expect(context.debugDescription).to( | ||
| contain("Failed to decode fallback for unknown type \"super_new_type\"") |
Member
There was a problem hiding this comment.
Shouldn't this say something like "Failed to decode unknown type without fallback"?
Member
Author
There was a problem hiding this comment.
@JayShortway Okay, I think i fixed this now in 1b41802 🤞
I also adde a test for decoding, encoding, and redecoding 🙃
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
If the type is unknown, try to parse/render a fallback component
Description
If the
typeis unknown for a component, look atfallback.This should be a component a basic component that is known in initial release that all SDKs can render.