Skip to content
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

NT-2004: Fix comments and updates screen on Thank You page #1281

Merged
merged 7 commits into from Jun 10, 2021

Conversation

leighdouglas
Copy link
Contributor

@leighdouglas leighdouglas commented Jun 10, 2021

📲 What

Previously, the if a user opened the comments page before backing a project, exited the comments page and then successful completed checkout, the comments page would pop up on top of the Thank you page. This PR fixes that bug so that the comments only appear when the text view is tapped on.

The same thing was happening with the updates page, so I fixed that here the same way.

🤔 Why

When the user successfully completes checkout, an update is sent to an observable in the project view model, which makes a network request to pull the latest project data. This was pushing new data to the observable controlling the comments button clicks, and because an event had already been triggered from the previous button click, this observable was not completed and still open listening for new data to come down the pipeline. This was causing the comments page to pop up on top of the thank you screen.

🛠 How

Rearranged the architecture of this observable to only react when the comments/updates text view is tapped, and to then grab the latest data project/project data available instead of that data triggering the event itself.

👀 See

Comments screen:
Jun-09-2021 20-34-37

Updates screen:
Jun-09-2021 20-35-18

📋 QA

Follow these steps for both updates and comments screen on two separate projects. These are two different flows:

  1. Go to a project you are not backing
  2. Tap on either comments or updates
  3. On comments, you should see the disabled comments UI
  4. Exit the page and return to the project page
  5. Successfully complete checkout/backing
  • There should only be the thank you screen, updates or comments pages should not open
  1. Exit the thank you screen
  2. On the project page, tap updates or comments
  • The comments page should now be showing the enabled state because you are a backer
  • Updates should open as normal.

Story 📖

NT-2004: Comments showing on top of "Thank you" screen

@codecov
Copy link

codecov bot commented Jun 10, 2021

Codecov Report

Merging #1281 (8e1a758) into master (9aed34c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1281   +/-   ##
=========================================
  Coverage     74.34%   74.34%           
  Complexity      739      739           
=========================================
  Files           221      221           
  Lines          6646     6646           
  Branches        405      405           
=========================================
  Hits           4941     4941           
  Misses         1569     1569           
  Partials        136      136           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9aed34c...8e1a758. Read the comment docs.

Copy link
Contributor

@Arkariang Arkariang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Arkariang Arkariang merged commit 89540a8 into master Jun 10, 2021
@Arkariang Arkariang deleted the leigh/nt-2004-back-button branch June 10, 2021 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants