mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.21k stars 2.93k forks source link

Fakespot [iPad] - opt in card is displayed before tapping on price tag #19346

Open dragosb01 opened 7 months ago

dragosb01 commented 7 months ago

Steps to reproduce

  1. Navigate to a product detail page on amazon.com
  2. Navigate to the 'Settings' section and tap the "turn off review quality check" button
  3. In a new tab, navigate to a product detail page on amazon.com

    Expected behavior

    The detail page of the product should load without any other views

    Actual behavior

    The detail page of the product loads and in the same time the opt in card

    Device & build information

https://github.com/mozilla-mobile/firefox-ios/assets/134391433/4d431933-2bad-4954-add5-234e63c5ac95

┆Issue is synchronized with this Jira Task

data-sync-user commented 7 months ago

➤ Norberto Andres Furlan commented:

Joy Chen

MattLichtenstein commented 7 months ago

Is this available for contributors? If so, I would like to work on it 🙂

thatswinnie commented 6 months ago

@MattLichtenstein yes, feel free to work on it. Please message me on Element if you have any questions.

MattLichtenstein commented 6 months ago

Thanks @thatswinnie

This issue seems to occur after pressing any button in any of the many card views (onboarding, quality determination, product ad) in FakespotViewController that normally dismisses the view controller. This issue does not occur when using the "X" button or tap-outside/swipe gestures to dismiss the modal.

Would it be correct to assume that the expected behavior here is to never have the FakespotViewController be presented without prior user interaction?

thatswinnie commented 6 months ago

@MattLichtenstein on iPad there are many scenarios where Fakespot should be restored/opened up on a product page. It should not be restored however if the user dismisses the view controller via the close or shopping icon button, when turning off Fakespot or when tapping outside the modal.

MattLichtenstein commented 6 months ago

@thatswinnie thank you for the clarification, though I do still have a couple of outstanding questions:

  1. What about if they choose "not now" from the opt-in view? Or any of the various links (i.e. privacy notice, terms of use, etc) Currently, those result in the view controller being presented the next time a product page is loaded.
  2. Since listed nearly all of the ways I can think of to close the view controller, in what cases should the view controller automatically restore/open?

Thanks again for the support!

thatswinnie commented 6 months ago

@MattLichtenstein

  1. tapping on "not now" during Fakespot onboarding should be handled like closing Fakespot. If you tap on any of the other links in onboarding the sidebar/modal should be restored on iPad if you visit a product page again.
  2. The sidebar/modal should be restored on iPad after the user opened Fakespot and didn't dismiss/close it through the previously described ways.
MattLichtenstein commented 6 months ago

@thatswinnie ahh that all makes sense. I guess my final question is, should we be waiting for the product details page to fully load before showing the modal/sidebar (unlike in the video from the issue description)?

Apologies for all of the questions - this issue seems to have a little more depth than I originally thought.

thatswinnie commented 6 months ago

@MattLichtenstein no worries about the questions: it's better to ask than to make assumptions!

The way we are showing it right now is ok - there is no need to wait for the page to be loaded.

data-sync-user commented 6 months ago

➤ Diana Andreea Barladeanu commented:

Verified as fixed on v9000 (41169), with iPad Air 3rd gen (17.3).

data-sync-user commented 5 months ago

➤ Diana Andreea Barladeanu commented:

Verified as fixed on v127 (41813), with iPad Air 3rd gen (17.5).