I found an issue with the rendering of the iPad background in landscape (I'm pretty sure I’ve tested it previously 🤔).
Interestingly, the gradient didn't extend to the edges of the screen no matter it was in a ZStack. I tried to use a Geometry reader but had no luck and that’s when I noticed that width and height were flipped for the view.
I noticed the issue disappeared when I removed .rotationEffect(Angle(degrees: 90)) from the Gradient. There is no need to rotate the gradient (thanks Figma 😓 ). Indeed, we can achieve the same effect by adjusting the x and y of the start and end points without rotating the gradient.
I’ve also simplified the view hierarchy by removing ZStack and Geometry Reader and just using .background() modifiers
BEFORE FIX
AFTER FIX
Steps to test this PR:
Smoke test SwiftUI OnboardingView previews in different screen sizes and iPad portrait/landscape
Task/Issue URL: https://app.asana.com/0/1206329551987282/1207585462837403/f CC: @SabrinaTardio
Description:
I found an issue with the rendering of the iPad background in landscape (I'm pretty sure I’ve tested it previously 🤔). Interestingly, the gradient didn't extend to the edges of the screen no matter it was in a ZStack. I tried to use a Geometry reader but had no luck and that’s when I noticed that
width
andheight
were flipped for the view.I noticed the issue disappeared when I removed
.rotationEffect(Angle(degrees: 90))
from the Gradient. There is no need to rotate the gradient (thanks Figma 😓 ). Indeed, we can achieve the same effect by adjusting the x and y of the start and end points without rotating the gradient.I’ve also simplified the view hierarchy by removing ZStack and Geometry Reader and just using
.background()
modifiersBEFORE FIX![Simulator Screenshot - iPad Pro (12 9-inch) (6th generation) - 2024-07-02 at 12 59 44](https://github.com/duckduckgo/iOS/assets/1089358/e5ffdb53-24bc-4841-9732-ed29f937597c)
AFTER FIX![Simulator Screenshot - iPad Pro (12 9-inch) (6th generation) - 2024-07-02 at 12 57 00](https://github.com/duckduckgo/iOS/assets/1089358/5ee00afa-c5e8-403e-a702-aaed4680dd7c)
Steps to test this PR:
Definition of Done (Internal Only):
Copy Testing:
’
rather than'
Orientation Testing:
Device Testing:
OS Testing:
Theme Testing:
Internal references:
Software Engineering Expectations Technical Design Template