[NT-783] Send prelaunch project links to safari instead of opening in the app #1054
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📲 What
Fixes a bug where we were incorrectly displaying prelaunch projects in the app when they were accessed through a link in a project update.
🤔 Why
A few months ago we added the "prelaunch" feature to project pages on web. Since native apps don't support prelaunch project pages, we updated our universal link handling for project links to check whether the project was a prelaunch project, and if it was, we send the user to mobile web instead of opening the project page in the app.
However, we missed adding this check in the
UpdateViewController
, which supports opening project links natively in the app. This meant that it was possible for a user to tap on a prelaunch project link from a project update and be presented with an incomplete project page natively.🛠 How
We now check whether the project is a
prelaunchActivated
project before presenting the project page natively. If the project is a prelaunch project, we load the project url in a safari webview. If the project is not aprelaunchActivated
project, then we present the native project page as before.One thing I noticed which wasn't great is that project links make a network request but give no indication to the user that something is happening (ie. we don't show a loader). This can make it seem like opening the link is "hanging" when in fact a request is being made.
👀 See
✅ Acceptance criteria
This can only be reliably tested by building a
Release
configuration of the app on a device, then doing the following: