Allow user to set the paywall content max width #4116
+31
−1
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
Sometimes, it's not ideal to use the entire width of the screen for the paywall.
For example, a fullscreen paywall on an iPad looks like this by default:

👆This is a 10-inch iPad, but imagine a 13-inch!
This extremely wide content looks off, doesn't it? Who needs a button that's
2752 px
(or1376 pt
) wide?! 😱 (Specially with these short texts!)✅ Customized with the New API
By limiting it to a more readable size, it looks like this:

👆The width of this paywall is limited to the native Readable Content Guide.
Much better, right?
💡 Usage
👆I used the native
readableContentGuide
as Apple suggested for the device here, but the user can pass any value that suits them.More about this contribution