duckduckgo / iOS

DuckDuckGo iOS Application
https://itunes.apple.com/us/app/duckduckgo-privacy-browser/id663592361?mt=8
Apache License 2.0
1.79k stars 405 forks source link

Onboarding fix iPad landscape gradient #3022

Closed alessandroboron closed 5 days ago

alessandroboron commented 6 days ago

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 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 Simulator Screenshot - iPad Pro (12 9-inch) (6th generation) - 2024-07-02 at 12 59 44

AFTER FIX Simulator Screenshot - iPad Pro (12 9-inch) (6th generation) - 2024-07-02 at 12 57 00

Steps to test this PR:

  1. Smoke test SwiftUI OnboardingView previews in different screen sizes and iPad portrait/landscape

Definition of Done (Internal Only):

Copy Testing:

Orientation Testing:

Device Testing:

OS Testing:

Theme Testing:


Internal references:

Software Engineering Expectations Technical Design Template

github-actions[bot] commented 6 days ago

:no_entry_sign: The Asana task linked in the PR description is not added to iOS App Board project.

  1. Verify that the correct task is linked in the PR.
    • :warning: Please use the actual implementation task, rather than the Code Review subtask.
  2. Verify that the task is added to iOS App Board project.
  3. When ready, remove the bot: not in app board label to retrigger the check.