[WEB-999] Prelaunch Dates Blockers #1801
Merged
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
As outlined in this ticket we needed to update our existing project model
deadline
andlaunchedAt
properties to optional instead of non-optional.Reason is because the prelaunch pages do not have those fields populated in GQL and the existing project page works off of GQL not v1.
Obviously this isn't the final version of the prelaunch, but necessary to get the latest data for the eventual page UI.
🤔 Why
As stated above, we need the
deadline
andlaunchedAt
dates to be optional for those fields to be populated in order for the guard check to pass inProject+ProjectFragment
dates
🛠 How
Did a project search for both properties and found instances of their use. In cases where optionals where being returned already, just needed to add the property to the
if let
orguard let
. Otherwise returned a sensible value (ie. for String was "", or Int was 1).There are lot of places where these fields occur and going through them all with breakpoints helped validate that nothing was broken or out of place.
Mostly though relied on optional checks to safely unwrap properties that were once non-optional.
Also fixed up tests to pass, not too much to do there.
👀 See
✅ Acceptance criteria
deadline
orlaunchedAt
or computed properties of those two were being used, hit breakpoint, ensure optional check passes.