-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
MBL-1371: Only show 'Coming Soon' if project is actually pre-launch #2042
Merged
amy-at-kickstarter
merged 5 commits into
main
from
bug/adyer/mbl-1371/fix-backer-dashboard-status
Apr 23, 2024
Merged
MBL-1371: Only show 'Coming Soon' if project is actually pre-launch #2042
amy-at-kickstarter
merged 5 commits into
main
from
bug/adyer/mbl-1371/fix-backer-dashboard-status
Apr 23, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I just realized that |
amy-at-kickstarter
force-pushed
the
bug/adyer/mbl-1371/fix-backer-dashboard-status
branch
from
April 22, 2024 14:12
954f7d9
to
2cbabd3
Compare
amy-at-kickstarter
force-pushed
the
bug/adyer/mbl-1371/fix-backer-dashboard-status
branch
from
April 22, 2024 14:50
2cbabd3
to
cccebec
Compare
switch (project.displayPrelaunch, project.dates.launchedAt, project.prelaunchActivated) { | ||
case (.some(true), _, _), | ||
(_, _, .some(true)): | ||
switch (project.displayPrelaunch, project.prelaunchActivated, project.dates.launchedAt) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reordered these arguments for clarity - the two bools, then the launch time.
amy-at-kickstarter
requested review from
a team and
ifosli
and removed request for
a team
April 22, 2024 14:54
ifosli
approved these changes
Apr 23, 2024
amy-at-kickstarter
deleted the
bug/adyer/mbl-1371/fix-backer-dashboard-status
branch
April 23, 2024 21:26
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Check both
displayPrelaunch
andprelaunchActivated
flags onProject
before showing"Coming Soon"
in the project status.🤔 Why
When I swapped this page to use GraphQL, it started returning values in
displayPrelaunch
andprelaunchActivated
which were formerlynil
. This caused the status badges to be incorrect.On a little digging, the existing logic to check for prelaunch status didn't make sense:
prelaunchActivated
refers to whether the prelaunch page is availabledisplayPrelaunch
is true if the project has not actually launched yetI surmised that checking for both, not either, is the correct behavior.
I kept the behavior that checks the launch date - turns out that is used for detecting prelaunch projects fetched via
/v1/discover
i.e. search.👀 See
I checked this by comparing the status badges for my saved projects on prod with the badges in this version. I also created a prelaunch project on staging and verified that it shows "Coming soon" until I actually hit "launch".