[NT-320] Improve experience on SheetOverlay for vertically compact environments #926
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.
π² What
This PR makes some improvements to our custom
SheetOverlayViewController
to better support vertically compact environments.This PR also updates the iPad presentation style of
ManagePledgeViewController
to.pageSheet
so it's more consistent with how thePledgeViewController
is presented on iPad.π€ Why
On landscape mode on some devices, the shipping location selector on the pledge screen was very difficult to use, because it was presented inside the
SheetOverlayViewController
with a very large offset. This created a very frustrating user experience.π How
The root issue is that on landscape mode (in vertically compact environments), the offset on the
SheetOverlayViewController
is too large, even though it works for portrait or vertically regular environments. To get around this, we overridetraitCollectionDidChange
onSheetOverlayViewController
to check if the new trait collection is vertically compact. If it is, we simply update the offset to a more reasonable number for that trait collection: the height of the navigation bar, or a hard-coded similar value in the case where there is no navigation bar. If the user then rotates back to a vertically regular environment, the originally definedoffset
is used.π See
Trello, screenshots, external resources?
iPhone X
iPad
Manage Pledge presented using Page Sheet on iPad
βΏοΈ Accessibility
N/A
π Performance
N/A
β Acceptance criteria