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-1821: Switch prelaunch display logic to use display_prelaunch field from v1 API #1205

Merged
merged 4 commits into from
Apr 13, 2021

Conversation

leighdouglas
Copy link
Contributor

@leighdouglas leighdouglas commented Apr 13, 2021

📲 What

Switch logic tied to prelaunchActivated() from the User payload to rely on displayPrelaunch() instead.

🤔 Why

Currently, native is using the field prelaunch_activated to determine the display logic of prelaunch deeplinks. We want to change this logic to check display_prelaunch instead.

The backend will be updating prelaunch_activated to actually return the correct project.prelaunch_activated value. This is also keeping parity with web as they are using this field. Because of this, any instances using prelaunch_activated for display logic will need to be updated to use display_prelaunch instead.

Relevant backend PR: https://github.com/kickstarter/kickstarter/pull/21408

🛠 How

  • Update the User struct to grab displayPrelaunch value available from the API
  • Switch instances of prelaunchActivated() to displayPrelaunch() so logic relys on this boolean
  • Update the ProjectFactory method prelaunchProject to be set the displayPrelaunch value

📋 QA

This change requires smoke and regression testing.

  • Find a project in prelaunch
  • Open the deeplink on your mobile device
  • Make sure the deeplink opens the project in the web browser on your device

Story 📖

NT-1821: Switch prelaunch display logic to use display_prelaunch field from v1 API

@leighdouglas leighdouglas changed the title Leigh/nt 1821 prelaunch NT-1821: Switch prelaunch display logic to use display_prelaunch field from v1 API Apr 13, 2021
@leighdouglas leighdouglas marked this pull request as ready for review April 13, 2021 15:25
Copy link
Contributor

@sunday-okpoluaefe sunday-okpoluaefe left a comment

Choose a reason for hiding this comment

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

lgtm!

@leighdouglas leighdouglas merged commit 2368ea0 into master Apr 13, 2021
@leighdouglas leighdouglas deleted the leigh/nt-1821-prelaunch branch April 13, 2021 18:29
leighdouglas added a commit that referenced this pull request Apr 14, 2021
…d from v1 API (#1205)

* Replace prelaunchActivated with displayPrelaunch

* Update tests and project factory
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.

2 participants