-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix crash in Reader stream empty state views #23908
Conversation
52901aa
to
1a082c2
Compare
📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
|
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.
The interaction is neat!
// Calculate visible part of the table view in `self.view` coordinates | ||
let y: CGFloat = { | ||
if let headerView = tableView.tableHeaderView { | ||
return headerView.convert(headerView.frame, to: view).maxY |
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.
It probably doesn't make much difference in reality, but I think it only make sense to use bounds
here, because headerView.frame
is not in headerView
's coordinate space?
return headerView.convert(headerView.frame, to: view).maxY | |
return headerView.convert(headerView.bounds, to: view).maxY |
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.
Good catch. I wrote it hastily, and what it currently doesn't make a whole lot of space. It should be:
return tableView.convert(headerView.frame, to: view).maxY
Convert the header view frame from the table view coordinate space (its superview) to the coordinate space of the main view.
I updated it.
52406f9
to
5d3f200
Compare
5d3f200
to
4b8532f
Compare
Fixes https://a8c.sentry.io/issues/6153580880:
I'm not sure when this happens, but I decided to keep it simple and lay it out with frames. It also fixes an issue with the bottom part of the view being not scrollable (only the header was).
I kept the nice parallax effect but, of course, you can drag from anywhere.
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-12-18.at.13.17.10.mp4
To test:
You can easily test It by replacing this:
with this:
or just disabling internet connection
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.Testing checklist: