-
Notifications
You must be signed in to change notification settings - Fork 205
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
Add last scan date below upsell button #4407
Conversation
Putting back in draft mode - it needs to be put behind a feature flag. |
} | ||
|
||
const scan = await knex("onerep_scans") | ||
.first() | ||
.where("onerep_profile_id", onerepProfileId) | ||
.orderBy("created_at", "desc"); | ||
|
||
return scan ?? null; |
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.
Interesting! What does this do?
I thought the nullish coalescing would only return the right-hand side if the left-hand side was already null.
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.
Nullish coalescing returns the right-hand side if the left-hand side is null
or undefined
. So this ensures we return null
if there was no result.
Flag added in dd3d4d8. |
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.
@Vinnl would you mind adding an entry for this into the nimbus.yaml
? I think it makes sense to do as part of landing a feature, just as we do with the feature flag name.
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.
LGTM but not sure if we're still rolling this out since I think we're looking to redesign it?
After all, it's part of the toolbar.
(Only shown if the user has performed a scan.)
Supposedly that's a prerequisite for making it part of an experiment.
9fa38fb
to
b13ca39
Compare
I'm not actually sure if we made a decision on that, but we're going to run an experiment for it, so we'll first have to set that up anyway. Possibly we'll move it over a bit after that. (Which isn't a major redesign anyway, just putting it to the left of the badge.) |
References:
Jira: MNTOR-2701
Figma: https://www.figma.com/file/DTbmXzCQCw2PxXpHQW8yfW/Monitor-MVP-Enhancements?type=design&node-id=24-538&mode=design
Description
Lets a user know when their last scan took place.
Note that I also moved
UpsellBadge.tsx
into thetoolbar
folder, since it's shown in the toolbar.Screenshot (if applicable)
How to test
Open the dashboard with a user who has performed a scan.
Checklist (Definition of Done)