-
Notifications
You must be signed in to change notification settings - Fork 8
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
In 1504: Readable Width for Saves and Search #763
Conversation
… to changing sizeClasses
… subclass to hold constraint logic
PocketKit: Coverage: 76.38
Generated by 🚫 Danger Swift against 9455171 |
@@ -325,6 +325,7 @@ extension ReadableViewController { | |||
// Zero out the default leading/trailing contentInsets, but preserve the default top/bottom values. | |||
// This ensures each section will be inset horizontally exactly to the readable content width. | |||
var contentInsets = section.contentInsets | |||
print("== contentInset \(contentInsets)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one comment on print statement, otherwise code looks good!
Updated the SwiftUI ReadableWidth mimic to 700 points, seems to work well on iPad. |
Summary
Adds readable width to Saves and mimics it for Search.
References
https://getpocket.atlassian.net/browse/IN-1504
Implementation Details
Saves is built on UIKit and so we are able to add
section.contentInsetsReference = .readableContent
to the content cells layout config.Search is built using SwiftUI, which does not appear to have a readableContent setting.
Therefore, if the interface width size class is .regular we restrict the list width to a preset amount (currently 500 points)
Test Steps
Launch and use Saves and Search as normal.
On iPad you may then enable split screen and while changing the window size you will notice the views adapt to their width.
iPhones do not have a landscape layout for Search and Saves, only Reader which already uses Readable Width.
PR Checklist:
Screenshots